mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Make several changes to guide the model to request absolute paths, reducing frequent accidental relative path tool call failures. - Switch the parameter name: path --> absolute_path. - Update the tool definition to strongly require an absolute path. - Update the system prompt to indicate absolute paths are required. - Update the system prompt tool use examples to use absolute paths. Test case: Open GC in GC: "Locate the primary file calling genai" - Expected: Model opens files with absolute path, successfully. - Actual (pre-patch): Failure, attempts to read with relative path. - Actual (post-patch): Success, attempts to read with absolute path.
This commit is contained in:
@@ -34,7 +34,7 @@ The core comes with a suite of pre-defined tools, typically found in `packages/c
|
||||
|
||||
- **File System Tools:**
|
||||
- `LSTool` (`ls.ts`): Lists directory contents.
|
||||
- `ReadFileTool` (`read-file.ts`): Reads the content of a single file.
|
||||
- `ReadFileTool` (`read-file.ts`): Reads the content of a single file. It takes an `absolute_path` parameter, which must be an absolute path.
|
||||
- `WriteFileTool` (`write-file.ts`): Writes content to a file.
|
||||
- `GrepTool` (`grep.ts`): Searches for patterns in files.
|
||||
- `GlobTool` (`glob.ts`): Finds files matching glob patterns.
|
||||
|
||||
Reference in New Issue
Block a user