Conversation
…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>
Contributor
There was a problem hiding this comment.
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
NextCursorLinePredictionCursorPlacementand its validator from the shared inline-edits data types. - Removed the experiment-based setting
chat.advanced.inlineEdits.nextCursorPrediction.cursorPlacementfrom 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
hediet
approved these changes
Apr 30, 2026
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
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
AfterLinealternative.Changes
nextCursorLinePrediction.ts— RemovedNextCursorLinePredictionCursorPlacementenum, itsVALIDATOR, and the now-unusedvEnumimport.configurationService.ts— RemovedInlineEditsNextCursorPredictionCursorPlacement(experiment-based settingchat.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— RemovedAfterLinetest cases and theplacementparameter fromcolWithMarker; kept theBeforeLinecases (renamed without prefix).Testing
npx tsgo --noEmit --project tsconfig.jsonandtsconfig.worker.json): ✅xtabProvider.spec.ts(176 tests): ✅