MCPcopy Index your code
hub / github.com/coder/coder / chatDebugRuns

Function chatDebugRuns

site/src/api/queries/chats.ts:1178–1194  ·  view source on GitHub ↗
(chatId: string)

Source from the content-addressed store, hash-verified

1176]);
1177
1178export const chatDebugRuns = (chatId: string) =>
1179 queryOptions({
1180 queryKey: chatDebugRunsKey(chatId),
1181 queryFn: () => API.experimental.getChatDebugRuns(chatId),
1182 refetchInterval: ({ state }) => {
1183 // Keep polling on error with backoff so a transient fetch
1184 // failure does not freeze the panel until a manual remount.
1185 if (state.status === "error") {
1186 return DEBUG_RUN_ERROR_POLL_MS;
1187 }
1188 // Consistent foreground cadence while the Debug tab is open.
1189 // A slower terminal-state interval would delay discovery of
1190 // newly-started runs until the user switches tabs.
1191 return DEBUG_RUN_POLL_MS;
1192 },
1193 refetchIntervalInBackground: false,
1194 });
1195
1196export const chatDebugRun = (chatId: string, runId: string) =>
1197 queryOptions({

Callers 1

DebugPanelFunction · 0.90

Calls 2

chatDebugRunsKeyFunction · 0.85
getChatDebugRunsMethod · 0.80

Tested by

no test coverage detected