fix: update ChatToolInvocation to use chatStreamToolCallId if available, to align tool ids in core and the extension.

This commit is contained in:
Henning Dieterichs
2026-03-18 16:16:33 +01:00
committed by Henning Dieterichs
parent fb15457929
commit b42442a4d0

View File

@@ -583,7 +583,7 @@ export class LanguageModelToolsService extends Disposable implements ILanguageMo
toolInvocation.transitionFromStreaming(preparedInvocation, dto.parameters, autoConfirmed);
} else {
// Create a new tool invocation (no streaming phase)
toolInvocation = new ChatToolInvocation(preparedInvocation, tool.data, dto.callId, dto.subAgentInvocationId, dto.parameters);
toolInvocation = new ChatToolInvocation(preparedInvocation, tool.data, dto.chatStreamToolCallId ?? dto.callId, dto.subAgentInvocationId, dto.parameters);
if (autoConfirmed) {
IChatToolInvocation.confirmWith(toolInvocation, autoConfirmed);
}