copilotAgentSession.ts ×8

Frontier kind: Code frontier

unlabeled · c_8283ae7d9097

5 tests · 43910 LOC · 243 files · introduces 0 tests · 20 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges20 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4043 ranges43910 lines · 243 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: 20 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts 20 introduced LOC · 8 ranges

Open complete file

1576 // Skills can be passed as is to the runtime.
1577 if (runtimeSlashCommand && runtimeSlashCommand.kind !== 'skill') {
1578 > let result: CopilotCommandInvocationResult; copilotAgentSession.ts
1579 > try {
1580 > result = await this._wrapper.session.rpc.commands.invoke({
1581 > name: runtimeSlashCommand.name,
1582 > ...(slashCommand.rawRest.length > 0 ? { input: slashCommand.rawRest } : {}),
1583 > });
1584 > } catch (err) {
1585 this._logService.error(err, `[Copilot:${this.sessionId}] rpc.commands.invoke(${slashCommand.command}) failed`);
1586 throw err;
1587 }
1588 > switch (result.kind) { copilotAgentSession.ts
1589 > case 'text':
1590 this._emitMarkdownDelta(result.markdown === true ? result.text : escapeMarkdownSyntaxTokens(result.text));
1591 break;
1592 > case 'completed': copilotAgentSession.ts
1593 if (result.message) {
1594 this._emitMarkdownDelta(result.message);
1595 }
1596 break;
1597 > case 'agent-prompt': { copilotAgentSession.ts
1598 const runtimeMode = toCopilotSdkMode(result.mode);
1599 if (runtimeMode) {
1603 break;
1604 }
1605 > case 'select-subcommand': copilotAgentSession.ts
1606 this._emitMarkdownDelta(localize(
1607 'copilotSlashCommand.selectSubcommandResult',
1611 ));
1612 break;
1613 > default: copilotAgentSession.ts
1614 // The runtime can be newer than these compiled SDK types, so an
1615 // unknown kind must be logged rather than silently swallowed (the
1617 this._logService.warn(`[Copilot:${this.sessionId}] Unhandled slash command result kind: ${(result as { kind: string }).kind}`);
1618 break;
1620 > if (result.runtimeSettingsChanged === true) {
1621 this._slashCommandProvider.clearCache();
1622 }
1623 > if (result.kind !== 'agent-prompt') { copilotAgentSession.ts
1624 > this._completeActiveTurn();
1625 > return;
1626 > }
1627 > }
1628 }
1629