Skip to content

Conversation

@nzshock
Copy link

@nzshock nzshock commented Jun 24, 2025

This PR deploys the updated prompt generation code with the new CRITICAL_RULES section.


Important

Introduces critical shell command syntax rules and PowerShell syntax validation in TerminalProcess to ensure command compatibility and error handling.

  • Rules Update:
    • Added CRITICAL_RULES section in rules.ts for shell command syntax, requiring semicolons for PowerShell commands.
  • Terminal Process:
    • Added validatePowerShellSyntax() in TerminalProcess.ts to check PowerShell command syntax before execution.
    • Emits syntax error and continues if validation fails, ensuring commands are compatible with PowerShell.

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

nzshock added 3 commits June 25, 2025 00:35
Implements the pre-flight syntax checker for all commands executed by Roo in a PowerShell environment, as specified in BRIEF_001_Roo_Syntax_Checker. This adds a validation step that writes the command to a temporary file, checks for diagnostics from the PowerShell extension, and blocks execution if any errors are found, returning the error to the user. This addresses the systemic flaw of Roo repeatedly using incorrect syntax.
This commit fixes a TypeScript error in the new PowerShell syntax validation logic. The original implementation used a .catch() on a Thenable, which is not supported. This has been replaced with a standard 	ry...catch block to correctly handle potential errors during temporary file deletion.
@nzshock nzshock requested review from cte, jr and mrubens as code owners June 24, 2025 12:51
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jun 24, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 24, 2025
@daniel-lxs
Copy link
Member

Hey @nzshock, thank you for your contribution!

We’ve recently adopted a clearer issue-first workflow to help us better understand and review pull requests. The idea is to use the linked issue to verify whether a fix is appropriate and to reproduce the original problem to confirm that it’s resolved.

I recommend creating an issue and associating it with this PR so we can properly review it. I’ll temporarily close this PR for now, but feel free to reach out if you have any questions!

@daniel-lxs daniel-lxs closed this Jun 24, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jun 24, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 24, 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:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants