Skip to content

Commit ec6406b

Browse files
authored
Let built-in chat participants share metadata (#284636)
So we can find the response ID in order to restore Turns Fix #272987
1 parent 2e6cfee commit ec6406b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/api/common/extHostChatAgents2.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ export class ExtHostChatAgents2 extends Disposable implements ExtHostChatAgentsS
721721

722722
for (const h of context.history) {
723723
const ehResult = typeConvert.ChatAgentResult.to(h.result);
724-
const result: vscode.ChatResult = agentId === h.request.agentId ?
724+
const result: vscode.ChatResult = agentId === h.request.agentId || (isBuiltinParticipant(h.request.agentId) && isBuiltinParticipant(agentId)) ?
725725
ehResult :
726726
{ ...ehResult, metadata: undefined };
727727

@@ -1122,3 +1122,7 @@ function raceCancellationWithTimeout<T>(cancelWait: number, promise: Promise<T>,
11221122
promise.then(resolve, reject).finally(() => ref.dispose());
11231123
});
11241124
}
1125+
1126+
function isBuiltinParticipant(agentId: string): boolean {
1127+
return agentId.startsWith('github.copilot');
1128+
}

0 commit comments

Comments
 (0)