Skip to content

nes: hardcode nextcursorline cursor placement to beforeLine, remove config#313484

Merged
ulugbekna merged 1 commit intomainfrom
ulugbekna/agents/nextcursorline-default-placement-update
May 2, 2026
Merged

nes: hardcode nextcursorline cursor placement to beforeLine, remove config#313484
ulugbekna merged 1 commit intomainfrom
ulugbekna/agents/nextcursorline-default-placement-update

Conversation

@ulugbekna
Copy link
Copy Markdown
Contributor

Summary

Hardcodes the next-cursor-line prediction cursor placement to BeforeLine (first non-whitespace character of the predicted line) and removes all code supporting the configurable AfterLine alternative.

Changes

  • nextCursorLinePrediction.ts — Removed NextCursorLinePredictionCursorPlacement enum, its VALIDATOR, and the now-unused vEnum import.
  • configurationService.ts — Removed InlineEditsNextCursorPredictionCursorPlacement (experiment-based setting chat.advanced.inlineEdits.nextCursorPrediction.cursorPlacement) and its import.
  • xtabProvider.ts — Dropped the config read and switch statement; getNextCursorColumn(line) now unconditionally returns the column of the first non-whitespace character.
  • xtabProvider.spec.ts — Removed AfterLine test cases and the placement parameter from colWithMarker; kept the BeforeLine cases (renamed without prefix).

Testing

  • Type-check (npx tsgo --noEmit --project tsconfig.json and tsconfig.worker.json): ✅
  • xtabProvider.spec.ts (176 tests): ✅

…onfig

The AfterLine placement was never the desired default. Remove the
NextCursorLinePredictionCursorPlacement enum and the associated
experiment-based config key, and simplify getNextCursorColumn to
always place the cursor at the first non-whitespace character of
the predicted line (BeforeLine behaviour).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 11:10
Copy link
Copy Markdown
Contributor

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

Hardcodes next-cursor-line prediction cursor placement to BeforeLine (first non-whitespace character) across the Copilot inline edits “xtab” flow, and removes the experiment/config plumbing for the previously supported AfterLine alternative.

Changes:

  • Removed NextCursorLinePredictionCursorPlacement and its validator from the shared inline-edits data types.
  • Removed the experiment-based setting chat.advanced.inlineEdits.nextCursorPrediction.cursorPlacement from the Copilot configuration service.
  • Simplified XtabProvider.getNextCursorColumn(...) and updated tests to cover only the hardcoded BeforeLine behavior.
Show a summary per file
File Description
extensions/copilot/src/platform/inlineEdits/common/dataTypes/nextCursorLinePrediction.ts Removes the cursor placement enum + validator now that placement is no longer configurable.
extensions/copilot/src/platform/configuration/common/configurationService.ts Drops the experiment-based config key and associated import.
extensions/copilot/src/extension/xtab/node/xtabProvider.ts Removes config read/switch; always computes cursor column as first non-whitespace.
extensions/copilot/src/extension/xtab/test/node/xtabProvider.spec.ts Removes AfterLine test cases and updates helpers to match the new API.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0

@ulugbekna ulugbekna merged commit d7c343d into main May 2, 2026
30 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/agents/nextcursorline-default-placement-update branch May 2, 2026 09:57
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone May 2, 2026
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