Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

NES was making unnecessary nextCursorPosition API calls when the edit window already spans the entire document. Any predicted cursor line would fall within the edit window and be rejected with withinEditWindow error anyway.

Changes

  • xtabProvider.ts: Early-out in doGetNextEditsWithCursorJump when editWindowLinesRange.containsRange(entireFileRange)
  • Telemetry tracking via editWindowCoversWholeFile error type
const entireFileRange = OffsetRange.ofLength(promptPieces.currentDocument.lines.length);
if (promptPieces.editWindowLinesRange.containsRange(entireFileRange)) {
    telemetryBuilder.setNextCursorLineError('editWindowCoversWholeFile');
    return noSuggestions;
}

This commonly triggers for new/small files where the default edit window naturally covers the full document.

Original prompt

This section details on the original issue you should resolve

<issue_title>NES: don't trigger next cursor line prediction when edit window is already the whole file</issue_title>
<issue_description>Image</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix cursor line prediction when editing whole file NES: Skip next cursor prediction when edit window covers entire file Jan 22, 2026
Copilot AI requested a review from ulugbekna January 22, 2026 15:50
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.

NES: don't trigger next cursor line prediction when edit window is already the whole file

2 participants