Skip to content

Commit e2bf13c

Browse files
authored
manually invoke exit tool when LLM didn't invoke any tool (#1762)
1 parent 4760139 commit e2bf13c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/extension/inlineChat/node/inlineChatIntent.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ export class InlineChatIntent implements IIntent {
202202
};
203203
}
204204

205+
if (toolCalls.length === 0) {
206+
// when no tools were called, invoke the exit tool manually
207+
await this._toolsService.invokeTool(INLINE_CHAT_EXIT_TOOL_NAME, { toolInvocationToken: request.toolInvocationToken, input: undefined }, token);
208+
}
209+
205210
return {};
206211

207212
}

0 commit comments

Comments
 (0)