agentHostFileSystemService.ts ×4

Frontier kind: Code frontier

unlabeled · c_67cb3965556f

728 tests · 21310 LOC · 77 files · introduces 0 tests · 57 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges57 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1784 ranges21310 lines · 77 files · Browse complete extent
All tests (intent)
728 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: 57 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/common/agentHostFileSystemService.ts 57 introduced LOC · 4 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- agentHostFileSystemService.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { Disposable, IDisposable } from '../../../base/common/lifecycle.js';
7 > import { IFileService } from '../../files/common/files.js';
8 > import { InMemoryFileSystemProvider } from '../../files/common/inMemoryFilesystemProvider.js';
9 > import { InstantiationType, registerSingleton } from '../../instantiation/common/extensions.js';
10 > import { createDecorator } from '../../instantiation/common/instantiation.js';
11 > import { ILabelService } from '../../label/common/label.js';
12 > import { AgentHostFileSystemProvider, type IRemoteFilesystemConnection } from './agentHostFileSystemProvider.js';
13 > import { AGENT_HOST_LABEL_FORMATTER, AGENT_HOST_SCHEME } from './agentHostUri.js';
14 >
15 > export type { IRemoteFilesystemConnection } from './agentHostFileSystemProvider.js';
16 >
17 > /**
18 > * Scheme used for the in-memory plugin filesystem backing synced customizations.
19 > *
20 > * URIs under this scheme are served by a registered {@link InMemoryFileSystemProvider}
21 > * and are reachable by the agent host via `fetchContent`.
22 > */
23 > export const SYNCED_CUSTOMIZATION_SCHEME = 'vscode-synced-customization';
24 >
25 > export const IAgentHostFileSystemService = createDecorator<IAgentHostFileSystemService>('agentHostFileSystemService');
26 >
27 > export interface IAgentHostFileSystemService {
28 > readonly _serviceBrand: undefined;
29 >
30 > /**
31 > * Register a mapping from a URI authority to a connection so that
32 > * `vscode-agent-host://[authority]/…` URIs resolve through this connection.
33 > */
34 > registerAuthority(authority: string, connection: IRemoteFilesystemConnection): IDisposable;
35 >
36 > /**
37 > * Ensures the in-memory filesystem provider for synced customizations
38 > * (`vscode-synced-customization:` scheme) is registered. Safe to call
39 > * multiple times — only the first call registers the provider.
40 > */
41 > ensureSyncedCustomizationProvider(): void;
42 > }
43 >
44 > class AgentHostFileSystemService extends Disposable implements IAgentHostFileSystemService {
45 > declare readonly _serviceBrand: undefined;
46 >
47 > private readonly _fsProvider: AgentHostFileSystemProvider;
48 > private _syncedCustomizationProviderRegistered = false;
49 >
50 > constructor(
51 @IFileService private readonly _fileService: IFileService,
52 @ILabelService labelService: ILabelService,
58 this._register(labelService.registerFormatter(AGENT_HOST_LABEL_FORMATTER));
59 }
61 > registerAuthority(authority: string, connection: IRemoteFilesystemConnection): IDisposable {
62 return this._fsProvider.registerAuthority(authority, connection);
63 }
65 > ensureSyncedCustomizationProvider(): void {
66 if (!this._syncedCustomizationProviderRegistered) {
67 this._syncedCustomizationProviderRegistered = true;
70 }
71 }
73 >
74 > registerSingleton(IAgentHostFileSystemService, AgentHostFileSystemService, InstantiationType.Delayed);