fileBackedInstalledPluginsStore.ts ×10

Frontier kind: Code frontier

unlabeled · c_2c9c7de5bb24

17 tests · 29838 LOC · 151 files · introduces 0 tests · 26 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges26 lines · 1 files
Tests
0 tests

Contains — complete concept membership

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

src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.ts 26 introduced LOC · 10 ranges

Open complete file

86
87 constructor(
88 > private readonly _agentPluginsHome: URI, fileBackedInstalledPluginsStore.ts
89 > private readonly _oldCacheRoot: URI | undefined,
90 > private readonly _fileService: IFileService,
91 > private readonly _logService: ILogService,
92 > private readonly _storageService: IStorageService,
93 > ) {
94 > super();
95 > this._fileUri = joinPath(_agentPluginsHome, INSTALLED_JSON_FILENAME);
96 > this._writeDelayer = this._register(new ThrottledDelayer<void>(100));
97 > void this._initialize();
98 > }
99
100 get(): readonly IStoredInstalledPlugin[] {
107
108 private async _initialize(): Promise<void> {
110 > const read = await this._readFromFile();
111 > if (read !== undefined) {
112 this._setValue(read, undefined, false);
114 // No installed.json yet — attempt migration from legacy storage.
115 await this._migrateFromStorage();
116 }
117 > } catch (error) { fileBackedInstalledPluginsStore.ts
118 this._logService.error('[FileBackedInstalledPluginsStore] Initialization failed', error);
119 }
121 > this._initialized = true;
122 > this._setupFileWatcher();
123 > }
124
125 // --- File I/O ----------------------------------------------------------------
126
127 private async _readFromFile(): Promise<readonly IStoredInstalledPlugin[] | undefined> {
129 > const exists = await this._fileService.exists(this._fileUri);
130 if (!exists) {
131 return undefined;
134 const content = await this._fileService.readFile(this._fileUri);
135 const json: IInstalledJson = JSON.parse(content.value.toString());
136 > if (!json || !Array.isArray(json.installed)) { fileBackedInstalledPluginsStore.ts
137 this._logService.warn('[FileBackedInstalledPluginsStore] installed.json has unexpected format, ignoring');
138 return undefined;