Skip to content

Commit 07d80d0

Browse files
committed
fix(knowledge): reject a whitespace-only copilot query explicitly
The shared dispatch treats a whitespace-only query as absent and throws when no tag filters accompany it, where the previous vector-only call would have embedded the blank string and searched. Tighten the existing guard so the tool returns its normal message instead.
1 parent 318b236 commit 07d80d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/lib/copilot/tools/server/knowledge/knowledge-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export const knowledgeBaseServerTool: BaseServerTool<KnowledgeBaseArgs, Knowledg
221221
}
222222
}
223223

224-
if (!args.query) {
224+
if (!args.query?.trim()) {
225225
return {
226226
success: false,
227227
message: 'Query text is required for query operation',

0 commit comments

Comments
 (0)