terminalSandboxEngine.ts ×8

Frontier kind: Code frontier

unlabeled · c_f264b26d0064

23 tests · 12653 LOC · 56 files · introduces 0 tests · 18 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges18 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2006 ranges12653 lines · 56 files · Browse complete extent
All tests (intent)
23 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: 18 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/sandbox/common/terminalSandboxEngine.ts 18 introduced LOC · 8 ranges

Open complete file

637 const windowsFileSystemSetting = this._os === OperatingSystem.Windows
638 ? this._getSettingValue<ITerminalSandboxFileSystemSetting>(AgentSandboxSettingId.AgentSandboxWindowsFileSystem) ?? {}
640 const windowsSchemaVersion = this._os === OperatingSystem.Windows
641 ? this._getSettingValue<string>(AgentSandboxSettingId.AgentSandboxWindowsSchemaVersion)
642 > : undefined; terminalSandboxEngine.ts
643 const runtimeSetting = this._getSettingValue<Record<string, unknown>>(AgentSandboxSettingId.AgentSandboxAdvancedRuntime) ?? {};
644 const commandRuntimeSetting = getTerminalSandboxRuntimeConfigurationForCommands(this._os, this._commandAllowListCommandDetails);
666 denyReadPaths = await this._resolveFileSystemPaths(this._updateDenyReadPathsWithHome([...(macFileSystemSetting.denyRead ?? []), configFilePath]));
667 denyWritePaths = macFileSystemSetting.denyWrite ? await this._resolveFileSystemPaths(macFileSystemSetting.denyWrite) : undefined;
668 > } else if (this._os === OperatingSystem.Linux) { terminalSandboxEngine.ts
669 allowWritePaths = (await this._resolveFileSystemPaths(await this._updateAllowWritePathsWithWorkspaceFolders(linuxFileSystemSetting.allowWrite, commandRuntimeAllowWritePaths))).filter(path => path !== configFilePath);
670 allowReadPaths = await this._resolveFileSystemPaths(await this._updateAllowReadPathsWithAllowWrite(linuxFileSystemSetting.allowRead, allowWritePaths, commandRuntimeAllowReadPaths));
684 env: this._windowsMxcEnvironment ?? [],
685 }, this._buildSandboxPayload) : {
686 > network: allowNetwork ? { allowedDomains: [], deniedDomains: [], enabled: false } : this.getResolvedNetworkDomains(), terminalSandboxEngine.ts
687 > filesystem: {
688 > denyRead: denyReadPaths,
689 > allowRead: allowReadPaths,
690 > allowWrite: allowWritePaths,
691 > denyWrite: denyWritePaths,
692 > },
693 > };
694 if (this._os !== OperatingSystem.Windows) {
695 > const sandboxRuntimeSettings = sandboxSettings as Record<string, unknown>; terminalSandboxEngine.ts
696 > this._mergeAdditionalSandboxConfigProperties(sandboxRuntimeSettings, runtimeSetting);
697 > this._mergeAdditionalSandboxConfigProperties(sandboxRuntimeSettings, commandRuntimeSetting);
698 > if (this._os === OperatingSystem.Macintosh) {
699 sandboxRuntimeSettings.allowPty ??= true;
700 }
702 this._sandboxConfigPath = configFilePath;
703 await this._fileService.createFile(configFileUri, VSBuffer.fromString(JSON.stringify(sandboxSettings, null, '\t')), { overwrite: true });
857
858 private _mergeAdditionalSandboxConfigProperties(target: Record<string, unknown>, additional: Record<string, unknown>): void {
859 > for (const [key, value] of Object.entries(additional)) { terminalSandboxEngine.ts
860 if (!Object.prototype.hasOwnProperty.call(target, key)) {
861 target[key] = value;
868 }
869 }
871
872 private _isObjectForSandboxConfigMerge(value: unknown): value is Record<string, unknown> {