Skip to content

Add terminal history commands to view overflow menu #250771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 13, 2025
Merged

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 5, 2025

Adds "Go to Recent Directory" and "Run Recent Command" to the terminal view overflow menu to provide easier access to terminal history functionality.

Changes

  • Added TerminalHistoryCommandId.GoToRecentDirectory to terminal view menu with folder icon
  • Added TerminalHistoryCommandId.RunRecentCommand to terminal view menu with history icon
  • Both commands are marked isHiddenByDefault: true to appear in the overflow menu (... button)
  • Commands are ordered as 7 and 8 to create logical functional grouping:
    • Orders 0-3: Core terminal management (Switch, Focus, Split, Kill)
    • Orders 4-6: Terminal operations (Clear, Run Active File, Run Selected Text)
    • Orders 7-8: History operations (Go to Directory, Run Recent Command)

Implementation Details

The implementation leverages existing terminal history commands that were already available via keyboard shortcuts but not accessible through the UI menu. This provides a more discoverable way for users to access recent directory navigation and command re-execution features.

Both commands integrate with VS Code's existing terminal history infrastructure and maintain consistency with other overflow menu items in terms of structure, naming, and behavior.

Fixes #250770.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…w menu

Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Add more overflow items to terminal view menu Add terminal history commands to view overflow menu Jun 5, 2025
@Copilot Copilot AI requested a review from Tyriar June 5, 2025 19:08
Copilot finished work on behalf of Tyriar June 5, 2025 19:08
@Tyriar Tyriar force-pushed the copilot/fix-250770 branch from 6d5e399 to 394deb3 Compare June 5, 2025 19:19
@Tyriar
Copy link
Member

Tyriar commented Jun 5, 2025

image

@Tyriar Tyriar requested a review from meganrogge June 5, 2025 20:05
@Tyriar Tyriar added this to the June 2025 milestone Jun 5, 2025
@Tyriar Tyriar marked this pull request as ready for review June 5, 2025 20:05
meganrogge
meganrogge previously approved these changes Jun 5, 2025
@Tyriar Tyriar enabled auto-merge June 6, 2025 15:08
@Tyriar Tyriar merged commit 17447d7 into main Jun 13, 2025
8 checks passed
@Tyriar Tyriar deleted the copilot/fix-250770 branch June 13, 2025 16:03
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.

Add more overflow items to terminal view menu
4 participants