Skip to content

feat: Add platform-specific terminal context (#5659) #5661

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roomote-bot
Copy link
Collaborator

@roomote-bot roomote-bot commented Jul 13, 2025

Fixes #5659

This PR enhances Roo's terminal command generation by adding platform-specific context to the system prompt.

Changes Made

  • Added platform-specific terminal guidance in system-info.ts
  • Enhanced execute_command tool with platform-appropriate examples
  • Supports Windows (PowerShell/CMD), macOS (Zsh/Bash), and Linux (Zsh/Bash)
  • Provides command syntax, operators, path separators, and tool recommendations

Testing

  • All existing tests pass with updated snapshots
  • Verified platform detection works correctly
  • Confirmed backward compatibility

This resolves the issue where Roo would use inappropriate terminal commands for the user's platform.


Important

Adds platform-specific terminal context and examples to improve command generation for different operating systems and shells.

  • Behavior:
    • Adds platform-specific terminal context in system-info.ts for Windows, macOS, and Linux.
    • Enhances execute_command tool in execute-command.ts with platform-appropriate examples.
    • Supports Windows (PowerShell/CMD), macOS (Zsh/Bash), and Linux (Zsh/Bash).
    • Provides command syntax, operators, path separators, and tool recommendations.
  • Testing:
    • All existing tests pass with updated snapshots.
    • Verified platform detection works correctly.
    • Confirmed backward compatibility.

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

- Enhanced system prompt with platform-specific terminal guidance
- Added shell-specific command examples and best practices
- Improved execute_command tool with platform-appropriate examples
- Supports Windows (PowerShell/CMD), macOS (Zsh/Bash), and Linux (Zsh/Bash)
- Provides command syntax, operators, path separators, and tool recommendations
- Updated test snapshots to include new platform context

Fixes #5659
@roomote-bot roomote-bot requested review from mrubens, cte and jr as code owners July 13, 2025 11:36
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 13, 2025
@dosubot dosubot bot added the enhancement New feature or request label Jul 13, 2025
Copy link

delve-auditor bot commented Jul 13, 2025

No security or compliance issues detected. Reviewed everything up to d791a53.

Security Overview
  • 🔎 Scanned files: 15 changed file(s)
Detected Code Changes
Change Type Relevant files
Enhancement ► system-info.ts
    Add platform-specific terminal context for different OS and shells
► execute-command.ts
    Add platform-specific command examples

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

Add platform specific terminal context.
2 participants