refactor(app): centralize checkout query keys (#844)

This commit is contained in:
Mohamed Boudra
2026-05-09 22:40:26 +08:00
committed by GitHub
parent f17fb77013
commit a4bcc7b169
12 changed files with 164 additions and 110 deletions
+1 -4
View File
@@ -2,13 +2,10 @@ import { type QueryClient, useQuery, useQueryClient } from "@tanstack/react-quer
import { useEffect } from "react";
import { useHostRuntimeClient, useHostRuntimeIsConnected } from "@/runtime/host-runtime";
import type { CheckoutStatusResponse } from "@server/shared/messages";
import { checkoutStatusQueryKey } from "@/git/query-keys";
export const CHECKOUT_STATUS_STALE_TIME = 15_000;
export function checkoutStatusQueryKey(serverId: string, cwd: string) {
return ["checkoutStatus", serverId, cwd] as const;
}
interface UseCheckoutStatusQueryOptions {
serverId: string;
cwd: string;