Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Jan 26, 2025

Previous behavior I added in #523 had an annoying side effect of not erroring out on writes to invalid file types until the user attempted to save the file. This is because I didn't want to validate the file path suffix while it was still streaming in, but I think this is a better approach - to wait until the content shows up and assume we have the full path then.


Important

Validate file restrictions before tool execution to throw errors sooner, with updates in Cline.ts, modes.ts, and modes.test.ts.

  • Behavior:
    • Validate file restrictions before tool execution in Cline.ts, ensuring errors are thrown sooner.
    • Update isToolAllowedForMode() in modes.ts to check file path and content/diff before allowing tool execution.
  • Tests:
    • Update tests in modes.test.ts to include content/diff in isToolAllowedForMode() calls, ensuring early error detection.
    • Add tests for partial streaming cases and custom mode descriptions in modes.test.ts.

This description was created by Ellipsis for 5d20477. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2025

🦋 Changeset detected

Latest commit: 5d20477

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
roo-cline Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mrubens mrubens merged commit 6b3fffc into main Jan 26, 2025
6 checks passed
@mrubens mrubens deleted the better_file_suffix_check branch January 26, 2025 13:21
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.

2 participants