copilotShellTools.ts ×5

Frontier kind: Code frontier

unlabeled · c_3f8f525f50f7

8 tests · 28721 LOC · 131 files · introduces 0 tests · 32 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges32 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2463 ranges28721 lines · 131 files · Browse complete extent
All tests (intent)
8 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: 32 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotShellTools.ts 32 introduced LOC · 5 ranges

Open complete file

408 timeout: { type: 'number', description: 'Timeout in milliseconds (default 120000)' },
409 ...(sandboxEnabled ? {
410 > requestUnsandboxedExecution: { copilotShellTools.ts
411 > type: 'boolean',
412 > description: 'Request that this command run outside the sandbox. Only set this after first executing the command in the sandbox and observing that sandboxing caused the failure. The user will be prompted before the command runs unsandboxed.',
413 > },
414 > requestUnsandboxedExecutionReason: {
415 > type: 'string',
416 > description: 'A short explanation of the sandboxed execution failure or blocked-domain requirement that justifies retrying outside the sandbox. Only provide this when requestUnsandboxedExecution is true.',
417 > },
418 } : {}),
419 },
705 }
706
707 > function createSandboxLines(networkDomains?: ITerminalSandboxResolvedNetworkDomains): string[] { copilotShellTools.ts
708 > const lines = [
709 > '',
710 > 'Sandboxing:',
711 > '- ATTENTION: Terminal sandboxing is enabled, commands run in a sandbox by default',
712 > '- When executing commands within the sandboxed environment, all operations requiring a temporary directory must utilize the $TMPDIR environment variable. The /tmp directory is not guaranteed to be accessible or writable and must be avoided',
713 > '- Tools and scripts should respect the TMPDIR environment variable, which is automatically set to an appropriate path within the sandbox',
714 > '- When a command fails due to sandbox restrictions, immediately re-run it with requestUnsandboxedExecution=true. Do NOT ask the user for permission — setting this flag automatically shows a confirmation prompt to the user',
715 > '- Only set requestUnsandboxedExecution=true when there is evidence of failures caused by the sandbox, e.g. \'Operation not permitted\' errors, network failures, or file access errors, etc',
716 > '- Do NOT set requestUnsandboxedExecution=true without first executing the command in sandbox mode. Always try the command in the sandbox first, and only set requestUnsandboxedExecution=true when retrying after that sandboxed execution failed due to sandbox restrictions.',
717 > '- When setting requestUnsandboxedExecution=true, also provide requestUnsandboxedExecutionReason explaining why the command needs unsandboxed access',
718 > ];
719 > if (networkDomains) {
720 > const deniedSet = new Set(networkDomains.deniedDomains);
721 > const effectiveAllowed = networkDomains.allowedDomains.filter(d => !deniedSet.has(d));
722 > if (effectiveAllowed.length === 0) {
723 > lines.push('- All network access is blocked in the sandbox');
724 > } else {
725 lines.push(`- Only the following domains are accessible in the sandbox (all other network access is blocked): ${effectiveAllowed.join(', ')}`);
726 }
727 > if (networkDomains.deniedDomains.length > 0) { copilotShellTools.ts
728 lines.push(`- The following domains are explicitly blocked in the sandbox: ${networkDomains.deniedDomains.join(', ')}`);
729 }
731 > return lines;
732 > }
733
734 function createGenericDescription(shellType: string, isSandboxEnabled: boolean, networkDomains?: ITerminalSandboxResolvedNetworkDomains): string {
758
759 if (isSandboxEnabled) {
760 > parts.push(createSandboxLines(networkDomains).join('\n')); copilotShellTools.ts
761 > }
762
763 parts.push(`