mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
refactor(core): rename read_file parameter from absolute_path to file_path
This unifies the parameter naming convention across file-related tools (edit, write_file, read_file) to consistently use file_path. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
9d6aca8efe
commit
9824e395a8
7 changed files with 62 additions and 73 deletions
|
|
@ -594,12 +594,8 @@ function extractLocations(rawInput, toolCallResult) {
|
|||
|
||||
// Extract from rawInput - common path field names used by various tools
|
||||
if (rawInput && typeof rawInput === 'object') {
|
||||
// read_file, write_file use absolute_path
|
||||
if (typeof rawInput.absolute_path === 'string' && rawInput.absolute_path) {
|
||||
locations.push({ path: rawInput.absolute_path });
|
||||
}
|
||||
// edit tool uses file_path
|
||||
else if (typeof rawInput.file_path === 'string' && rawInput.file_path) {
|
||||
// read_file, write_file, edit tool use file_path
|
||||
if (typeof rawInput.file_path === 'string' && rawInput.file_path) {
|
||||
locations.push({ path: rawInput.file_path });
|
||||
}
|
||||
// some tools use just 'path'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue