From 54ec07e4325b868797ae6251b7082327c37da92f Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 29 Mar 2024 17:28:43 -0300 Subject: [PATCH] Fix followups going to participant ID (#209114) Fix microsoft/vscode-copilot#4861 --- src/vs/workbench/contrib/chat/browser/chatWidget.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/chatWidget.ts index 03f9bba346d41..47198878365f5 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWidget.ts @@ -538,7 +538,13 @@ export class ChatWidget extends Disposable implements IChatWidget { let msg = ''; if (e.followup.agentId && e.followup.agentId !== this.chatAgentService.getDefaultAgent(this.location)?.id) { - msg = `${chatAgentLeader}${e.followup.agentId} `; + const agent = this.chatAgentService.getAgent(e.followup.agentId); + if (!agent) { + return; + } + + this.lastSelectedAgent = agent; + msg = `${chatAgentLeader}${agent.name} `; if (e.followup.subCommand) { msg += `${chatSubcommandLeader}${e.followup.subCommand} `; }