Skip to content

Commit 953e32e

Browse files
committed
fix(chat): fsRead doesn't show readRange
1 parent d9620cf commit 953e32e

File tree

1 file changed

+15
-1
lines changed
  • packages/core/src/codewhispererChat/tools

1 file changed

+15
-1
lines changed

packages/core/src/codewhispererChat/tools/fsRead.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,21 @@ export class FsRead {
5353
public queueDescription(updates: Writable): void {
5454
const fileName = path.basename(this.fsPath)
5555
const fileUri = vscode.Uri.file(this.fsPath)
56-
updates.write(`Reading: [${fileName}](${fileUri})`)
56+
updates.write(`Reading file: [${fileName}](${fileUri}), `)
57+
58+
const [start, end] = this.readRange ?? []
59+
60+
if (start && end) {
61+
updates.write(`from line ${start} to ${end}`)
62+
} else if (start) {
63+
if (start > 0) {
64+
updates.write(`from line ${start} to end of file`)
65+
} else {
66+
updates.write(`${start} line from the end of file to end of file`)
67+
}
68+
} else {
69+
updates.write('all lines')
70+
}
5771
updates.end()
5872
}
5973

0 commit comments

Comments
 (0)