extensionPromptFileService.ts ×6

Frontier kind: Code frontier

unlabeled · c_c769a599cbc2

10 tests · 67565 LOC · 326 files · introduces 0 tests · 37 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges37 lines · 2 files
Tests
0 tests

Contains — complete concept membership

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

src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.ts 35 introduced LOC · 6 ranges

Open complete file

155 */
156 public registerContributedFile(type: PromptsType, uri: URI, extension: IExtensionDescription, name?: string, description?: string, when?: string, sessionTypes?: readonly string[]): IDisposable {
157 > const bucket = this.contributedFiles[type]; extensionPromptFileService.ts
158 > if (bucket.has(uri)) {
159 // keep first registration per extension (handler filters duplicates per extension already)
160 return Disposable.None;
161 }
162 > const entryPromise = (async () => { extensionPromptFileService.ts
163 > // For skills, validate that the file follows the required structure
164 > if (type === PromptsType.skill) {
165 try {
166 const validated = await this._validateAndSanitizeSkillFile(uri, CancellationToken.None);
173 }
174 }
176 > return { uri, name, description, when, sessionTypes, storage: PromptsStorage.extension, type, extension, source: PromptFileSource.ExtensionContribution } satisfies IExtensionPromptPath;
177 > })();
178 > bucket.set(uri, entryPromise);
179 >
180 > this._enqueueReadonlyUpdate(uri);
181 >
182 > if (when) {
183 this._contributedWhenClauses.set(`${type}/${uri.toString()}`, when);
184 this._updateContributedWhenKeys();
185 }
187 > this._onDidChange.fire({ type });
188 >
189 > return {
190 > dispose: () => {
191 > bucket.delete(uri);
192 > if (when) {
193 this._contributedWhenClauses.delete(`${type}/${uri.toString()}`);
194 this._updateContributedWhenKeys();
195 }
196 > this._onDidChange.fire({ type }); extensionPromptFileService.ts
197 > }
198 > };
199 > }
200
201 /**
301
302 private _enqueueReadonlyUpdate(uri: URI): void {
303 > this._pendingReadonlyUris.push(uri); extensionPromptFileService.ts
304 > if (!this._pendingReadonlyFlush) {
305 > this._pendingReadonlyFlush = true;
306 > queueMicrotask(() => {
307 > const uris = this._pendingReadonlyUris;
308 > this._pendingReadonlyUris = [];
309 > this._pendingReadonlyFlush = false;
310 > void this.filesConfigService.updateReadonly(uris, true);
311 > });
312 > }
313 > }
314
315 private _updateContributedWhenKeys(): void {
src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts 2 introduced LOC · 1 range

Open complete file

730
731 public registerContributedFile(type: PromptsType, uri: URI, extension: IExtensionDescription, name?: string, description?: string, when?: string, sessionTypes?: readonly string[]) {
732 > return this.extensionPromptFiles.registerContributedFile(type, uri, extension, name, description, when, sessionTypes); promptsServiceImpl.ts
733 > }
734
735 getPromptLocationLabel(promptPath: IPromptPath): string {