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
+9 -4
View File
@@ -146,16 +146,21 @@ function shouldForceNativeForCapabilityQuery(text: string): boolean {
if (!normalized) {
return false;
}
return (
if (
normalized.includes('available tools')
|| normalized.includes('what tools')
|| normalized.includes('which tools')
|| normalized.includes('tool list')
|| normalized.includes('list tools')
|| normalized.includes('your tools')
|| normalized.includes('what can you do')
|| normalized.includes('can you do')
|| normalized.includes('capabilities')
) {
return true;
}
return (
/\b(?:show|list|check)\s+(?:me\s+)?(?:your\s+)?(?:available\s+|new\s+)?tools?\b/.test(normalized)
|| /\b(?:what|which)\s+tools?\b/.test(normalized)
|| /\btools?\s+(?:do\s+you\s+have|are\s+available)\b/.test(normalized)
|| /\b(?:show|list|what\s+are)\s+(?:your\s+)?capabilities\b/.test(normalized)
);
}