Skip to content

fix: disable Next Edit cursor events when feature is disabled - #7555

Merged
exigow merged 1 commit into
mainfrom
exigow/disable-next-edit-handler
Sep 4, 2025
Merged

exigow merged 1 commit into
mainfrom
exigow/disable-next-edit-handler

Conversation

@exigow

@exigow exigow commented Sep 3, 2025 •

Copy link
Copy Markdown
Contributor

Introduce cache-like service to enable checking the Next Edit status in a non-blocking way (e.g., while moving the cursor/selection or triggering autocompletion).

Checking this status is problematic on the EDT because it requires making a request to the binary (settings JSON) and decrypting the username from the PasswordSafe, which is considered a slow operation.

Solves #7473
Related to #5819


Summary by cubic

Disable Next Edit cursor/selection handling when the feature is off, and add a cached status check to avoid blocking the EDT. This prevents exceptions during cursor moves and autocomplete, and avoids unnecessary work.

  • Bug Fixes
    • Added NextEditStatusService to cache the “Next Edit enabled” state and update it in the background.
    • ActiveHandlerManager now skips caret and selection events when Next Edit is disabled.
    • ContinueInlineCompletionProvider uses NextEditStatusService instead of a blocking NextEditUtils check; removed duplicated support-checking logic from NextEditUtils.

@exigow
exigow requested a review from a team as a code owner September 3, 2025 18:22
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 3, 2025
@github-actions

github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

⚠️ AI review completed but no review output was generated. Check the action logs for details.


💡 To request a new review, comment @continue-general-review

Problem: To check if Next Edit is enabled, we need to make a request to the binary (+ read a settings JSON), which is suspendable/considered as "slow operation" and not suitable for blocking in events like caretPositionChanged/selection change.

Solution: This cache solves the problem with EDT violation exceptions when moving the cursor/selection.
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Sep 3, 2025
@exigow
exigow merged commit a8bedf4 into main Sep 4, 2025
@exigow
exigow deleted the exigow/disable-next-edit-handler branch September 4, 2025 11:56
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 4, 2025
@sestinj

sestinj commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants