src/vs/editor/common/services/resolverService.ts

90 LOC · 86 covered · 4 uncovered · 1 ranges · 58 concepts · 1 introducers · 33 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.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filesrc/vs/platform/agentHost/common/agentHostResourceService.ts · 168 LOCcommon/agentHostResource…src/vs/workbench/services/agentHost/common/agentHostResourceService.ts · 519 LOCcommon/agentHostResource…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways covers immediate retry without waiting for the settings write|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×2 · 5 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 3 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allow for write also covers read on the same URI|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allow grants in-memory until connection closes|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways persists the grant|occurrence=1, agentHostResourceService.test|title=AgentHostResourceService allowAlways defaults to APPLICATION scope when no value is configured anywhere|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 1 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allow for read does not grant write|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×3 · 3 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 1 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 1 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService request with both read and write prompts sequentially|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×8 · 22 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService write request that already has read grant still prompts for write|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×3 · 6 introduced LOCagentHostResourceService…agentHostResourceService.ts ×2 · 2 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService request resolves immediately when already granted|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 3 introduced LOCagentHostResourceService…agentHostResourceService.ts ×2 · 3 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×3 · 13 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 1 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService grants for one host do not leak into another host|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService persisted "r" allows read, denies write|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways skips persistence when covered by parent grant|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService persisted "rw" allows read and write|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 5 introduced LOCagentHostResourceService…agentHostResourceService.ts ×3 · 18 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService… prefix|occurrence=1 · 0 introduced LOC prefix|occurrence=1agentHostResourceService.ts ×1 · 3 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService check rejects path traversal via .. segments|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService connectionClosed drops implicit grants|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 1 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService implicit read grant covers descendants but not parent or sibling|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×5 · 7 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService grantImplicitRead asynchronously upgrades to realpath|occurrence=1, agentHostResourceService.test|title=AgentHostResourceService check canonicalizes via realpath so symlink to outside the grant is denied|occurrence=1, +1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 1 introduced LOCagentHostResourceService…agentHostResourceService.ts ×2 · 7 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 4 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService implicit grant does not allow write|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×4 · 9 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 13 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService check denies when no grant exists|occurrence=1 · 0 introduced LOCagentHostResourceService…agentHostResourceService.ts ×2 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×2 · 5 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 2 introduced LOCagentHostResourceService…agentHostResourceService.ts ×1 · 4 introduced LOCagentHostResourceService…agentHostResourceService.ts ×28 · 436 introduced LOCagentHostResourceService… prefix|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService address normalization strips ws:// prefix|occurrence=1 prefix|occurrence=1agentHostResourceService.test|title=AgentHostResourceService allow for read does not grant write|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allow for read does not grant write|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allow for write also covers read on the same URI|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allow for write also covers read on the same URI|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allow grants in-memory until connection closes|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allow grants in-memory until connection closes|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways covers immediate retry without waiting for the settings write|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allowAlways covers immediate retry without waiting for the settings write|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways defaults to APPLICATION scope when no value is configured anywhere|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allowAlways defaults to APPLICATION scope when no value is configured anywhere|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways for write persists rw|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allowAlways for write persists rw|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways merges with existing APPLICATION-scoped grants instead of overwriting them|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allowAlways merges with existing APPLICATION-scoped grants instead of overwriting them|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways persists into USER_LOCAL when a pre-existing value is in USER_LOCAL|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allowAlways persists into USER_LOCAL when a pre-existing value is in USER_LOCAL|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways persists the grant|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allowAlways persists the grant|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService allowAlways skips persistence when covered by parent grant|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService allowAlways skips persistence when covered by parent grant|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService check canonicalizes nonexistent paths via the parent realpath|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService check canonicalizes nonexistent paths via the parent realpath|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService check canonicalizes via realpath so symlink to outside the grant is denied|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService check canonicalizes via realpath so symlink to outside the grant is denied|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService check denies when no grant exists|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService check denies when no grant exists|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService check rejects path traversal via .. segments|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService check rejects path traversal via .. segments|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService concurrent identical requests share one pending entry|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService concurrent identical requests share one pending entry|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService connectionClosed drops implicit grants|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService connectionClosed drops implicit grants|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService connectionClosed only affects the named address|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService connectionClosed only affects the named address|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService connectionClosed rejects pending and clears the queue|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService connectionClosed rejects pending and clears the queue|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService findPending returns the pending request by id|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService findPending returns the pending request by id|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService grantImplicitRead asynchronously upgrades to realpath|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService grantImplicitRead asynchronously upgrades to realpath|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService grants for one host do not leak into another host|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService grants for one host do not leak into another host|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService implicit grant does not allow write|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService implicit grant does not allow write|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService implicit grant for a symlinked directory still covers descendants resolved through the symlink|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService implicit grant for a symlinked directory still covers descendants resolved through the symlink|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService implicit read grant covers descendants but not parent or sibling|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService implicit read grant covers descendants but not parent or sibling|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService pendingFor returns only this host's requests, with normalized address|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService pendingFor returns only this host's requests, with normalized address|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService persisted "r" allows read, denies write|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService persisted "r" allows read, denies write|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService persisted "rw" allows read and write|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService persisted "rw" allows read and write|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService persisted entries with malformed URI keys or unknown modes are ignored|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService persisted entries with malformed URI keys or unknown modes are ignored|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService request rejects with CancellationError on deny|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService request rejects with CancellationError on deny|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService request resolves immediately when already granted|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService request resolves immediately when already granted|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService request with both read and write prompts sequentially|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService request with both read and write prompts sequentially|occurrence=1agentHostResourceService…agentHostResourceService.test|title=AgentHostResourceService write request that already has read grant still prompts for write|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/agentHost/test/common/agentHostResourceService.test|title=AgentHostResourceService write request that already has read grant still prompts for write|occurrence=1agentHostResourceService…Focused file · src/vs/editor/common/services/resolverService.ts · 90 LOCservices/resolverService…

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.

1 > /*--------------------------------------------------------------------------------------------- agentHostResourceService.ts ×28
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 { Event } from '../../../base/common/event.js';
7 > import { IMarkdownString } from '../../../base/common/htmlContent.js';
8 > import { IDisposable, IReference } from '../../../base/common/lifecycle.js';
9 > import { URI } from '../../../base/common/uri.js';
10 > import { ITextModel, ITextSnapshot } from '../model.js';
11 > import { IResolvableEditorModel } from '../../../platform/editor/common/editor.js';
12 > import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
13 >
14 > export const ITextModelService = createDecorator<ITextModelService>('textModelService');
15 >
16 > export interface ITextModelService {
17 > readonly _serviceBrand: undefined;
18 >
19 > /**
20 > * Provided a resource URI, it will return a model reference
21 > * which should be disposed once not needed anymore.
22 > */
23 > createModelReference(resource: URI): Promise<IReference<IResolvedTextEditorModel>>;
24 >
25 > /**
26 > * Registers a specific `scheme` content provider.
27 > */
28 > registerTextModelContentProvider(scheme: string, provider: ITextModelContentProvider): IDisposable;
29 >
30 > /**
31 > * Check if the given resource can be resolved to a text model.
32 > */
33 > canHandleResource(resource: URI): boolean;
34 > }
35 >
36 > export interface ITextModelContentProvider {
37 >
38 > /**
39 > * Given a resource, return the content of the resource as `ITextModel`.
40 > */
41 > provideTextContent(resource: URI): Promise<ITextModel | null> | null;
42 > }
43 >
44 > export interface ITextEditorModel extends IResolvableEditorModel {
45 >
46 > /**
47 > * Emitted when the text model is about to be disposed.
48 > */
49 > readonly onWillDispose: Event<void>;
50 >
51 > /**
52 > * Provides access to the underlying `ITextModel`.
53 > */
54 > readonly textEditorModel: ITextModel | null;
55 >
56 > /**
57 > * Creates a snapshot of the model's contents.
58 > */
59 > createSnapshot(this: IResolvedTextEditorModel): ITextSnapshot;
60 > createSnapshot(this: ITextEditorModel): ITextSnapshot | null;
61 >
62 > /**
63 > * Signals if this model is readonly or not.
64 > */
65 > isReadonly(): boolean | IMarkdownString;
66 >
67 > /**
68 > * The language id of the text model if known.
69 > */
70 > getLanguageId(): string | undefined;
71 >
72 > /**
73 > * Find out if this text model has been disposed.
74 > */
75 > isDisposed(): boolean;
76 > }
77 >
78 > export interface IResolvedTextEditorModel extends ITextEditorModel {
79 >
80 > /**
81 > * Same as ITextEditorModel#textEditorModel, but never null.
82 > */
83 > readonly textEditorModel: ITextModel;
84 > }
85 >
86 > export function isResolvedTextEditorModel(model: ITextEditorModel): model is IResolvedTextEditorModel {
87 const candidate = model as IResolvedTextEditorModel;
88
89 return !!candidate.textEditorModel;
90 }