sessionPluginBundler.ts ×10

Frontier kind: Code frontier

unlabeled · c_df0c10d677f1

4 tests · 51767 LOC · 299 files · introduces 0 tests · 54 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges54 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5066 ranges51767 lines · 299 files · Browse complete extent
All tests (intent)
4 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: 54 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/shared/sessionPluginBundler.ts 54 introduced LOC · 10 ranges

Open complete file

28 * component type lives in the Open Plugin format.
29 */
30 > function pluginDirForType(type: DiscoveredType): string | undefined { sessionPluginBundler.ts
31 > switch (type) {
32 > case DiscoveredType.Agent: return 'agents';
33 > case DiscoveredType.Skill: return 'skills';
34 > case DiscoveredType.Instruction: return 'rules';
35 > case DiscoveredType.Hook: return 'hooks';
36 > case DiscoveredType.AgentInstruction: return undefined;
37 > }
38 > }
39
40 interface IBundleResult {
92 return undefined;
93 }
95 > const hashParts: string[] = [];
96 > const files: { readonly destUri: URI; readonly content: VSBuffer }[] = [];
97 >
98 > for (const discoveredDirectory of directories) {
99 > const dir = pluginDirForType(discoveredDirectory.type);
100 > if (!dir) {
101 continue; // do not bundle agent instructions
102 }
103 > for (const file of discoveredDirectory.files) { sessionPluginBundler.ts
104 const fileUri = file.uri;
105 const fileName = basename(fileUri);
125 hashParts.push(`${hashKey}:${content.value.toString()}`);
126 }
128 > if (token.isCancellationRequested) {
129 return undefined;
130 }
132 > hashParts.sort();
133 > const nonce = String(hash(hashParts.join('\n')));
134 >
135 > const rootUriString = this._rootUri.toString() as ProtocolURI;
136 > const result = {
137 > ref: {
138 > type: CustomizationType.Plugin,
139 > id: customizationId(rootUriString),
140 > uri: rootUriString,
141 > name: DISPLAY_NAME,
142 > enabled: true,
143 > nonce,
144 > },
145 > } satisfies IBundleResult;
146 >
147 > if (this._lastNonce === nonce) {
148 return result;
149 }
151 > try {
152 > await this._fileService.del(this._rootUri, { recursive: true });
153 > } catch {
154 > // Directory may not exist on first bundle.
155 > }
156 > if (token.isCancellationRequested) {
157 return undefined;
158 }
160 > const manifestUri = URI.joinPath(this._rootUri, '.plugin', 'plugin.json');
161 > await this._fileService.createFolder(dirname(manifestUri));
162 > if (token.isCancellationRequested) {
163 return undefined;
164 }
165 > await this._fileService.writeFile(manifestUri, VSBuffer.fromString(MANIFEST_CONTENT)); sessionPluginBundler.ts
166 > if (token.isCancellationRequested) {
167 return undefined;
168 }
170 > for (const file of files) {
171 await this._fileService.createFolder(dirname(file.destUri));
172 if (token.isCancellationRequested) {