claudeAgentSession.ts ×3

Frontier kind: Code frontier

unlabeled · c_fb6f3d0823f8

9 tests · 56278 LOC · 346 files · introduces 0 tests · 39 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges39 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5589 ranges56278 lines · 346 files · Browse complete extent
All tests (intent)
9 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: 39 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/claudeAgentSession.ts 36 introduced LOC · 3 ranges

Open complete file

1008 */
1009 async getSessionCustomizations(): Promise<readonly Customization[]> {
1010 > const { synced } = this.clientCustomizationsDiff.model.state.get(); claudeAgentSession.ts
1011 > const userHome = this._environmentService.userHome;
1012 > const [discovered, rules, mcpServers, hooks, nativePlugins] = await Promise.all([
1013 > scanClaudeDiskCustomizations(this.workingDirectory, userHome, this._fileService),
1014 > scanClaudeRules(this.workingDirectory, userHome, this._fileService),
1015 > scanClaudeMcpServers(this.workingDirectory, userHome, this._fileService),
1016 > scanClaudeHooks(this.workingDirectory, userHome, this._fileService),
1017 > scanClaudeNativePlugins(this.workingDirectory, userHome, this._fileService, this._logService),
1018 > ]);
1019 >
1020 > // Post-materialize, the live SDK snapshot filters the disk set down to
1021 > // what the session actually loaded (and surfaces SDK-only items as
1022 > // non-editable). Pre-materialize there is no Query, so the full disk
1023 > // set is shown. A transient SDK read failure leaves `sdk` undefined,
1024 > // falling back to the unfiltered disk set rather than blanking the UI.
1025 > let sdk: ISdkResolvedCustomizations | undefined;
1026 > if (this._pipeline) {
1027 try {
1028 sdk = await this._pipeline.snapshotResolvedCustomizations();
1031 }
1032 }
1034 > // `buildDiscoveredCustomizations` also folds in the read-only "Built-in"
1035 > // surfacing (curated pre-materialize, SDK-derived post-materialize) for
1036 > // both agents and skills, so the SDK-vs-curated decision lives in one place.
1037 > const discoveredCustomizations = buildDiscoveredCustomizations([...discovered, ...rules], mcpServers, hooks, nativePlugins, this.workingDirectory, userHome, sdk);
1038 >
1039 > // Final projection: the client-pushed tier first, then the discovered
1040 > // tier, with session MCP enablement applied to both.
1041 > const state = this._sessionCustomizations;
1042 > const desiredById = new Map(state.map(customization => [customization.id, customization.enabled]));
1043 > const result: Customization[] = synced.map(item => ({
1044 ...item.customization,
1045 enabled: desiredById.get(item.customization.id) ?? item.customization.enabled,
1046 > })); claudeAgentSession.ts
1047 > result.push(...discoveredCustomizations);
1048 > // Cache for the MCP-contributor signal enrichment (see
1049 > // {@link _enrichSignalWithMcpContributor}).
1050 > const projected = applyMcpServerEnablement(result, state);
1051 > this._lastCustomizations = projected;
1052 > return projected;
1053 > }
1054
1055 private async _reconcileMcpServerEnablement(): Promise<void> {
src/vs/platform/agentHost/node/claude/claudeAgent.ts 3 introduced LOC · 1 range

Open complete file

2237
2238 async getSessionCustomizations(session: URI): Promise<readonly Customization[]> {
2239 > const sess = this._findAnySession(AgentSession.id(session)); claudeAgent.ts
2240 > return sess ? await sess.getSessionCustomizations() : [];
2241 > }
2242
2243 async startMcpServer(session: URI, id: string): Promise<void> {