feat: add preventFocusDisruption setting to prevent editor focus stealing #6035
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.
This PR implements an experimental setting to prevent file edits from stealing focus, addressing the issue where diff views disrupt the user's workflow.
Summary
When Roo Code edits files, it opens diff views that steal focus from whatever the user is currently working on. This creates a frustrating experience where users cannot work alongside Roo effectively. This PR adds a new experimental setting
roo-cline.preventFocusDisruptionthat prevents this behavior.Changes
roo-cline.preventFocusDisruption(default: false)DiffViewProviderto check the setting before showing documents or focusingTesting
preventFocusDisruptionsettingUser Experience
When the setting is enabled:
Fixes #4784
Important
Adds
roo-cline.preventFocusDisruptionsetting to prevent file edits from stealing focus, with updates toDiffViewProviderand new tests.roo-cline.preventFocusDisruptionsetting (default: false) to prevent file edits from stealing focus.DiffViewProviderto respect this setting, allowing file edits to occur in the background.DiffViewProvider.spec.tsforpreventFocusDisruptionsetting.preventFocusDisruptionsetting description inpackage.nls.json.This description was created by
for e4a3e79. You can customize this summary. It will automatically update as commits are pushed.