Skip to content

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Jan 27, 2026

Part of #290830

@Tyriar Tyriar added this to the February 2026 milestone Jan 27, 2026
@Tyriar Tyriar self-assigned this Jan 27, 2026
Copilot AI review requested due to automatic review settings January 27, 2026 14:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for agent CLIs (Claude, Codex, Copilot, and Gemini) to the terminal shell type detection system to enable proper terminal title changes when these CLIs are used as shells.

Changes:

  • Added four new GeneralShellType enum values for agent CLIs
  • Added mappings for these CLIs in the generalShellTypeMap for non-Windows platforms
  • Added Windows-specific executable recognition in SHELL_EXECUTABLES

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/vs/platform/terminal/common/terminal.ts Defines new GeneralShellType enum values for Claude, Codex, Copilot, and Gemini
src/vs/platform/terminal/node/terminalProcess.ts Adds generalShellTypeMap entries to recognize agent CLI names on non-Windows platforms
src/vs/platform/terminal/node/windowsShellHelper.ts Adds Windows executable names to SHELL_EXECUTABLES for agent CLIs
Comments suppressed due to low confidence (1)

src/vs/platform/terminal/node/windowsShellHelper.ts:41

  • Adding .ps1 files to SHELL_EXECUTABLES is unusual - typically only .exe files are process names in the Windows process tree. PowerShell scripts (.ps1) usually show up as powershell.exe or pwsh.exe processes in the process tree, not as the script filename. Verify that these agent CLIs actually appear as 'codex.ps1', 'copilot.ps1', and 'gemini.ps1' in the Windows process tree. If they don't, these entries may never match and should be removed or handled differently.
	'codex.ps1',
	'copilot.ps1',
	'gemini.ps1',

Comment on lines +152 to +155
Codex = 'codex',
Copilot = 'copilot',
Claude = 'claude',
Gemini = 'gemini',
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum values are not in alphabetical order. The new agent CLI entries (Claude, Codex, Copilot, Gemini) should come after Julia, NuShell, Node, and Xonsh to maintain alphabetical ordering, consistent with the pattern in PosixShellType enum.

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +74
['claude', GeneralShellType.Claude],
['codex', GeneralShellType.Codex],
['copilot', GeneralShellType.Copilot],
['gemini', GeneralShellType.Gemini],
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The map entries are not in alphabetical order. The new agent CLI entries (claude, codex, copilot, gemini) should be inserted after 'julia', 'node', 'nu', and 'xonsh' to maintain alphabetical ordering, consistent with the ordering in posixShellTypeMap above.

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +41
'claude.exe',
'codex.ps1',
'copilot.ps1',
'gemini.ps1',
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getShellType method in windowsShellHelper.ts needs to be updated to handle the newly added shell types. Currently, this method returns undefined for 'claude.exe', 'codex.ps1', 'copilot.ps1', and 'gemini.ps1' even though they are now recognized in SHELL_EXECUTABLES. Add cases for these executables that return the corresponding GeneralShellType values (GeneralShellType.Claude, GeneralShellType.Codex, GeneralShellType.Copilot, GeneralShellType.Gemini).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants