NES: enable trigger on active editor change by default#309489
Merged
NES: enable trigger on active editor change by default#309489
Conversation
- Set triggerOnEditorChangeAfterSeconds default to 10 (was undefined) - Set triggerOnEditorChangeStrategy default to AfterAcceptance (was Always) - Replace unconditional same-line cooldown bypass with smart reset: cooldown is enforced within a file session but clears when switching away and returning, so NES re-triggers on the same line after a round-trip to another file - Update tests to match new defaults and behavior
Contributor
|
This PR will be automatically cherry-picked to |
Contributor
Screenshot ChangesBase: Changed (5) |
Contributor
There was a problem hiding this comment.
Pull request overview
Enables Next Edit Suggestions (NES) triggering on active editor (document) switches by default, and adjusts same-line cooldown handling so it remains enforced within a file session while resetting after switching away and returning.
Changes:
- Change default
triggerOnEditorChangeAfterSecondsfromundefinedto10to enable editor-switch triggering by default. - Change default document-switch trigger strategy from
AlwaystoAfterAcceptance. - Enforce same-line cooldown even when document-switch triggering is enabled, and reset cooldown when switching documents.
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/src/platform/configuration/common/configurationService.ts | Updates default config values for editor-switch triggering and strategy. |
| extensions/copilot/src/extension/inlineEdits/vscode-node/inlineEditTriggerer.ts | Clears same-line trigger state on document switches and removes the prior cooldown bypass tied to editor-switch triggering. |
| extensions/copilot/src/extension/inlineEdits/test/vscode-node/inlineEditTriggerer.spec.ts | Updates document-switch tests for AfterAcceptance default and rewrites cooldown test for switch-away/back behavior. |
| extensions/copilot/package.json | Sets the contributed configuration default for triggerOnEditorChangeAfterSeconds to 10. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 1
roblourens
approved these changes
Apr 13, 2026
ulugbekna
added a commit
that referenced
this pull request
Apr 13, 2026
* NES: enable trigger on active editor change by default - Set triggerOnEditorChangeAfterSeconds default to 10 (was undefined) - Set triggerOnEditorChangeStrategy default to AfterAcceptance (was Always) - Replace unconditional same-line cooldown bypass with smart reset: cooldown is enforced within a file session but clears when switching away and returning, so NES re-triggers on the same line after a round-trip to another file - Update tests to match new defaults and behavior * fix indentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Enable NES triggering on active editor change by default and improve same-line cooldown behavior.
Changes
Default config changes:
triggerOnEditorChangeAfterSeconds:undefined→10— NES now triggers when switching editors by defaulttriggerOnEditorChangeStrategy:Always→AfterAcceptance— document switch only triggers NES if the last suggestion was acceptedSame-line cooldown behavior change:
triggerOnEditorChangeAfterSecondswas set, the same-line cooldown was completely disabled — every cursor move on the same line re-triggered NESTest updates
lastOutcome = NesOutcome.Acceptedto document-switch tests (needed withAfterAcceptancedefault)