Update files

This commit is contained in:
Mohamed Boudra
2026-01-27 13:06:01 +07:00
parent 637967fa14
commit 766585d1cb
10 changed files with 249 additions and 279 deletions
@@ -24,10 +24,11 @@ interface UseCheckoutStatusQueryOptions {
export type CheckoutStatusPayload = CheckoutStatusResponse["payload"];
function fetchCheckoutStatus(
client: { getCheckoutStatus: (agentId: string) => Promise<CheckoutStatusPayload> },
agentId: string
client: { getCheckoutStatus: (agentId: string, options?: { cwd?: string }) => Promise<CheckoutStatusPayload> },
agentId: string,
cwd: string
): Promise<CheckoutStatusPayload> {
return client.getCheckoutStatus(agentId);
return client.getCheckoutStatus(agentId, { cwd });
}
export function useCheckoutStatusQuery({ serverId, agentId, cwd }: UseCheckoutStatusQueryOptions) {
@@ -50,7 +51,7 @@ export function useCheckoutStatusQuery({ serverId, agentId, cwd }: UseCheckoutSt
if (!client) {
throw new Error("Daemon client not available");
}
return await fetchCheckoutStatus(client, agentId);
return await fetchCheckoutStatus(client, agentId, cwd);
},
enabled: !!client && isConnected && !!agentId && !!cwd,
staleTime: CHECKOUT_STATUS_STALE_TIME,
@@ -98,7 +99,7 @@ export function useCheckoutStatusCacheOnly({ serverId, agentId, cwd }: UseChecko
if (!client) {
throw new Error("Daemon client not available");
}
return await fetchCheckoutStatus(client, agentId);
return await fetchCheckoutStatus(client, agentId, cwd);
},
enabled: false,
staleTime: CHECKOUT_STATUS_STALE_TIME,