Skip to content

Conversation

ulugbekna
Copy link
Contributor

it now respects last edit time and doesn't trigger after N seconds

@Copilot Copilot AI review requested due to automatic review settings October 21, 2025 12:41
@ulugbekna ulugbekna enabled auto-merge October 21, 2025 12:41
@ulugbekna ulugbekna self-assigned this Oct 21, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR converts the inline edits trigger mechanism from a simple boolean toggle to a time-based system. Instead of triggering on any editor change, the feature now only triggers when switching editors within N seconds of the last edit, where N is configurable.

Key Changes

  • Changed configuration from boolean triggerOnEditorChange to time-based triggerOnEditorChangeAfterSeconds (default: undefined, team default: 10 seconds)
  • Added lastEditTimestamp tracking to record when the last edit occurred
  • Updated trigger logic to check elapsed time since last edit before triggering on editor switches

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/platform/configuration/common/configurationService.ts Replaced boolean config with time-based config (seconds)
src/extension/inlineEdits/vscode-node/inlineEditModel.ts Added timestamp tracking and time-based trigger logic for editor switches
src/extension/inlineEdits/node/nextEditCache.ts Updated cache invalidation check to use new time-based config

…time-based

    it now respects last edit time and doesn't trigger after N seconds
@ulugbekna ulugbekna force-pushed the ulugbekna/nes-trigger-on-editor-change branch from 6c5d75f to 229e43b Compare October 21, 2025 12:44
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 21, 2025
@ulugbekna ulugbekna closed this Oct 21, 2025
auto-merge was automatically disabled October 21, 2025 13:16

Pull request was closed

@ulugbekna ulugbekna reopened this Oct 21, 2025
@ulugbekna ulugbekna added this pull request to the merge queue Oct 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 21, 2025
@ulugbekna ulugbekna added this pull request to the merge queue Oct 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 21, 2025
@ulugbekna
Copy link
Contributor Author

@microsoft-github-policy-service rerun

@ulugbekna ulugbekna added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit 5b4311a Oct 21, 2025
20 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/nes-trigger-on-editor-change branch October 21, 2025 15:54
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.

3 participants