MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / usePendingQuery

Function usePendingQuery

frontend/src/hooks/query/useQueryInitialization.ts:352–363  ·  view source on GitHub ↗
(setQuery: (query: string) => void)

Source from the content-addressed store, hash-verified

350 * This runs with high priority to ensure pending queries aren't overridden
351 */
352export const usePendingQuery = (setQuery: (query: string) => void) => {
353 const { pendingQuery, setPendingQuery } = useAppStore();
354
355 useEffect(() => {
356 if (pendingQuery) {
357 console.log('[PendingQuery] Setting pending query from AI tab:', pendingQuery.substring(0, 100) + '...');
358 setQuery(pendingQuery);
359 setPendingQuery(null);
360 console.log('[PendingQuery] Pending query processed and cleared');
361 }
362 }, [pendingQuery, setPendingQuery, setQuery]);
363};

Callers 1

QueryWorkspaceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected