mapSessionEvents.ts ×8

Frontier kind: Code frontier

unlabeled · c_93fd3f25aae6

5 tests · 33177 LOC · 175 files · introduces 0 tests · 27 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges27 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2905 ranges33177 lines · 175 files · Browse complete extent
All tests (intent)
5 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: 27 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/mapSessionEvents.ts 27 introduced LOC · 8 ranges

Open complete file

272 for (const e of events) {
273 if (e.type === 'subagent.started') {
274 > if (e.agentId) { mapSessionEvents.ts
275 parentToolCallIdByAgentId.set(e.agentId, e.data.toolCallId);
276 }
278 if (e.type === 'tool.execution_complete') {
279 completionsByCallId.set(e.data.toolCallId, e.data);
345
346 const flushSubagent = (parentToolCallId: string): void => {
347 > const builder = subagentBuilders.get(parentToolCallId); mapSessionEvents.ts
348 > if (!builder) {
349 subagentTurnStates.delete(parentToolCallId);
350 return;
352 subagentBuilders.delete(parentToolCallId);
353 const state = subagentTurnStates.get(parentToolCallId) ?? TurnState.Complete;
354 > subagentTurnStates.delete(parentToolCallId); mapSessionEvents.ts
355 > if (builder.responseParts.length === 0) {
356 return;
357 }
358 const list = subagentTurns.get(parentToolCallId) ?? [];
359 > list.push(finalizeTurn(builder, state)); mapSessionEvents.ts
360 > subagentTurns.set(parentToolCallId, list);
361 > };
362
363 const ensureSubagentBuilder = (parentToolCallId: string): ITurnBuilder => {
508 }
509 case 'subagent.started': {
510 > const d = e.data; mapSessionEvents.ts
511 > subagentInfoByToolCallId.set(d.toolCallId, {
512 > agentName: d.agentName,
513 > agentDisplayName: d.agentDisplayName,
514 > agentDescription: d.agentDescription,
515 > });
516 > break;
517 > }
518 case 'tool.execution_start': {
519 const parentToolCallId = resolveParentToolCallId(e.agentId, e.data.parentToolCallId);
560 // flush the subagent's accumulated turn.
561 if (!parentToolCallId && subagentInfoByToolCallId.has(d.toolCallId)) {
562 > flushSubagent(d.toolCallId); mapSessionEvents.ts
563 > }
564 break;
565 }
783
784 if (subagent) {
785 > content.push({ mapSessionEvents.ts
786 > type: ToolResultContentType.Subagent,
787 > resource: buildSubagentSessionUri(sessionUriStr, d.toolCallId),
788 > title: subagent.agentDisplayName,
789 > agentName: subagent.agentName,
790 > description: subagent.agentDescription,
791 > });
792 > }
793
794 const mcpServerName = info.mcpServerName ?? readStringProperty(d, 'mcpServerName');