mcpCustomizationController.ts ×7

Frontier kind: Code frontier

unlabeled · c_5310f7ee170a

28 tests · 23875 LOC · 122 files · introduces 0 tests · 20 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges20 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2243 ranges23875 lines · 122 files · Browse complete extent
All tests (intent)
28 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 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/shared/mcpCustomizationController.ts 20 introduced LOC · 7 ranges

Open complete file

305
306 private _applyOne(server: ISdkMcpServer, tx: ITransaction): void {
307 > const previous = this._live.get().get(server.name); mcpCustomizationController.ts
308 > const state = this._stateForUpdate(previous?.state, server.state);
309 > const enabled = server.enabled ?? previous?.enabled ?? true;
310 > // Once promoted to a top-level entry, stay top-level for the
311 > // session — flipping back to a child mid-stream would orphan the
312 > // previously-published top-level id.
313 > let topLevelId = previous?.topLevelId;
314 > if (topLevelId === undefined) {
315 > const childId = this._options.resolveChildId(server.name);
316 > if (childId !== undefined) {
317 this._setLiveEntry(server.name, { serverName: server.name, state, enabled, topLevelId: undefined }, tx);
318 this._options.emit({
377 /** Immutable upsert into the {@link _live} observable. */
378 private _setLiveEntry(serverName: string, entry: ILiveEntry, tx: ITransaction): void {
379 > const next = new Map(this._live.get()); mcpCustomizationController.ts
380 > next.set(serverName, entry);
381 > this._live.set(next, tx);
382 > }
383
384 /** Immutable delete from the {@link _live} observable. */
394
395 private _stateForUpdate(previous: McpServerState | undefined, next: McpServerState): McpServerState {
396 > if (previous?.kind === McpServerStatus.AuthRequired && next.kind === McpServerStatus.Starting) { mcpCustomizationController.ts
397 return previous;
398 }
399 > return next; mcpCustomizationController.ts
400 > }
401
402 private _mintTopLevelId(serverName: string): string {
405
406 private _buildChannel(serverName: string, state: McpServerState): string | undefined {
407 > if (state.kind !== McpServerStatus.Ready) { mcpCustomizationController.ts
408 return undefined;
409 }
410 return buildMcpChannel(this._options.providerId, this._options.sessionId, serverName);
412
413 private _buildTopLevel(id: string, serverName: string, state: McpServerState, enabled: boolean): McpServerCustomization {