Skip to content

Commit 9573ace

Browse files
authored
Fix followups going to participant ID (microsoft#209114)
Fix microsoft/vscode-copilot#4861
1 parent aa25485 commit 9573ace

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,13 @@ export class ChatWidget extends Disposable implements IChatWidget {
538538

539539
let msg = '';
540540
if (e.followup.agentId && e.followup.agentId !== this.chatAgentService.getDefaultAgent(this.location)?.id) {
541-
msg = `${chatAgentLeader}${e.followup.agentId} `;
541+
const agent = this.chatAgentService.getAgent(e.followup.agentId);
542+
if (!agent) {
543+
return;
544+
}
545+
546+
this.lastSelectedAgent = agent;
547+
msg = `${chatAgentLeader}${agent.name} `;
542548
if (e.followup.subCommand) {
543549
msg += `${chatSubcommandLeader}${e.followup.subCommand} `;
544550
}

0 commit comments

Comments
 (0)