src/vs/platform/agentHost/common/agentPluginManager.ts
55 LOC · 55 covered · 0 uncovered · 1 ranges · 792 concepts · 1 introducers · 384 tests
File neighbourhood
The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.
Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file
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 related-file, concept, and source links on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.
/*---------------------------------------------------------------------------------------------
agentModelPricing.ts ×7
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { URI } from '../../../base/common/uri.js';
import { createDecorator } from '../../instantiation/common/instantiation.js';
import type { ClientPluginCustomization, PluginCustomization } from './state/sessionState.js';
export const IAgentPluginManager = createDecorator<IAgentPluginManager>('agentPluginManager');
/**
* A synced customization with its local plugin directory (when available).
*/
export interface ISyncedCustomization {
/** The session customization with loading/error status. */
readonly customization: PluginCustomization;
/** Local plugin directory URI, defined when the sync was successful. */
readonly pluginDir?: URI;
}
/**
* Manages Open Plugin directories for agent backends.
*
* Shared across agents and sessions. Syncs client-provided customization
* references to local disk, tracking nonces to avoid redundant copies.
* Concurrent syncs of the same plugin URI are serialized internally.
*/
export interface IAgentPluginManager {
readonly _serviceBrand: undefined;
/**
* Root directory under which all agent plugin data is materialized.
* Exposed so other host-side components can carve out sibling
* directories for their own bundles (e.g. session-discovered
* customizations) without having to thread `userDataPath` separately.
*/
readonly basePath: URI;
/**
* Syncs a set of client-provided plugin customizations to local storage.
*
* Each plugin is copied to a local directory, respecting nonce-based
* caching. The optional {@link progress} callback fires with the single
* customization that completed or failed, allowing callers to publish
* targeted incremental status updates.
*
* Concurrent calls for the same plugin URI are serialized so that
* overlapping syncs do not clobber each other.
*
* @returns Final status for every customization, with `pluginDir`
* defined when the sync was successful.
*/
syncCustomizations(clientId: string, customizations: ClientPluginCustomization[], progress?: (status: PluginCustomization) => void): Promise<ISyncedCustomization[]>;
}