workspaceTrust.ts ×1

Frontier kind: Code frontier

unlabeled · c_592f192e1101

1019 tests · 15523 LOC · 70 files · introduces 0 tests · 108 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
1 range108 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1924 ranges15523 lines · 70 files · Browse complete extent
All tests (intent)
1019 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: 108 introduced LOC across 1 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/workspace/common/workspaceTrust.ts 108 introduced LOC · 1 range

Open complete file

1 > /*--------------------------------------------------------------------------------------------- workspaceTrust.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 { Event } from '../../../base/common/event.js';
7 > import { IDisposable } from '../../../base/common/lifecycle.js';
8 > import { URI } from '../../../base/common/uri.js';
9 > import { createDecorator } from '../../instantiation/common/instantiation.js';
10 >
11 > export enum WorkspaceTrustScope {
12 > Local = 0,
13 > Remote = 1
14 > }
15 >
16 > export interface WorkspaceTrustRequestButton {
17 > readonly label: string;
18 > readonly type: 'ContinueWithTrust' | 'ContinueWithoutTrust' | 'Manage' | 'Cancel';
19 > }
20 >
21 > export interface ResourceTrustRequestOptions {
22 > readonly uri: URI;
23 > readonly message?: string;
24 > }
25 >
26 > export interface WorkspaceTrustRequestOptions {
27 > readonly buttons?: WorkspaceTrustRequestButton[];
28 > readonly message?: string;
29 > }
30 >
31 > export const IWorkspaceTrustEnablementService = createDecorator<IWorkspaceTrustEnablementService>('workspaceTrustEnablementService');
32 >
33 > export interface IWorkspaceTrustEnablementService {
34 > readonly _serviceBrand: undefined;
35 >
36 > isWorkspaceTrustEnabled(): boolean;
37 > }
38 >
39 > export const IWorkspaceTrustManagementService = createDecorator<IWorkspaceTrustManagementService>('workspaceTrustManagementService');
40 >
41 > export interface IWorkspaceTrustManagementService {
42 > readonly _serviceBrand: undefined;
43 >
44 > readonly onDidChangeTrust: Event<boolean>;
45 > readonly onDidChangeTrustedFolders: Event<void>;
46 >
47 > readonly workspaceResolved: Promise<void>;
48 > readonly workspaceTrustInitialized: Promise<void>;
49 > acceptsOutOfWorkspaceFiles: boolean;
50 >
51 > isWorkspaceTrusted(): boolean;
52 > isWorkspaceTrustForced(): boolean;
53 >
54 > canSetParentFolderTrust(): boolean;
55 > setParentFolderTrust(trusted: boolean): Promise<void>;
56 >
57 > canSetWorkspaceTrust(): boolean;
58 > setWorkspaceTrust(trusted: boolean): Promise<void>;
59 >
60 > getUriTrustInfo(uri: URI): Promise<IWorkspaceTrustUriInfo>;
61 > setUrisTrust(uri: URI[], trusted: boolean): Promise<void>;
62 >
63 > getTrustedUris(): URI[];
64 > setTrustedUris(uris: URI[]): Promise<void>;
65 >
66 > addWorkspaceTrustTransitionParticipant(participant: IWorkspaceTrustTransitionParticipant): IDisposable;
67 > }
68 >
69 > export const enum WorkspaceTrustUriResponse {
70 > Open = 1,
71 > OpenInNewWindow = 2,
72 > Cancel = 3
73 > }
74 >
75 > export const IWorkspaceTrustRequestService = createDecorator<IWorkspaceTrustRequestService>('workspaceTrustRequestService');
76 >
77 > export interface IWorkspaceTrustRequestService {
78 > readonly _serviceBrand: undefined;
79 >
80 > readonly onDidInitiateOpenFilesTrustRequest: Event<void>;
81 > readonly onDidInitiateWorkspaceTrustRequest: Event<WorkspaceTrustRequestOptions | undefined>;
82 > readonly onDidInitiateWorkspaceTrustRequestOnStartup: Event<void>;
83 > readonly onDidInitiateResourcesTrustRequest: Event<ResourceTrustRequestOptions>;
84 >
85 > completeOpenFilesTrustRequest(result: WorkspaceTrustUriResponse, saveResponse?: boolean): Promise<void>;
86 > requestOpenFilesTrust(openFiles: URI[]): Promise<WorkspaceTrustUriResponse>;
87 >
88 > completeResourcesTrustRequest(uri: URI, result: WorkspaceTrustUriResponse): Promise<void>;
89 > requestResourcesTrust(options: ResourceTrustRequestOptions): Promise<boolean | undefined>;
90 >
91 > cancelWorkspaceTrustRequest(): void;
92 > completeWorkspaceTrustRequest(trusted?: boolean): Promise<void>;
93 > requestWorkspaceTrust(options?: WorkspaceTrustRequestOptions): Promise<boolean | undefined>;
94 > requestWorkspaceTrustOnStartup(): void;
95 > }
96 >
97 > export interface IWorkspaceTrustTransitionParticipant {
98 > participate(trusted: boolean): Promise<void>;
99 > }
100 >
101 > export interface IWorkspaceTrustUriInfo {
102 > uri: URI;
103 > trusted: boolean;
104 > }
105 >
106 > export interface IWorkspaceTrustInfo {
107 > uriTrustInfo: IWorkspaceTrustUriInfo[];
108 > }