Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 9, 2026

Related GitHub Issue

Closes: #10329

Description

This PR attempts to address the question from Issue #10329 about configuring the inline terminal to use PowerShell instead of cmd.exe on Windows.

The Problem:
The inline terminal (ExecaTerminalProcess) was using shell: true when calling execa, which defaults to the system shell (cmd.exe on Windows), ignoring the user's VSCode terminal profile settings.

The Solution:
Modified ExecaTerminalProcess.ts to use the existing getShell() utility function instead of shell: true. The getShell() function already reads the user's VSCode terminal configuration (terminal.integrated.defaultProfile.windows) and returns the appropriate shell path.

This means if a user has configured PowerShell as their default terminal profile in VSCode, the inline terminal will now respect that setting.

Test Procedure

  1. Run the updated tests: cd src && npx vitest run integrations/terminal/__tests__/ExecaTerminalProcess.spec.ts
  2. Manual testing on Windows:
    • Set terminal.integrated.defaultProfile.windows to a PowerShell profile in VSCode settings
    • Enable the inline terminal ("Use Inline Terminal" checked)
    • Run a command and verify it uses PowerShell syntax

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue
  • Scope: Changes are focused on the linked issue
  • Self-Review: Performed a thorough self-review
  • Testing: Updated tests to cover the new behavior
  • Documentation Impact: No documentation updates required
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines

Documentation Updates

  • No documentation updates are required.

Additional Notes

Feedback and guidance are welcome. This is an attempt to address the user's question about PowerShell support for the inline terminal.


Important

ExecaTerminalProcess now respects VSCode's shell configuration using getShell(), with updated tests to verify behavior.

  • Behavior:
    • ExecaTerminalProcess now uses getShell() instead of shell: true to respect VSCode's terminal.integrated.defaultProfile.windows setting.
    • Ensures UTF-8 encoding by setting LANG and LC_ALL to en_US.UTF-8.
  • Testing:
    • Updated ExecaTerminalProcess.spec.ts to mock getShell() and verify the correct shell is used.
    • Tests ensure environment variables are preserved and overridden correctly.

This description was created by Ellipsis for 36b98bd. You can customize this summary. It will automatically update as commits are pushed.

@roomote
Copy link
Contributor Author

roomote bot commented Jan 9, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The change from shell: true to shell: getShell() correctly respects VSCode's terminal configuration. The implementation is secure (shell paths validated against allowlist), well-tested, and follows existing patterns.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] Send Message to Proceed While Running Hangs Roo

3 participants