fix(tui): narrow tool inventory query detection

This commit is contained in:
William Valentin
2026-02-22 17:12:30 -08:00
parent c79e082905
commit 9c8e9cd546
4 changed files with 93 additions and 13 deletions
+2 -1
View File
@@ -213,7 +213,7 @@ describe('getCommandCompletions', () => {
describe('isToolInventoryQuery', () => {
it('detects common capability/tool-list prompts', () => {
expect(isToolInventoryQuery('Check out your new tools')).toBe(true);
expect(isToolInventoryQuery('check your new tools')).toBe(true);
expect(isToolInventoryQuery('what tools do you have?')).toBe(true);
expect(isToolInventoryQuery('show capabilities')).toBe(true);
});
@@ -221,5 +221,6 @@ describe('isToolInventoryQuery', () => {
it('does not match unrelated prompts', () => {
expect(isToolInventoryQuery('write a shell script')).toBe(false);
expect(isToolInventoryQuery('summarize this doc')).toBe(false);
expect(isToolInventoryQuery('The json by default is up to you, same as for gemini, codex is your tool, so decide what format is best for you to deal with.')).toBe(false);
});
});