agentHostChangesetSubscriptionService.ts ×6

Frontier kind: Code frontier

unlabeled · c_161812d2ccb4

498 tests · 19170 LOC · 86 files · introduces 0 tests · 58 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges58 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1755 ranges19170 lines · 86 files · Browse complete extent
All tests (intent)
498 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.

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

src/vs/platform/agentHost/common/agentHostChangesetSubscriptionService.ts 38 introduced LOC · 1 range

Open complete file

1 > /*--------------------------------------------------------------------------------------------- agentHostChangesetSubscriptionService.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import type { URI as ProtocolURI } from './state/sessionState.js';
7 > import { createDecorator } from '../../instantiation/common/instantiation.js';
8 >
9 > export const IAgentHostChangesetSubscriptionService = createDecorator<IAgentHostChangesetSubscriptionService>('agentHostChangesetSubscriptionService');
10 >
11 > /**
12 > * Shared changeset subscription registry. The coordinator records subscription
13 > * lifecycle changes here; compute services read the current per-session set.
14 > */
15 > export interface IAgentHostChangesetSubscriptionService {
16 > readonly _serviceBrand: undefined;
17 >
18 > /**
19 > * Returns the set of changeset URIs currently subscribed for `session`.
20 > * Empty when the session has no active changeset subscribers.
21 > */
22 > getSessionSubscriptions(session: ProtocolURI): ReadonlySet<ProtocolURI>;
23 >
24 > /**
25 > * Adds `changeset` to the active subscription set for `session`.
26 > */
27 > addSubscription(session: ProtocolURI, changeset: ProtocolURI): void;
28 >
29 > /**
30 > * Removes `changeset` from the active subscription set for `session`.
31 > */
32 > removeSubscription(session: ProtocolURI, changeset: ProtocolURI): void;
33 >
34 > /**
35 > * Drops every active subscription for `session`.
36 > */
37 > clearSessionSubscriptions(session: ProtocolURI): void;
38 > }
src/vs/platform/agentHost/node/agentHostChangesetSubscriptionService.ts 20 introduced LOC · 6 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- agentHostChangesetSubscriptionService.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import type { URI as ProtocolURI } from '../common/state/sessionState.js';
7 > import { IAgentHostChangesetSubscriptionService } from '../common/agentHostChangesetSubscriptionService.js';
8 >
9 > const EMPTY_SUBSCRIPTIONS: ReadonlySet<ProtocolURI> = new Set<ProtocolURI>();
10 >
11 > export class AgentHostChangesetSubscriptionService implements IAgentHostChangesetSubscriptionService {
12 declare readonly _serviceBrand: undefined;
13
14 private readonly _subscriptions = new Map<ProtocolURI, Set<ProtocolURI>>();
16 > getSessionSubscriptions(session: ProtocolURI): ReadonlySet<ProtocolURI> {
17 return this._subscriptions.get(session) ?? EMPTY_SUBSCRIPTIONS;
18 }
20 > addSubscription(session: ProtocolURI, changeset: ProtocolURI): void {
21 let subscriptions = this._subscriptions.get(session);
22 if (!subscriptions) {
26 subscriptions.add(changeset);
27 }
29 > removeSubscription(session: ProtocolURI, changeset: ProtocolURI): void {
30 const subscriptions = this._subscriptions.get(session);
31 if (!subscriptions) {