Skip to content

Add optional way to enforce no file edits in plan mode #5299

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

Merged
merged 3 commits into from
Aug 4, 2025

Conversation

0xToshii
Copy link
Contributor

@0xToshii 0xToshii commented Aug 2, 2025

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 and write_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

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Menu item:
menu

Video of usage:

interaction.video.mov

Additional Notes

Copy link
Contributor

github-actions bot commented Aug 2, 2025

Coverage Report

Extension Coverage

Base branch: 47%

PR branch: 48%

✅ Coverage increased or remained the same

Webview Coverage

Base branch: 17%

PR branch: 17%

⚠️ Warning: Coverage decreased by 0.01%

Consider adding tests to cover your changes.

Overall Assessment

⚠️ Test coverage has decreased in this PR

Please consider adding tests to maintain or improve coverage.

Last updated: 2025-08-02T01:17:42.829392

@canvrno
Copy link
Contributor

canvrno commented Aug 4, 2025

image

@0xToshii 0xToshii merged commit d86b7dd into main Aug 4, 2025
15 of 16 checks passed
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