promptsServiceImpl.ts ×5

Frontier kind: Code frontier

unlabeled · c_02e3ced3e513

7 tests · 67678 LOC · 326 files · introduces 0 tests · 17 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges17 lines · 2 files
Tests
0 tests

Contains — complete concept membership

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

src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts 16 introduced LOC · 5 ranges

Open complete file

1049
1050 public async getHooks(token: CancellationToken): Promise<IConfiguredHooksInfo | undefined> {
1051 > const discoveryInfo = await this.cachedHooks.get(token); promptsServiceImpl.ts
1052 > const result = discoveryInfo.hooksInfo;
1053 > return result;
1054 > }
1055
1056 public async getDiscoveryInfo(type: PromptsType, token: CancellationToken): Promise<IPromptDiscoveryInfo> {
1104
1105 private async computeHooks(token: CancellationToken): Promise<IHookDiscoveryInfo> {
1106 > const stopWatch = StopWatch.create(true); promptsServiceImpl.ts
1107 > const useChatHooks = this.configurationService.getValue(PromptsConfig.USE_CHAT_HOOKS);
1108 >
1109 > if (!useChatHooks || !this.workspaceTrustService.isWorkspaceTrusted()) {
1110 const hookFiles = await this.listPromptFiles(PromptsType.hook, token);
1111 const skipReason: IPromptFileDiscoveryResult['skipReason'] = !useChatHooks ? 'disabled' : 'workspace-untrusted';
1126 // Get user home for tilde expansion
1127 const userHomeUri = await this.pathService.userHome();
1128 > const userHome = userHomeUri.scheme === Schemas.file ? userHomeUri.fsPath : userHomeUri.path; promptsServiceImpl.ts
1129 >
1130 > const defaultFolder = this.workspaceService.getWorkspace().folders[0];
1131 >
1132 > // Process each hook file in parallel
1133 > const fileResults = await Promise.all(hookFiles.map(async (hookFile): Promise<{
1134 file?: IPromptFileDiscoveryResult;
1135 hooks?: Map<HookType, IParsedHookCommand[]>;
1302 this.logger.trace(`[PromptsService] Collected hooks: ${JSON.stringify(Object.keys(result))}`);
1303 return { type: PromptsType.hook, files, sourceFolders, hooksInfo: { hooks: result, hasDisabledClaudeHooks }, durationInMillis: stopWatch.elapsed() };
1305
1306 /**
src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.ts 1 introduced LOC · 1 range

Open complete file

296 return SKILL_PROVIDER_ACTIVATION_EVENT;
297 case PromptsType.hook:
298 > return undefined; // hooks don't have extension providers extensionPromptFileService.ts
299 }
300 }