From 77023e1a69e84d719cd5c2694d5a99c207a8c948 Mon Sep 17 00:00:00 2001 From: David Moore Date: Thu, 15 Oct 2026 18:23:46 +1100 Subject: [PATCH] fix(web): give the desktop-in-use thread query its fetcher --- packages/web/src/lib/desktop.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web/src/lib/desktop.ts b/packages/web/src/lib/desktop.ts index 7b51cef4..488efc6d 100644 --- a/packages/web/src/lib/desktop.ts +++ b/packages/web/src/lib/desktop.ts @@ -1,5 +1,5 @@ -import type { ThreadDetails } from "@sugabots/contracts"; import { useQuery } from "@tanstack/react-query"; +import { threadQuery } from "./threads.ts"; import { BROWSER_TOOL_PREFIX } from "./tool-names.ts"; /** @@ -9,7 +9,7 @@ import { BROWSER_TOOL_PREFIX } from "./tool-names.ts"; * nothing of its own. */ export function useDesktopInUse(threadId: string | undefined, agentId: string): boolean { - const { data } = useQuery({ queryKey: ["thread", threadId], enabled: false }); + const { data } = useQuery({ ...threadQuery(threadId), enabled: false }); const reply = data?.messages.findLast( (message) => message.author.kind === "agent" && message.author.id === agentId, );