Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

dont search when input is empty

Julius Marminge77bf5213dfbd
diff --git a/apps/web/src/lib/projectReactQuery.ts b/apps/web/src/lib/projectReactQuery.ts
index 8a06d818b..20aa265b8 100644
--- a/apps/web/src/lib/projectReactQuery.ts
+++ b/apps/web/src/lib/projectReactQuery.ts
@@ -36,7 +36,7 @@ export function projectSearchEntriesQueryOptions(input: {
limit,
});
},
- enabled: (input.enabled ?? true) && input.cwd !== null,
+ enabled: (input.enabled ?? true) && input.cwd !== null && input.query.length > 0,
staleTime: input.staleTime ?? DEFAULT_SEARCH_ENTRIES_STALE_TIME,
placeholderData: (previous) => previous ?? EMPTY_SEARCH_ENTRIES_RESULT,
});