diff --git a/common/sessionParsing.ts b/common/sessionParsing.ts index 04ee9c647c..b144614e18 100644 --- a/common/sessionParsing.ts +++ b/common/sessionParsing.ts @@ -204,6 +204,19 @@ export function parseToolCallDetails( } : undefined }; } + } else if (name === 'view') { + const filePath = args.path; + const fileLabel = filePath && toFileLabel(filePath); + return { + toolName: fileLabel === '' ? 'Read repository' : 'Read', + invocationMessage: fileLabel ? `Read [](${fileLabel})` : 'Read repository', + pastTenseMessage: fileLabel ? `Read [](${fileLabel})` : 'Read repository', + toolSpecificData: fileLabel ? { + command: 'view', + filePath: filePath, + fileLabel: fileLabel + } : undefined + }; } else if (name === 'think') { return { toolName: 'Thought', diff --git a/src/github/copilotRemoteAgent/chatSessionContentBuilder.ts b/src/github/copilotRemoteAgent/chatSessionContentBuilder.ts index 58e6a4b086..67a869fe2b 100644 --- a/src/github/copilotRemoteAgent/chatSessionContentBuilder.ts +++ b/src/github/copilotRemoteAgent/chatSessionContentBuilder.ts @@ -291,7 +291,7 @@ export class ChatSessionContentBuilder { if ( choice.finish_reason === 'tool_calls' && delta.tool_calls?.length && - delta.tool_calls[0].function.name === 'run_custom_setup_step' + (delta.tool_calls[0].function.name === 'run_custom_setup_step' || delta.tool_calls[0].function.name === 'run_setup') ) { const toolCall = delta.tool_calls[0]; let args: { name?: string } = {};