copilotAgent.ts ×8

Frontier kind: Code frontier

unlabeled · c_9f2024bc33c7

2 tests · 51366 LOC · 300 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)
4900 ranges51366 lines · 300 files · Browse complete extent
All tests (intent)
2 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/copilotAgent.ts 20 introduced LOC · 8 ranges

Open complete file

2637 */
2638 private async _resolveChatBacking(session: URI, chat: URI): Promise<IPersistedChat | undefined> {
2639 > const chatKey = chat.toString(); copilotAgent.ts
2640 > const live = this._chatBackings.get(chatKey);
2641 > if (live) {
2642 return live;
2643 }
2666 return existing;
2667 }
2668 > const parsed = parseChatUri(chat); copilotAgent.ts
2669 > if (!parsed) {
2670 return undefined;
2671 }
2672 > const sessionId = AgentSession.id(session); copilotAgent.ts
2673 > return this._sessionSequencer.queue(sessionId, async () => {
2674 > const again = this._findPeerChat(session, chat);
2675 > if (again) {
2676 return again;
2677 }
2678 > const info = await this._resolveChatBacking(session, chat); copilotAgent.ts
2679 > if (!info) {
2680 return undefined;
2681 }
2683 const workingDirectory = parentEntry?.workingDirectory
2684 ?? this._provisionalSessions.get(sessionId)?.workingDirectory;
2685 > if (!workingDirectory) { copilotAgent.ts
2686 this._logService.warn(`[Copilot] Cannot resume chat ${chatKey}: missing working directory`);
2687 return undefined;
2701 shellManager,
2702 githubToken: this._githubToken,
2703 > fallback: { model: info.model, longContextWindow: this._longContextWindowFor(info.model?.id), freeLongContext: this._isFreeLongContext(info.model?.id) }, copilotAgent.ts
2704 > };
2705 > let agentSession: CopilotAgentSession | undefined;
2706 > try {
2707 > agentSession = this._createAgentSession(launchPlan, workingDirectory, activeClient, { sessionUri: session, chatChannelUri: chat });
2708 > await agentSession.initializeSession();
2709 this._ensureEntry(sessionId).registerPeerChat(chatKey, new CopilotSessionEntry(agentSession));
2710 this._logService.info(`[Copilot] Resumed additional chat ${chatKey} in session ${session.toString()}`);