Path: blob/main/src/vs/platform/agentHost/common/agentHostClientFileSystemProvider.ts
13394 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { URI } from '../../../base/common/uri.js';6import { AHPFileSystemProvider } from './agentHostFileSystemProvider.js';7import { fromAgentClientUri } from './agentClientUri.js';89/**10* Read-only filesystem provider for accessing client-side files from the11* agent host. Registered under the `vscode-agent-client` scheme.12*13* This is the inverse of {@link AgentHostFileSystemProvider}: where that14* provider lets a client read agent host files, this one lets the agent15* host read files from a connected client.16*17* ```18* vscode-agent-client://[clientId]/[originalScheme]/[originalAuthority]/[originalPath]19* ```20*21* Connections are registered per client ID. The connection implementation22* must proxy `browseDirectory`/`fetchContent` calls back to the client23* (e.g. via a reverse JSON-RPC request over the WebSocket transport).24*/25export class AgentHostClientFileSystemProvider extends AHPFileSystemProvider {2627protected _decodeUri(resource: URI): URI {28return fromAgentClientUri(resource);29}30}313233