From 953e32ef97865f74e0d465b721dcbdacfbe28ab9 Mon Sep 17 00:00:00 2001 From: Tai Lai Date: Fri, 28 Mar 2025 18:29:18 -0700 Subject: [PATCH] fix(chat): fsRead doesn't show readRange --- .../core/src/codewhispererChat/tools/fsRead.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/core/src/codewhispererChat/tools/fsRead.ts b/packages/core/src/codewhispererChat/tools/fsRead.ts index a078347dc3d..f3a89aa0403 100644 --- a/packages/core/src/codewhispererChat/tools/fsRead.ts +++ b/packages/core/src/codewhispererChat/tools/fsRead.ts @@ -53,7 +53,21 @@ export class FsRead { public queueDescription(updates: Writable): void { const fileName = path.basename(this.fsPath) const fileUri = vscode.Uri.file(this.fsPath) - updates.write(`Reading: [${fileName}](${fileUri})`) + updates.write(`Reading file: [${fileName}](${fileUri}), `) + + const [start, end] = this.readRange ?? [] + + if (start && end) { + updates.write(`from line ${start} to ${end}`) + } else if (start) { + if (start > 0) { + updates.write(`from line ${start} to end of file`) + } else { + updates.write(`${start} line from the end of file to end of file`) + } + } else { + updates.write('all lines') + } updates.end() }