From 9a2716e2fbb7e00f983d4e2fe35af9cd2bfc37f3 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 19 Mar 2024 11:41:23 -0300 Subject: [PATCH] Fix chat participant icons (#207652) * Fix chat participant icons * Update test --- src/vs/workbench/contrib/chat/common/chatAgents.ts | 2 +- .../common/__snapshots__/Chat_can_serialize.1.snap | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/chat/common/chatAgents.ts b/src/vs/workbench/contrib/chat/common/chatAgents.ts index 5815a725469..d810ee64f8d 100644 --- a/src/vs/workbench/contrib/chat/common/chatAgents.ts +++ b/src/vs/workbench/contrib/chat/common/chatAgents.ts @@ -218,7 +218,7 @@ export class ChatAgentService extends Disposable implements IChatAgentService { { extensionId: p.extensionId, id: p.name, - metadata: { description: p.description }, + metadata: this._agents.has(p.name) ? this._agents.get(p.name)!.data.metadata : { description: p.description }, isDefault: p.isDefault, defaultImplicitVariables: p.defaultImplicitVariables, locations: isNonEmptyArray(p.locations) ? p.locations.map(ChatAgentLocation.fromRaw) : [ChatAgentLocation.Panel], diff --git a/src/vs/workbench/contrib/chat/test/common/__snapshots__/Chat_can_serialize.1.snap b/src/vs/workbench/contrib/chat/test/common/__snapshots__/Chat_can_serialize.1.snap index dfc16b58de3..74a5d9c88f7 100644 --- a/src/vs/workbench/contrib/chat/test/common/__snapshots__/Chat_can_serialize.1.snap +++ b/src/vs/workbench/contrib/chat/test/common/__snapshots__/Chat_can_serialize.1.snap @@ -22,7 +22,11 @@ }, agent: { id: "ChatProviderWithUsedContext", - metadata: { description: undefined } + metadata: { + description: undefined, + requester: { name: "test" }, + fullName: "test" + } } }, { @@ -54,7 +58,11 @@ value: "nullExtensionDescription", _lower: "nullextensiondescription" }, - metadata: { description: undefined }, + metadata: { + description: undefined, + requester: { name: "test" }, + fullName: "test" + }, slashCommands: [ ], locations: [ 1 ], isDefault: undefined