Add optional way to enforce no file edits in plan mode #5299
+79
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Issue: #4387
Description
Add menu checkbox which allows you to programmatically prevent Cline from editing files while in Plan mode. There are other tool calls which could also be added to this exclusion list, but to start it will just be
replace_in_file
andwrite_to_file
. It will by default be turned off meaning the default functionality of Cline will remain exactly the same as it is currently (eg you can edit files in plan mode).Test Procedure
Have Cline use file editing tools in plan mode when you turn the menu checkbox ("Enable strict plan mode") for this on and off. When its selected on, Cline should throw an error when attempting to edit a file in plan mode, otherwise it should succeed.
Type of Change
Pre-flight Checklist
npm test
) and code is formatted and linted (npm run format && npm run lint
)npm run changeset
(required for user-facing changes)Screenshots
Menu item:

Video of usage:
interaction.video.mov
Additional Notes