copilotAgent.ts ×8

Frontier kind: Joint frontier

unlabeled · c_177114f53469

1 test · 51941 LOC · 300 files · introduces 1 test · 31 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges31 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
5062 ranges51941 lines · 300 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

2 files ranked by introduced lines: 31 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotAgent.ts 29 introduced LOC · 8 ranges

Open complete file

2598 backing = decodeProviderData(providerData);
2599 if (!backing) {
2600 > this._logService.warn(`[Copilot] materializeChat: dropping corrupt providerData for ${chatKey}`); copilotAgent.ts
2601 > return;
2602 > }
2603 } else {
2604 > // Legacy fallback: consult the agent's own pre-orchestrator catalog copilotAgent.ts
2605 > // once to recover the backing for sessions persisted before
2606 > // `providerData` existed.
2607 > const persisted = await this._readPersistedChats(URI.parse(chatInfo.session));
2608 > backing = persisted.get(chatInfo.chatId);
2609 > if (!backing) {
2610 return;
2611 }
2612 > } copilotAgent.ts
2613 this._chatBackings.set(chatKey, backing);
2614 }
3203 return new Map();
3204 }
3205 > try { copilotAgent.ts
3206 > const raw = await ref.object.getMetadata(CopilotAgent._META_CHATS);
3207 > if (!raw) {
3208 return new Map();
3209 }
3210 > const parsed = JSON.parse(raw) as Record<string, unknown>; copilotAgent.ts
3211 > const result = new Map<string, IPersistedChat>();
3212 > for (const [chatId, value] of Object.entries(parsed)) {
3213 > // The metadata blob is client-influenced and may be corrupted or
3214 > // tampered: drop entries that don't carry a usable SDK session id
3215 > // rather than letting an invalid id reach `client.deleteSession`.
3216 > if (!value || typeof value !== 'object') {
3217 continue;
3218 }
3219 > const { sdkSessionId, model } = value as { sdkSessionId?: unknown; model?: unknown }; copilotAgent.ts
3220 > if (typeof sdkSessionId !== 'string' || !sdkSessionId) {
3221 continue;
3222 }
3223 > result.set(chatId, { sdkSessionId, ...(model ? { model: model as ModelSelection } : {}) }); copilotAgent.ts
3224 > }
3225 > return result;
3226 > } catch (err) {
3227 this._logService.warn(`[Copilot] Failed to read persisted chats for ${session.toString()}: ${err instanceof Error ? err.message : String(err)}`);
3228 return new Map();
3229 > } finally { copilotAgent.ts
3230 > ref.dispose();
3231 > }
3232 }
3233
src/vs/platform/agentHost/node/agentPeerChats.ts 2 introduced LOC · 1 range

Open complete file

228 return { sdkSessionId, ...(validModel ? { model: validModel } : {}), ...(validSideChat ? { sideChat: validSideChat } : {}) };
229 } catch {
230 > return undefined; agentPeerChats.ts
231 > }
232 }
233