claudeSessionCustomizationDiscovery.ts ×9

Frontier kind: Code frontier

unlabeled · c_515e030b7395

27 tests · 19590 LOC · 70 files · introduces 0 tests · 40 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges40 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2058 ranges19590 lines · 70 files · Browse complete extent
All tests (intent)
27 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: 40 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/customizations/claudeSessionCustomizationDiscovery.ts 40 introduced LOC · 9 ranges

Open complete file

118 */
119 export function mapDiscoveredCustomizations(
120 > discovered: readonly (IParsedAgent | IParsedSkill | IParsedRule)[], claudeSessionCustomizationDiscovery.ts
121 > mcpServers: readonly McpServerCustomization[],
122 > hooks: readonly HookCustomization[],
123 > nativePlugins: readonly IResolvedNativePlugin[],
124 > workingDirectory: URI | undefined,
125 > userHome: URI,
126 > ): readonly Customization[] {
127 > const buckets = new Map<ClaudeCustomizationScope, { agents: AgentCustomization[]; skills: SkillCustomization[]; rules: RuleCustomization[]; hooks: HookCustomization[] }>([
128 > [ClaudeCustomizationScope.Workspace, { agents: [], skills: [], rules: [], hooks: [] }],
129 > [ClaudeCustomizationScope.User, { agents: [], skills: [], rules: [], hooks: [] }],
130 > ]);
131 > for (const d of discovered) {
132 const bucket = buckets.get(scopeOf(d.uri, workingDirectory))!;
133 if (d.customization.type === CustomizationType.Agent) {
139 }
140 }
141 > // Hooks arrive already projected (one per declaring settings file); they claudeSessionCustomizationDiscovery.ts
142 > // carry no `IParsed*` wrapper, so attribute them to scope via their source
143 > // settings-file uri.
144 > for (const hook of hooks) {
145 buckets.get(scopeOf(URI.parse(hook.uri), workingDirectory))!.hooks.push(hook);
146 }
148 > const result: Customization[] = [];
149 > // Workspace containers first (precedence), then user. `base` is the scope
150 > // root the container `.claude/<sub>` uri is built from.
151 > const orderedScopes: readonly (readonly [ClaudeCustomizationScope, URI | undefined])[] = [
152 > [ClaudeCustomizationScope.Workspace, workingDirectory],
153 > [ClaudeCustomizationScope.User, userHome],
154 > ];
155 > for (const [scope, base] of orderedScopes) {
156 > if (!base) {
157 continue;
158 }
159 > const bucket = buckets.get(scope)!; claudeSessionCustomizationDiscovery.ts
160 > if (bucket.agents.length > 0) {
161 result.push(makeDirectory(base, 'agents', CustomizationType.Agent, bucket.agents));
162 }
163 > if (bucket.skills.length > 0) { claudeSessionCustomizationDiscovery.ts
164 result.push(makeDirectory(base, 'skills', CustomizationType.Skill, bucket.skills));
165 }
166 > if (bucket.rules.length > 0) { claudeSessionCustomizationDiscovery.ts
167 result.push(makeDirectory(base, 'rules', CustomizationType.Rule, bucket.rules));
168 }
169 > if (bucket.hooks.length > 0) { claudeSessionCustomizationDiscovery.ts
170 result.push(makeDirectory(base, 'hooks', CustomizationType.Hook, bucket.hooks));
171 }
173 >
174 > // Native plugins are top-level entries (like MCP servers), each carrying
175 > // its bundled components as children.
176 > for (const plugin of nativePlugins) {
177 result.push(makePlugin(plugin));
178 }
180 > result.push(...mcpServers);
181 > return result;
182 > }
183
184 /**