add absolute file path description for windows (#12007)

This commit is contained in:
Gaurav Sehgal
2025-10-27 09:47:13 +05:30
committed by GitHub
parent ee66732ad2
commit 2fa13420ae
4 changed files with 88 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import * as Diff from 'diff';
import process from 'node:process';
import type {
ToolCallConfirmationDetails,
ToolEditConfirmationDetails,
@@ -504,7 +505,9 @@ Expectation for required parameters:
properties: {
file_path: {
description:
"The absolute path to the file to modify. Must start with '/'.",
process.platform === 'win32'
? "The absolute path to the file to modify (e.g., 'C:\\Users\\project\\file.txt'). Must be an absolute path."
: "The absolute path to the file to modify (e.g., '/home/user/project/file.txt'). Must start with '/'.",
type: 'string',
},
old_string: {