sessionCustomizationDiscovery.ts ×16

Frontier kind: Code frontier

unlabeled · c_733d87881f36

64 tests · 50360 LOC · 297 files · introduces 0 tests · 40 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
18 ranges40 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4671 ranges50360 lines · 297 files · Browse complete extent
All tests (intent)
64 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: 40 introduced LOC across 18 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/sessionCustomizationDiscovery.ts 38 introduced LOC · 16 ranges

Open complete file

66 }
67
68 > function compareDiscoveredDirectory(a: IDiscoveredDirectory, b: IDiscoveredDirectory): number { sessionCustomizationDiscovery.ts
69 > const byType = compareStrings(a.type, b.type);
70 > if (byType !== 0) {
71 return byType;
72 }
73 > return compareStrings(a.uri.toString(), b.uri.toString()); sessionCustomizationDiscovery.ts
74 > }
75
76 function areDiscoveredFilesEqual(a: readonly IDiscoveredFile[], b: readonly IDiscoveredFile[]): boolean {
228
229 constructor(
230 > private readonly _workingDirectory: URI, sessionCustomizationDiscovery.ts
231 > private readonly _userHome: URI,
232 > private readonly _pathToUri: PathToUri = URI.file,
233 > @IFileService private readonly _fileService: IFileService,
234 > @ILogService private readonly _logService: ILogService,
235 > ) {
236 > super();
237 > this._register({ dispose: () => this._disposeAllWatchers() });
238 > this._register(this._fileService.onDidFilesChange(e => {
239 for (const watcher of this._watchers.values()) {
240 for (const uri of watcher.resourcesToWatch) {
253
254 private async writeCustomizationDiscoveryDebugLog(payload: Record<string, unknown>): Promise<void> {
255 > if (!CUSTOMIZATION_DISCOVERY_DEBUG_LOG_PATH) { sessionCustomizationDiscovery.ts
256 > return;
257 > }
258
259 try {
266 this._logService.error(`[SessionCustomizationDiscovery] Failed to write discovery debug log: ${err instanceof Error ? err.message : String(err)}`);
267 }
269
270 private async getDiscoveredDirectories(client: CopilotClient, token: CancellationToken): Promise<readonly IDiscoveredDirectory[]> {
894
895 private _reconcileWatchers(nextWatchRootUris: ResourceMap<IWatchSpec>): void {
896 > // Dispose watchers that are gone or whose recursive flag changed. sessionCustomizationDiscovery.ts
897 > for (const [rootUri, watcher] of this._watchers.entries()) {
898 const next = nextWatchRootUris.get(rootUri);
899 if (!next || next.recursive !== watcher.recursive) {
902 }
903 }
905 > for (const [rootUri, next] of nextWatchRootUris.entries()) {
906 const existing = this._watchers.get(rootUri);
907 if (existing) {
1075
1076 private async _scanForHooks(root: ISearchRoot, rootUri: URI, stat: IFileStatWithMetadata | undefined, seen: ResourceSet, result: IDiscoveredDirectory[], token: CancellationToken): Promise<void> {
1077 > const files: IDiscoveredFile[] = []; sessionCustomizationDiscovery.ts
1078 > // hooks are recursively discovered as `*.json` under the root.
1079 > const findHooks = async (directoryStat: IFileStatWithMetadata, recursionLevel: number): Promise<void> => {
1080 throwIfCancelled(token);
1081
src/vs/base/common/map.ts 2 introduced LOC · 2 ranges

Open complete file

139
140 *entries(): MapIterator<[URI, T]> {
141 > for (const entry of this.map.values()) { map.ts
142 yield [entry.uri, entry.value];
143 }
144 > } map.ts
145
146 *[Symbol.iterator](): MapIterator<[URI, T]> {