Skip to content

Add terminal-only mode and UI adjustments - #294035

Closed
Daryl (darylcecile) wants to merge 2 commits into
microsoft:mainfrom
darylcecile:darylcecile/terminal-mode
Closed

Daryl (darylcecile) wants to merge 2 commits into
microsoft:mainfrom
darylcecile:darylcecile/terminal-mode

Conversation

@darylcecile

@darylcecile Daryl (darylcecile) commented Feb 9, 2026 •

Copy link
Copy Markdown

[EXPERIMENTAL] #34442

What
Introduce a terminal-only mode driven by a new --terminal CLI flag and environmentService. Adds 'terminal' to NativeParsedArgs and OPTIONS (-t alias) and exposes terminal on browser/electron/common environment services.

image

Why
Im a fan of the vscode terminal and wish there was a way i could open just that minus all the other distractions. Now I can do code --terminal.

How
Using existing features (ContextKeyExpr, LayoutClasses, shouldBeHidden, etc.) and guards to disable the "other distractions" and only showing the terminal. Loads everything else as normal so in theory everything else should still work. Introduces TerminalModeContext and uses it across workbench to adjust behavior: hide editors/activity/side/auxiliary bars, force panel visibility/focus, block panel hiding/showing of auxiliary bar, hide non-terminal panel view containers, suppress panel title actions, and disable command center and startup page in terminal mode. Adds a .terminal-mode CSS class to hide per-composite toolbar/global actions.

Important

This is more a proof of concept (and for personal use) at this stage. I have not tested the impact of this on the rest of the codebase 🤷🏽

Introduce a terminal-only mode driven by a new --terminal CLI flag and environmentService. Adds 'terminal' to NativeParsedArgs and OPTIONS (-t alias) and exposes terminal on browser/electron/common environment services. Introduces TerminalModeContext and uses it across workbench to adjust behavior: hide editors/activity/side/auxiliary bars, force panel visibility/focus, block panel hiding/showing of auxiliary bar, hide non-terminal panel view containers, suppress panel title actions, and disable command center and startup page in terminal mode. Adds a .terminal-mode CSS class to hide per-composite toolbar/global actions. Also expands AGENTS.md with build, test, style and contributor guidance.
Copilot AI review requested due to automatic review settings February 9, 2026 23:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an experimental “terminal-only” workbench mode that can be launched via a new --terminal (-t) CLI flag, and propagates that mode through environment services + a context key to adjust UI/behavior across the workbench.

Changes:

  • Introduces --terminal / -t CLI option and plumbs it through NativeParsedArgs and workbench environment services (environmentService.terminal).
  • Adds TerminalModeContext (isTerminalMode) and uses it to hide/disable panel title actions and other UI (eg command center, startup page).
  • Adjusts layout/runtime state and CSS to hide non-terminal UI surfaces and enforce panel focus/visibility in terminal mode.

Reviewed changes

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

Show a summary per file
File Description
src/vs/platform/environment/common/argv.ts Adds terminal to NativeParsedArgs.
src/vs/platform/environment/node/argv.ts Registers --terminal / -t CLI option.
src/vs/workbench/services/environment/common/environmentService.ts Extends IWorkbenchEnvironmentService with terminal: boolean.
src/vs/workbench/services/environment/browser/environmentService.ts Exposes terminal via browser payload.
src/vs/workbench/services/environment/electron-browser/environmentService.ts Exposes terminal via native CLI args.
src/vs/workbench/common/contextkeys.ts Introduces TerminalModeContext context key.
src/vs/workbench/browser/contextkeys.ts Binds TerminalModeContext from environmentService.terminal.
src/vs/workbench/browser/layout.ts Applies terminal-mode layout defaults, focus behavior, CSS class, and blocks panel/auxbar toggles.
src/vs/workbench/browser/parts/paneCompositeBar.ts Hides non-terminal panel view containers in terminal mode.
src/vs/workbench/browser/parts/panel/panelActions.ts Suppresses panel title actions (hide/maximize) in terminal mode via context key.
src/vs/workbench/browser/parts/panel/media/panelpart.css Hides panel title toolbars/global actions under .terminal-mode.
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts Disables Command Center visibility in terminal mode.
src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.ts Disables startup page in terminal mode.

Comment thread src/vs/workbench/browser/layout.ts Resolved
'remove': { type: 'boolean', cat: 'o', args: 'folder', description: localize('remove', "Remove folder(s) from the last active window.") },
'goto': { type: 'boolean', cat: 'o', alias: 'g', args: 'file:line[:character]', description: localize('goto', "Open a file at the path on the specified line and character position.") },
'new-window': { type: 'boolean', cat: 'o', alias: 'n', description: localize('newWindow', "Force to open a new window.") },
'terminal': { type: 'boolean', cat: 'o', alias: 't', description: localize('terminal', "Open a terminal window.") },

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

The CLI help text "Open a terminal window." is ambiguous given this flag enables terminal-only mode (per PR description). It would be clearer to describe that it opens a terminal-only window (no editor UI), to avoid confusion with simply toggling the integrated terminal in a normal window.

Copilot uses AI. Check for mistakes.
Comment on lines 75 to 84
MenuRegistry.appendMenuItem(MenuId.PanelTitle, {
command: {
id: TogglePanelAction.ID,
title: localize('closePanel', 'Hide Panel'),
icon: closeIcon
},
group: 'navigation',
order: 2
order: 2,
when: TerminalModeContext.negate()
});

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

Hiding the PanelTitle menu item via when: TerminalModeContext.negate() helps, but TogglePanelAction is still f1: true (and has keybinding) so it remains available in the Command Palette in terminal mode where it becomes a no-op due to the layout guard. Consider adding a precondition/when to the action (and/or its keybinding/menu entries) so the command is disabled/hidden in terminal mode rather than silently doing nothing.

Copilot uses AI. Check for mistakes.
@darylcecile

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@Tyriar Daniel Imms (Tyriar) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is cool but it's a pretty long way off the changes that would actually be needed to accomplish this. What this does is forcefully strips away some functionality based on some args which isn't good for the codebase in the long term. My hope is that such a feature would actually launch basically an existing "Terminal Window" which you can open with this command:

Image

This will open the terminal in a special minimal state, the downside being you can't launch it via the CLI and it needs to come from a parent workbench window:

Image

Docs: https://code.visualstudio.com/docs/terminal/basics#_terminals-in-new-windows

@darylcecile

Copy link
Copy Markdown
Author

Oh Thank you, i missed the window option! I'll have another go :)

@anthonykim1

Copy link
Copy Markdown
Contributor

Thanks for the PR. As discussed, this approach strips down the main workbench instead of building on the existing Terminal Window architecture. Closing this draft, while the broader feature request remains tracked in #34442. Please let us know if you think this is incorrect or are still interested in another attempt!

@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants