From 0bbc0dfa8c245705aa72e811796158df82f503c6 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 29 Oct 2025 12:26:15 -0700 Subject: [PATCH 1/2] fix tool call parsing --- .../vscode-node/copilotCloudSessionContentBuilder.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts b/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts index 7e16c0f5cc..895bc54d5c 100644 --- a/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts +++ b/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts @@ -571,6 +571,8 @@ export class ChatSessionContentBuilder { } case 'str_replace': return buildStrReplaceDetails(args.path); + case 'edit': + return buildEditDetails(args.path, 'edit', undefined, { defaultName: 'Edit' }); case 'create': return buildCreateDetails(args.path); case 'view': @@ -590,6 +592,9 @@ export class ChatSessionContentBuilder { return { toolName: 'read_bash', invocationMessage: 'Read logs from Bash session' }; case 'stop_bash': return { toolName: 'stop_bash', invocationMessage: 'Stop Bash session' }; + case 'run_custom_setup_step': + case 'run_setup': + return { toolName: 'run_custom_setup_step', invocationMessage: content || 'Run custom setup step' }; default: return { toolName: name || 'unknown', invocationMessage: content || name || 'unknown' }; } From b679fff51003fd0f275284a09c076888fb6794af Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 29 Oct 2025 13:19:15 -0700 Subject: [PATCH 2/2] fix create file tool call rendering --- .../copilotCloudSessionContentBuilder.ts | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts b/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts index 895bc54d5c..3b36680e08 100644 --- a/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts +++ b/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts @@ -480,17 +480,6 @@ export class ChatSessionContentBuilder { }; }; - const buildStrReplaceDetails = (filePath: string | undefined): ParsedToolCallDetails => { - const fileLabel = filePath && this.toFileLabel(filePath); - const message = fileLabel ? `Edit [](${fileLabel})` : `Edit ${filePath}`; - return { - toolName: 'Edit', - invocationMessage: message, - pastTenseMessage: message, - toolSpecificData: fileLabel ? { command: 'str_replace', filePath, fileLabel } : undefined - }; - }; - const buildCreateDetails = (filePath: string | undefined): ParsedToolCallDetails => { const fileLabel = filePath && this.toFileLabel(filePath); const message = fileLabel ? `Create [](${fileLabel})` : `Create File ${filePath}`; @@ -498,7 +487,7 @@ export class ChatSessionContentBuilder { toolName: 'Create', invocationMessage: message, pastTenseMessage: message, - toolSpecificData: fileLabel ? { command: 'create', filePath, fileLabel } : undefined + toolSpecificData: fileLabel ? { command: 'edit', filePath, fileLabel, viewRange: undefined } : undefined }; }; @@ -570,8 +559,6 @@ export class ChatSessionContentBuilder { return buildEditDetails(args.path, args.command || 'edit', this.parseRange(args.view_range)); } case 'str_replace': - return buildStrReplaceDetails(args.path); - case 'edit': return buildEditDetails(args.path, 'edit', undefined, { defaultName: 'Edit' }); case 'create': return buildCreateDetails(args.path); @@ -595,6 +582,10 @@ export class ChatSessionContentBuilder { case 'run_custom_setup_step': case 'run_setup': return { toolName: 'run_custom_setup_step', invocationMessage: content || 'Run custom setup step' }; + case 'github-mcp-server-search_code': + return { toolName: 'github-mcp-server-search_code', invocationMessage: 'Search code on GitHub' }; + case 'code_review': + return { toolName: 'code_review', invocationMessage: 'Review changes with Copilot code review' }; default: return { toolName: name || 'unknown', invocationMessage: content || name || 'unknown' }; }