Skip to content

[cherry-pick] NES: enable trigger on active editor change by default#309503

Closed
vs-code-engineering[bot] wants to merge 1 commit intorelease/1.116from
cherry-pick/309489
Closed

[cherry-pick] NES: enable trigger on active editor change by default#309503
vs-code-engineering[bot] wants to merge 1 commit intorelease/1.116from
cherry-pick/309489

Conversation

@vs-code-engineering
Copy link
Copy Markdown
Contributor

Cherry-pick of #309489 from main.

Summary

Enable NES triggering on active editor change by default and improve same-line cooldown behavior.

Changes

Default config changes:

  • triggerOnEditorChangeAfterSeconds: undefined10 — NES now triggers when switching editors by default
  • triggerOnEditorChangeStrategy: AlwaysAfterAcceptance — document switch only triggers NES if the last suggestion was accepted

Same-line cooldown behavior change:

  • Before: When triggerOnEditorChangeAfterSeconds was set, the same-line cooldown was completely disabled — every cursor move on the same line re-triggered NES
  • After: Same-line cooldown is always enforced within a file session but resets when switching away and returning. Example:
    1. User triggers NES in file A on line 10 → cooldown active
    2. Cursor moves on same line → blocked by cooldown
    3. User switches to file B → file A's line cooldowns are cleared
    4. User returns to file A, line 10 → triggers again

Test updates

  • Added lastOutcome = NesOutcome.Accepted to document-switch tests (needed with AfterAcceptance default)
  • Rewrote cooldown bypass test to verify the new switch-away-and-back behavior

@vs-code-engineering vs-code-engineering bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Apr 13, 2026
@ulugbekna ulugbekna enabled auto-merge (squash) April 13, 2026 16:26
@ulugbekna ulugbekna closed this Apr 13, 2026
auto-merge was automatically disabled April 13, 2026 16:45

Pull request was closed

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

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant