agentSideEffects.ts ×8

Frontier kind: Code frontier

unlabeled · c_dfa27f286ab9

81 tests · 42736 LOC · 237 files · introduces 0 tests · 23 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges23 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4096 ranges42736 lines · 237 files · Browse complete extent
All tests (intent)
81 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 23 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentSideEffects.ts 23 introduced LOC · 8 ranges

Open complete file

662 }
663 }
665 if (action.type === ActionType.ChatToolCallStart && agent) {
666 this._toolCallAgents.set(`${sessionKey}:${action.toolCallId}`, agent.id);
671 this._toolCallTracker.toolCallStarted(agent.id, sessionKey, action.toolCallId, action.toolName, action.contributor);
672 }
674 const sessionUri = isAhpChatChannel(sessionKey) ? parseRequiredSessionUriFromChatUri(sessionKey) : sessionKey;
675
683 action = { ...action, _meta: { ...action._meta, subagentChatUri: buildSubagentChatUri(sessionUri, action.toolCallId) } };
684 }
686 > // When a parent tool call has an associated subagent session,
687 > // preserve the subagent content metadata in the completion result.
688 > // The SDK's tool_complete provides its own content which would
689 > // overwrite the ToolResultSubagentContent that was set via
690 > // ChatToolCallContentChanged while running.
691 > if (action.type === ActionType.ChatToolCallComplete) {
692 const subagent = this._subagentChats.get(sessionKey, action.toolCallId);
693 if (subagent) {
703 }
704 }
706 > this._stateManager.dispatchServerAction(sessionKey, action);
707 >
708 > // Mark first visible progress for TTFT telemetry
709 > if (action.type === ActionType.ChatDelta
710 > || action.type === ActionType.ChatResponsePart
711 || action.type === ActionType.ChatToolCallStart
712 || action.type === ActionType.ChatReasoning) {
713 this._turnTracker.markFirstProgress(sessionKey, turnId);
714 }
716 > if (action.type === ActionType.ChatToolCallComplete) {
717 // Emit `languageModelToolInvoked` telemetry for the completed tool
718 // call. `action.result` carries `success`/`error.code` even after the
731 }
732 }
734 > if (action.type === ActionType.ChatTurnComplete) {
735 this._turnTracker.turnCompleted(sessionKey, turnId, 'success');
736 this._toolCallTracker.clearSession(sessionKey);
737 this._runTurnCompleteSideEffects(sessionKey, turnId);
738 }
740 > if (action.type === ActionType.ChatTurnCancelled) {
741 this._turnTracker.turnCompleted(sessionKey, turnId, 'cancelled');
742 this._toolCallTracker.clearSession(sessionKey);
743 this._markSessionUnread(sessionUri);
744 }
746 > if (action.type === ActionType.ChatError) {
747 this._turnTracker.turnCompleted(sessionKey, turnId, 'error', { stage: 'provider', error: action.error });
748 this._toolCallTracker.clearSession(sessionKey);