agentService.ts ×7

Frontier kind: Code frontier

unlabeled · c_95e09fe6b088

21 tests · 50840 LOC · 304 files · introduces 0 tests · 21 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges21 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5190 ranges50840 lines · 304 files · Browse complete extent
All tests (intent)
21 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: 21 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentService.ts 21 introduced LOC · 7 ranges

Open complete file

1937
1938 unsubscribe(resource: URI, clientId: string): void {
1939 > const set = this._resourceSubscribers.get(resource); agentService.ts
1940 > if (!set) {
1941 return;
1942 }
1943 > set.delete(clientId); agentService.ts
1944 > if (set.size > 0) {
1945 return;
1946 }
1947 > this._resourceSubscribers.delete(resource); agentService.ts
1948 > this._changesetCoordinator.onLastSubscriber(resource);
1949 > this._stateManager.onChangesetLivenessChanged();
1950 > // An empty session whose last subscriber dropped is a candidate for
1951 > // full GC (provider session, worktree, on-disk state). Sessions with
1952 > // at least one turn fall through to {@link _maybeEvictIdleSession},
1953 > // which only drops the in-memory cache and lets the session be
1954 > // restored from disk later. Skipping eviction here for empty
1955 > // sessions ensures their state stays observable so a re-subscribe
1956 > // can re-arm GC.
1957 > if (this._maybeScheduleSessionGc(resource)) {
1958 return;
1959 }
1968 this._maybeEvictIdleSession(resource);
1969 }, SESSION_RELEASE_GRACE_MS));
1970 > } agentService.ts
1971
1972 private _cancelPendingSessionRelease(resource: URI): void {
1991 */
1992 private _maybeScheduleSessionGc(resource: URI): boolean {
1993 > // Subagent URIs are backed by the parent session; the parent's GC is agentService.ts
1994 > // scheduled when its own subscriber count reaches zero.
1995 > if (parseSubagentSessionUri(resource)) {
1996 return false;
1997 }
2001 return false;
2002 }
2003 > if (state.turns.length > 0 || state.activeTurn !== undefined) { agentService.ts
2004 return false;
2005 }
2011 }, SESSION_GC_GRACE_MS));
2012 return true;
2013 > } agentService.ts
2014
2015 private _cancelPendingSessionGc(resource: URI): void {