refactor: remove unused TOOL_TRIGGERS dead code
- Remove unused TOOL_TRIGGERS dictionary from config.py - Remove associated test_tool_triggers test case - TOOL_TRIGGERS was not used anywhere in the codebase - MCP automatically discovers tools through descriptions in list_tools handler - All tests pass (64 tests), ruff clean, black formatted
This commit is contained in:
113
config.py
113
config.py
@@ -18,116 +18,3 @@ MAX_CONTEXT_TOKENS = 1_000_000 # 1M tokens for Gemini Pro
|
|||||||
TEMPERATURE_ANALYTICAL = 0.2 # For code review, debugging
|
TEMPERATURE_ANALYTICAL = 0.2 # For code review, debugging
|
||||||
TEMPERATURE_BALANCED = 0.5 # For general chat
|
TEMPERATURE_BALANCED = 0.5 # For general chat
|
||||||
TEMPERATURE_CREATIVE = 0.7 # For architecture, deep thinking
|
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",
|
|
||||||
"extend my analysis",
|
|
||||||
"reason through",
|
|
||||||
"explore alternatives",
|
|
||||||
"challenge my thinking",
|
|
||||||
"deep think",
|
|
||||||
"extended thinking",
|
|
||||||
"validate my approach",
|
|
||||||
"find edge cases",
|
|
||||||
"gemini think deeper",
|
|
||||||
"deeper analysis",
|
|
||||||
"extend thinking",
|
|
||||||
"critical thinking",
|
|
||||||
"comprehensive analysis",
|
|
||||||
],
|
|
||||||
"review_code": [
|
|
||||||
"review",
|
|
||||||
"check for issues",
|
|
||||||
"find bugs",
|
|
||||||
"security check",
|
|
||||||
"code quality",
|
|
||||||
"audit",
|
|
||||||
"code review",
|
|
||||||
"check this code",
|
|
||||||
"review for",
|
|
||||||
"find vulnerabilities",
|
|
||||||
"review my code",
|
|
||||||
"code problems",
|
|
||||||
"code issues",
|
|
||||||
"find security issues",
|
|
||||||
"performance review",
|
|
||||||
],
|
|
||||||
"debug_issue": [
|
|
||||||
"debug",
|
|
||||||
"error",
|
|
||||||
"failing",
|
|
||||||
"root cause",
|
|
||||||
"trace",
|
|
||||||
"why doesn't",
|
|
||||||
"not working",
|
|
||||||
"diagnose",
|
|
||||||
"troubleshoot",
|
|
||||||
"investigate this error",
|
|
||||||
"stack trace",
|
|
||||||
"exception",
|
|
||||||
"crashed",
|
|
||||||
"broken",
|
|
||||||
"fix this error",
|
|
||||||
"debug this",
|
|
||||||
"what's wrong",
|
|
||||||
],
|
|
||||||
"analyze": [
|
|
||||||
"analyze",
|
|
||||||
"examine",
|
|
||||||
"look at",
|
|
||||||
"check",
|
|
||||||
"inspect",
|
|
||||||
"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",
|
|
||||||
"check my changes",
|
|
||||||
"validate changes",
|
|
||||||
"pre-commit review",
|
|
||||||
"before commit",
|
|
||||||
"about to commit",
|
|
||||||
"ready to commit",
|
|
||||||
"review my git changes",
|
|
||||||
"check git changes",
|
|
||||||
"validate my changes",
|
|
||||||
"review staged changes",
|
|
||||||
"review unstaged changes",
|
|
||||||
"pre-commit",
|
|
||||||
"before I commit",
|
|
||||||
"should I commit",
|
|
||||||
"commit ready",
|
|
||||||
"review diff",
|
|
||||||
"check diff",
|
|
||||||
"validate implementation",
|
|
||||||
"review my work",
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from config import (
|
|||||||
TEMPERATURE_ANALYTICAL,
|
TEMPERATURE_ANALYTICAL,
|
||||||
TEMPERATURE_BALANCED,
|
TEMPERATURE_BALANCED,
|
||||||
TEMPERATURE_CREATIVE,
|
TEMPERATURE_CREATIVE,
|
||||||
TOOL_TRIGGERS,
|
|
||||||
__author__,
|
__author__,
|
||||||
__updated__,
|
__updated__,
|
||||||
__version__,
|
__version__,
|
||||||
@@ -40,16 +39,3 @@ class TestConfig:
|
|||||||
assert TEMPERATURE_ANALYTICAL == 0.2
|
assert TEMPERATURE_ANALYTICAL == 0.2
|
||||||
assert TEMPERATURE_BALANCED == 0.5
|
assert TEMPERATURE_BALANCED == 0.5
|
||||||
assert TEMPERATURE_CREATIVE == 0.7
|
assert TEMPERATURE_CREATIVE == 0.7
|
||||||
|
|
||||||
def test_tool_triggers(self):
|
|
||||||
"""Test tool trigger phrases"""
|
|
||||||
assert "think_deeper" in TOOL_TRIGGERS
|
|
||||||
assert "review_code" in TOOL_TRIGGERS
|
|
||||||
assert "debug_issue" in TOOL_TRIGGERS
|
|
||||||
assert "analyze" in TOOL_TRIGGERS
|
|
||||||
|
|
||||||
# Check some specific triggers
|
|
||||||
assert "ultrathink" in TOOL_TRIGGERS["think_deeper"]
|
|
||||||
assert "extended thinking" in TOOL_TRIGGERS["think_deeper"]
|
|
||||||
assert "find bugs" in TOOL_TRIGGERS["review_code"]
|
|
||||||
assert "root cause" in TOOL_TRIGGERS["debug_issue"]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user