Skip to content

Commit 265e5ec

Browse files
authored
Edit tool rendering (#1807)
1 parent 6b014c1 commit 265e5ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export class ChatSessionContentBuilder {
455455
};
456456
};
457457

458-
const buildEditDetails = (filePath: string | undefined, command: string, parsedRange: { start: number; end: number } | undefined, opts?: { defaultName?: string }): ParsedToolCallDetails => {
458+
const buildEditDetails = (filePath: string | undefined, command: string = 'edit', parsedRange: { start: number; end: number } | undefined, opts?: { defaultName?: string }): ParsedToolCallDetails => {
459459
const fileLabel = filePath && this.toFileLabel(filePath);
460460
const rangeSuffix = parsedRange ? `, lines ${parsedRange.start} to ${parsedRange.end}` : '';
461461
let invocationMessage: string;
@@ -573,7 +573,7 @@ export class ChatSessionContentBuilder {
573573
toolSpecificData: { command: 'view', filePath: fp, fileLabel: fl, viewRange: plainRange }
574574
};
575575
}
576-
return buildEditDetails(args.path, args.command || 'edit', this.parseRange(args.view_range));
576+
return buildEditDetails(args.path, args.command, this.parseRange(args.view_range));
577577
}
578578
case 'str_replace':
579579
return buildStrReplaceDetails(args.path);
@@ -596,6 +596,8 @@ export class ChatSessionContentBuilder {
596596
return { toolName: 'read_bash', invocationMessage: 'Read logs from Bash session' };
597597
case 'stop_bash':
598598
return { toolName: 'stop_bash', invocationMessage: 'Stop Bash session' };
599+
case 'edit':
600+
return buildEditDetails(args.path, args.command, undefined);
599601
default:
600602
return { toolName: name || 'unknown', invocationMessage: content || name || 'unknown' };
601603
}

0 commit comments

Comments
 (0)