feat: enhance tool triggers and reorder documentation

- Add comprehensive triggers for chat tool including 'ask gemini', 'brainstorm', 'second opinion'
- Enhance triggers for all tools with more natural phrases:
  - think_deeper: added 'deeper analysis', 'critical thinking'
  - review_code: added 'review my code', 'find security issues'
  - debug_issue: added 'stack trace', 'crashed', 'what's wrong'
  - analyze: added 'what does this do', 'how does this work'
  - review_pending_changes: added 'review diff', 'validate implementation'
- Reorder Quick Tool Selection Guide to list chat first
- All tests pass (65 tests), ruff clean, black formatted
This commit is contained in:
Fahad
2025-06-09 14:17:33 +04:00
parent b179c0ad48
commit a11e1b84ac
2 changed files with 47 additions and 1 deletions

View File

@@ -116,12 +116,12 @@ Just ask Claude naturally:
## Available Tools
**Quick Tool Selection Guide:**
- **Need a thinking partner?** → `chat` (brainstorm ideas, get second opinions, validate approaches)
- **Need deeper thinking?** → `think_deeper` (extends Claude's analysis, finds edge cases)
- **Code needs review?** → `review_code` (bugs, security, performance issues)
- **Pre-commit validation?** → `review_pending_changes` (validate git changes before committing)
- **Something's broken?** → `debug_issue` (root cause analysis, error tracing)
- **Want to understand code?** → `analyze` (architecture, patterns, dependencies)
- **Need a thinking partner?** → `chat` (brainstorm ideas, get second opinions, validate approaches)
- **Check models?** → `list_models` (see available Gemini models)
- **Server info?** → `get_version` (version and configuration details)

View File

@@ -21,6 +21,23 @@ TEMPERATURE_CREATIVE = 0.7 # For architecture, deep thinking
# Tool trigger phrases for natural language matching
TOOL_TRIGGERS = {
"chat": [
"chat with gemini",
"ask gemini",
"brainstorm",
"discuss",
"get gemini's opinion",
"talk to gemini",
"gemini's thoughts",
"collaborate with gemini",
"second opinion",
"what does gemini think",
"bounce ideas",
"thinking partner",
"explain",
"help me understand",
"clarify",
],
"think_deeper": [
"think deeper",
"ultrathink",
@@ -32,6 +49,11 @@ TOOL_TRIGGERS = {
"extended thinking",
"validate my approach",
"find edge cases",
"gemini think deeper",
"deeper analysis",
"extend thinking",
"critical thinking",
"comprehensive analysis",
],
"review_code": [
"review",
@@ -44,6 +66,11 @@ TOOL_TRIGGERS = {
"check this code",
"review for",
"find vulnerabilities",
"review my code",
"code problems",
"code issues",
"find security issues",
"performance review",
],
"debug_issue": [
"debug",
@@ -56,6 +83,13 @@ TOOL_TRIGGERS = {
"diagnose",
"troubleshoot",
"investigate this error",
"stack trace",
"exception",
"crashed",
"broken",
"fix this error",
"debug this",
"what's wrong",
],
"analyze": [
"analyze",
@@ -66,6 +100,13 @@ TOOL_TRIGGERS = {
"understand",
"analyze file",
"analyze these files",
"what does this do",
"how does this work",
"explain this code",
"architecture analysis",
"code structure",
"dependencies",
"analyze directory",
],
"review_pending_changes": [
"review pending changes",
@@ -83,5 +124,10 @@ TOOL_TRIGGERS = {
"pre-commit",
"before I commit",
"should I commit",
"commit ready",
"review diff",
"check diff",
"validate implementation",
"review my work",
],
}