agentHostTerminalManager.ts ×5

Frontier kind: Joint frontier

unlabeled · c_b8307a6f3b47

1 test · 25878 LOC · 110 files · introduces 1 test · 32 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges32 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
2345 ranges25878 lines · 110 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

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

src/vs/platform/agentHost/node/agentHostTerminalManager.ts 26 introduced LOC · 5 ranges

Open complete file

302 env[AiAgentEnvVar] = AiAgentEnvValue;
303 if (options?.preventShellHistory) {
304 > // Picked up by the shell integration scripts to set HISTCONTROL=ignorespace agentHostTerminalManager.ts
305 > // (bash) / HIST_IGNORE_SPACE (zsh), or suppress PSReadLine history (pwsh).
306 > // Combined with the leading-space prefix applied at command-write time, this
307 > // prevents agent-executed commands from polluting the user's shell history.
308 > env['VSCODE_PREVENT_SHELL_HISTORY'] = '1';
309 > }
310 // Zsh-specific fixups for agent tool terminals: disable bang history
311 // expansion and enable inline # comments.
312 if (params.claim?.kind === TerminalClaimKind.Session && isZsh(shell)) {
313 > env['VSCODE_AGENT_ZSH_FIXUPS'] = '1'; agentHostTerminalManager.ts
314 > }
315 if (options?.nonInteractive) {
316 > // Suppress paging and interactive prompts so that tool-spawned agentHostTerminalManager.ts
317 > // terminals produce clean, machine-friendly output. An empty
318 > // string disables paging in git, less, and most CLI tools and
319 > // is safe on all platforms (unlike 'cat' which isn't on Windows PATH).
320 > env['LC_ALL'] = 'C.UTF-8';
321 > env['PAGER'] = '';
322 > env['GIT_PAGER'] = '';
323 > env['GH_PAGER'] = '';
324 > env['GIT_TERMINAL_PROMPT'] = '0';
325 > env['DEBIAN_FRONTEND'] = 'noninteractive';
326 > }
327 let shellArgs: string[] = [];
328 if (platform.isMacintosh) {
362 }
363 if (injection.filesToCopy) {
364 > for (const f of injection.filesToCopy) { agentHostTerminalManager.ts
365 > try {
366 > await fs.promises.mkdir(dirname(f.dest), { recursive: true });
367 > await fs.promises.copyFile(f.source, f.dest);
368 > } catch {
369 // Swallow — another process may be using the same temp dir
370 }
372 > }
373 commandTracker = {
374 parser: new Osc633Parser(),
src/vs/platform/terminal/node/terminalEnvironment.ts 6 introduced LOC · 2 ranges

Open complete file

229 // - Others have no permissions (0)
230 if (!skipStickyBit) {
231 > // skip for tests terminalEnvironment.ts
232 > try {
233 > const chmodAsync = promisify(chmod);
234 > await chmodAsync(zdotdir, 0o1700);
235 > } catch (err) {
236 if (err.message.includes('ENOENT')) {
237 try {
252 return { type: 'failure', reason: ShellIntegrationInjectionFailureReason.FailedToSetStickyBit };
253 }
255 envMixin['ZDOTDIR'] = zdotdir;
256 const userZdotdir = env?.ZDOTDIR ?? os.homedir() ?? `~`;