terminalSandboxEngine.ts ×7

Frontier kind: Code frontier

unlabeled · c_54310ea35d15

56 tests · 12184 LOC · 56 files · introduces 0 tests · 18 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges18 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1836 ranges12184 lines · 56 files · Browse complete extent
All tests (intent)
56 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.

2 files ranked by introduced lines: 18 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/sandbox/common/terminalSandboxEngine.ts 12 introduced LOC · 7 ranges

Open complete file

169
170 async isEnabled(precheckInputs?: ITerminalSandboxPrecheckInputs): Promise<boolean> {
171 > return this._isSandboxConfiguredEnabled(precheckInputs); terminalSandboxEngine.ts
172 > }
173
174 async isSandboxAllowNetworkEnabled(precheckInputs?: ITerminalSandboxPrecheckInputs): Promise<boolean> {
586
587 private _isSandboxAllowedByPrecheckInputs(precheckInputs: ITerminalSandboxPrecheckInputs | undefined): boolean {
588 > return precheckInputs?.isDefaultApprovalPermissionEnabled !== false; terminalSandboxEngine.ts
589 > }
590
591 private async _isSandboxConfiguredEnabled(precheckInputs?: ITerminalSandboxPrecheckInputs): Promise<boolean> {
592 > if (!this._isSandboxAllowedByPrecheckInputs(precheckInputs)) { terminalSandboxEngine.ts
593 return false;
594 }
595 > await this.getOS(); terminalSandboxEngine.ts
596 > if (this._os === OperatingSystem.Windows) {
597 const value = this._getSandboxConfiguredWindowsEnabledValue();
598 return isAgentSandboxEnabledValue(value);
600 const value = this._getSandboxConfiguredEnabledValue();
601 return isAgentSandboxEnabledValue(value);
603
604 private async _resolveRuntimeInfo(): Promise<void> {
1057
1058 private _normalizeSandboxEnabledValue(value: AgentSandboxEnabledSettingValue | undefined): AgentSandboxEnabledValue {
1059 > return value === undefined ? AgentSandboxEnabledValue.Off : normalizeAgentSandboxEnabledValue(value); terminalSandboxEngine.ts
1060 > }
1061
1062 private _isSandboxAllowNetworkConfigured(): boolean {
1079
1080 private _getSettingValue<T>(settingId: AgentSandboxSettingId | AgentNetworkDomainSettingId): T | undefined {
1081 > return this._host.getSandboxSetting<T>(settingId); terminalSandboxEngine.ts
1082 > }
1083 }
src/vs/platform/sandbox/common/settings.ts 6 introduced LOC · 4 ranges

Open complete file

33
34 export function normalizeAgentSandboxEnabledValue(value: AgentSandboxEnabledSettingValue): AgentSandboxEnabledValue {
35 > if (value === true) { settings.ts
36 return AgentSandboxEnabledValue.On;
37 }
38 > if (value === false) { settings.ts
39 return AgentSandboxEnabledValue.Off;
40 }
41 > return value; settings.ts
42 > }
43
44 export function isAgentSandboxEnabledValue(value: AgentSandboxEnabledSettingValue | undefined): boolean {
45 > return value !== undefined && normalizeAgentSandboxEnabledValue(value) !== AgentSandboxEnabledValue.Off; settings.ts
46 > }