664
665
if (action.type === ActionType.ChatToolCallStart && agent) {
666
>
this._toolCallAgents.set(`${sessionKey}:${action.toolCallId}`, agent.id);
agentSideEffects.ts
667
>
// Stamp the tool call start for `languageModelToolInvoked` telemetry.
668
>
// Only the start action carries the tool name and contributor, so the
669
>
// source kind must be captured here rather than on completion. The
670
>
// provider comes from the agent that emitted the signal.
671
>
this._toolCallTracker.toolCallStarted(agent.id, sessionKey, action.toolCallId, action.toolName, action.contributor);
672
>
}
673
674
const sessionUri = isAhpChatChannel(sessionKey) ? parseRequiredSessionUriFromChatUri(sessionKey) : sessionKey;