refactor: rename debug_issue tool to debug for brevity

- Rename debug_issue.py to debug.py
- Update tool name from 'debug_issue' to 'debug' throughout codebase
- Update all references in server.py, tests, and README
- Keep DebugIssueTool class name for backward compatibility
- All tests pass with the renamed tool

This makes the tool name shorter and more consistent with other
tool names like 'chat' and 'analyze'. The functionality remains
exactly the same.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Fahad
2025-06-10 11:43:47 +04:00
parent 8c07ad1eb2
commit 67f18ef3c9
10 changed files with 32 additions and 32 deletions

View File

@@ -8,7 +8,7 @@ from unittest.mock import Mock, patch
import pytest
from tools.analyze import AnalyzeTool
from tools.debug_issue import DebugIssueTool
from tools.debug import DebugIssueTool
from tools.models import ClarificationRequest, ToolOutput
@@ -122,7 +122,7 @@ class TestDynamicContextRequests:
"question": "I need to see the database configuration to diagnose the connection error",
"files_needed": ["config/database.yml", "src/db.py"],
"suggested_next_action": {
"tool": "debug_issue",
"tool": "debug",
"args": {
"error_description": "Connection timeout to database",
"files": [
@@ -155,7 +155,7 @@ class TestDynamicContextRequests:
clarification = json.loads(response_data["content"])
assert "suggested_next_action" in clarification
assert clarification["suggested_next_action"]["tool"] == "debug_issue"
assert clarification["suggested_next_action"]["tool"] == "debug"
def test_tool_output_model_serialization(self):
"""Test ToolOutput model serialization"""

View File

@@ -18,7 +18,7 @@ from mcp.types import TextContent
from config import MCP_PROMPT_SIZE_LIMIT
from tools.analyze import AnalyzeTool
from tools.chat import ChatTool
from tools.debug_issue import DebugIssueTool
from tools.debug import DebugIssueTool
from tools.review_changes import ReviewChanges
from tools.review_code import ReviewCodeTool
from tools.think_deeper import ThinkDeeperTool
@@ -167,8 +167,8 @@ class TestLargePromptHandling:
assert output["status"] == "requires_file_prompt"
@pytest.mark.asyncio
async def test_debug_issue_large_error_description(self, large_prompt):
"""Test that debug_issue tool detects large error_description."""
async def test_debug_large_error_description(self, large_prompt):
"""Test that debug tool detects large error_description."""
tool = DebugIssueTool()
result = await tool.execute({"error_description": large_prompt})
@@ -177,8 +177,8 @@ class TestLargePromptHandling:
assert output["status"] == "requires_file_prompt"
@pytest.mark.asyncio
async def test_debug_issue_large_error_context(self, large_prompt, normal_prompt):
"""Test that debug_issue tool detects large error_context."""
async def test_debug_large_error_context(self, large_prompt, normal_prompt):
"""Test that debug tool detects large error_context."""
tool = DebugIssueTool()
result = await tool.execute({"error_description": normal_prompt, "error_context": large_prompt})

View File

@@ -12,7 +12,7 @@ import pytest
from tools.analyze import AnalyzeTool
from tools.chat import ChatTool
from tools.debug_issue import DebugIssueTool
from tools.debug import DebugIssueTool
from tools.review_changes import ReviewChanges
from tools.review_code import ReviewCodeTool
from tools.think_deeper import ThinkDeeperTool
@@ -167,8 +167,8 @@ class TestPromptRegression:
assert output["status"] == "success"
@pytest.mark.asyncio
async def test_debug_issue_normal_error(self, mock_model_response):
"""Test debug_issue tool with normal error description."""
async def test_debug_normal_error(self, mock_model_response):
"""Test debug tool with normal error description."""
tool = DebugIssueTool()
with patch.object(tool, "create_model") as mock_create_model:

View File

@@ -21,7 +21,7 @@ class TestServerTools:
# Check all core tools are present
assert "think_deeper" in tool_names
assert "review_code" in tool_names
assert "debug_issue" in tool_names
assert "debug" in tool_names
assert "analyze" in tool_names
assert "chat" in tool_names
assert "review_changes" in tool_names

View File

@@ -7,7 +7,7 @@ from unittest.mock import Mock, patch
import pytest
from tools.analyze import AnalyzeTool
from tools.debug_issue import DebugIssueTool
from tools.debug import DebugIssueTool
from tools.review_code import ReviewCodeTool
from tools.think_deeper import ThinkDeeperTool

View File

@@ -103,7 +103,7 @@ class TestReviewCodeTool:
class TestDebugIssueTool:
"""Test the debug_issue tool"""
"""Test the debug tool"""
@pytest.fixture
def tool(self):
@@ -111,7 +111,7 @@ class TestDebugIssueTool:
def test_tool_metadata(self, tool):
"""Test tool metadata"""
assert tool.get_name() == "debug_issue"
assert tool.get_name() == "debug"
assert "DEBUG & ROOT CAUSE ANALYSIS" in tool.get_description()
assert tool.get_default_temperature() == 0.2
@@ -232,8 +232,8 @@ class TestAbsolutePathValidation:
assert "../parent/file.py" in response["content"]
@pytest.mark.asyncio
async def test_debug_issue_tool_relative_path_rejected(self):
"""Test that debug_issue tool rejects relative paths"""
async def test_debug_tool_relative_path_rejected(self):
"""Test that debug tool rejects relative paths"""
tool = DebugIssueTool()
result = await tool.execute(
{