fix: standardize file parameter naming across all tools

- Change `relevant_files` to `files` in debug_issue tool
- Change `reference_files` to `files` in think_deeper tool
- Now all tools consistently use `files` parameter name
- Fix cross-platform test for Windows path separators
- Update README to reflect consistent parameter naming

This improves API consistency and reduces confusion when using different tools.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Fahad
2025-06-09 06:14:18 +04:00
parent 9a5fc06bc4
commit 8871748c1b
4 changed files with 15 additions and 13 deletions

View File

@@ -289,7 +289,7 @@ All tools that work with files support **both individual files and entire direct
**`debug_issue`** - Debug with file context **`debug_issue`** - Debug with file context
- `error_description`: Description of the issue (required) - `error_description`: Description of the issue (required)
- `error_context`: Stack trace or logs - `error_context`: Stack trace or logs
- `relevant_files`: Files or directories related to the issue - `files`: Files or directories related to the issue
- `runtime_info`: Environment details - `runtime_info`: Environment details
- `previous_attempts`: What you've tried - `previous_attempts`: What you've tried
@@ -301,7 +301,7 @@ All tools that work with files support **both individual files and entire direct
- `current_analysis`: Your current thinking (required) - `current_analysis`: Your current thinking (required)
- `problem_context`: Additional context - `problem_context`: Additional context
- `focus_areas`: Specific aspects to focus on - `focus_areas`: Specific aspects to focus on
- `reference_files`: Files or directories for context - `files`: Files or directories for context
``` ```
"Use gemini to think deeper about my design with reference to the src/models/ directory" "Use gemini to think deeper about my design with reference to the src/models/ directory"

View File

@@ -87,7 +87,9 @@ class TestFileUtils:
assert "file1.py" in content assert "file1.py" in content
assert "file2.js" in content assert "file2.js" in content
assert "readme.md" in content assert "readme.md" in content
assert "src/module.py" in content # Handle both forward and backslashes for cross-platform compatibility
assert "module.py" in content
assert "class Module: pass" in content
# Check content # Check content
assert "print('file1')" in content assert "print('file1')" in content

View File

@@ -22,7 +22,7 @@ class DebugIssueRequest(ToolRequest):
error_context: Optional[str] = Field( error_context: Optional[str] = Field(
None, description="Stack trace, logs, or additional error context" None, description="Stack trace, logs, or additional error context"
) )
relevant_files: Optional[List[str]] = Field( files: Optional[List[str]] = Field(
None, description="Files or directories that might be related to the issue" None, description="Files or directories that might be related to the issue"
) )
runtime_info: Optional[str] = Field( runtime_info: Optional[str] = Field(
@@ -60,10 +60,10 @@ class DebugIssueTool(BaseTool):
"type": "string", "type": "string",
"description": "Stack trace, logs, or additional error context", "description": "Stack trace, logs, or additional error context",
}, },
"relevant_files": { "files": {
"type": "array", "type": "array",
"items": {"type": "string"}, "items": {"type": "string"},
"description": "Files that might be related to the issue", "description": "Files or directories that might be related to the issue",
}, },
"runtime_info": { "runtime_info": {
"type": "string", "type": "string",
@@ -115,8 +115,8 @@ class DebugIssueTool(BaseTool):
) )
# Add relevant files if provided # Add relevant files if provided
if request.relevant_files: if request.files:
file_content, _ = read_files(request.relevant_files) file_content, _ = read_files(request.files)
context_parts.append( context_parts.append(
f"\n=== RELEVANT CODE ===\n{file_content}\n=== END CODE ===" f"\n=== RELEVANT CODE ===\n{file_content}\n=== END CODE ==="
) )

View File

@@ -26,7 +26,7 @@ class ThinkDeeperRequest(ToolRequest):
None, None,
description="Specific aspects to focus on (architecture, performance, security, etc.)", description="Specific aspects to focus on (architecture, performance, security, etc.)",
) )
reference_files: Optional[List[str]] = Field( files: Optional[List[str]] = Field(
None, description="Optional file paths or directories for additional context" None, description="Optional file paths or directories for additional context"
) )
@@ -63,10 +63,10 @@ class ThinkDeeperTool(BaseTool):
"items": {"type": "string"}, "items": {"type": "string"},
"description": "Specific aspects to focus on (architecture, performance, security, etc.)", "description": "Specific aspects to focus on (architecture, performance, security, etc.)",
}, },
"reference_files": { "files": {
"type": "array", "type": "array",
"items": {"type": "string"}, "items": {"type": "string"},
"description": "Optional file paths for additional context", "description": "Optional file paths or directories for additional context",
}, },
"temperature": { "temperature": {
"type": "number", "type": "number",
@@ -105,8 +105,8 @@ class ThinkDeeperTool(BaseTool):
) )
# Add reference files if provided # Add reference files if provided
if request.reference_files: if request.files:
file_content, _ = read_files(request.reference_files) file_content, _ = read_files(request.files)
context_parts.append( context_parts.append(
f"\n=== REFERENCE FILES ===\n{file_content}\n=== END FILES ===" f"\n=== REFERENCE FILES ===\n{file_content}\n=== END FILES ==="
) )