copilotAgent.ts ×5

Frontier kind: Code frontier

unlabeled · c_370f14177d75

16 tests · 51474 LOC · 300 files · introduces 0 tests · 14 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges14 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4941 ranges51474 lines · 300 files · Browse complete extent
All tests (intent)
16 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: 14 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotAgent.ts 14 introduced LOC · 5 ranges

Open complete file

2089 if (this._provisionalSessions.has(context.sessionId)) {
2090 entry = await this._materializeProvisional(context.sessionId, workingDirectory);
2091 > } else { copilotAgent.ts
2092 entry = this._getChatContext(chat).target;
2093 }
2095 > // If the active client's config changed (tools or plugins),
2096 > // dispose this session so it gets resumed with the updated config.
2097 > const activeClient = this._activeClients.get(context.session);
2098 > const hadCachedEntry = !!entry;
2099 this._logService.info(`[Copilot:${context.sessionId}] sendMessage: cachedEntry=${hadCachedEntry}, hasActiveClient=${!!activeClient}, activeClientId=${activeClient ? '(set)' : '(none)'}`);
2100 if (entry && activeClient && await activeClient.requiresRestart(entry.appliedSnapshot)) {
2105 entry = undefined;
2106 }
2108 > if (!entry) {
2109 this._logService.info(`[Copilot:${context.sessionId}] No cached entry${hadCachedEntry ? ' (was evicted by requiresRestart)' : ''}, calling _resumeSession`);
2110 }
2111 > entry ??= await this._resumeSession(context.sessionId); copilotAgent.ts
2112
2113 // Reset per-turn streaming state on the session so that the
2117 entry.resetTurnState(turnId, senderClientId);
2118 }
2120 > try {
2121 > const sdkMode = this._resolveSdkMode(context.session);
2122 > await entry.send(prompt, attachments, turnId, sdkMode, senderClientId);
2123 > } catch (err) {
2124 const errCode = (err as { code?: number })?.code;
2125 const errMsg = err instanceof Error ? err.message : String(err);