Skip to content

Commit

Permalink
Fix followups going to participant ID (#209114)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Mar 30, 2024
1 parent e4595ad commit 54ec07e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vs/workbench/contrib/chat/browser/chatWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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} `;
}
Expand Down

0 comments on commit 54ec07e

Please sign in to comment.