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:
tanzhenxin 2026-03-20 11:02:59 +08:00
parent 9d6aca8efe
commit 9824e395a8
7 changed files with 62 additions and 73 deletions

View file

@ -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'