Skip to content

Conversation

@ulugbekna
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 5, 2026 13:21
@ulugbekna ulugbekna enabled auto-merge January 5, 2026 13:21
@ulugbekna ulugbekna self-assigned this Jan 5, 2026
@ulugbekna ulugbekna force-pushed the ulugbekna/known-dove branch from e47f9d7 to e43b4cf Compare January 5, 2026 13:21
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Jan 5, 2026
Copy link
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

This PR fixes a bug where modelNotSeenLineNumber errors occurred due to incorrect calculation of the keptRange in clipped documents. The root cause was that areaAroundCodeToEdit was being treated as a single string (counted as 1 line) when building the taggedCurrentFileContent array, causing the keptRange.endExclusive to be computed incorrectly.

Key Changes:

  • Refactored areaAroundCodeToEdit parameter from string to string[] in createTaggedCurrentFileContentUsingPagedClipping to correctly represent it as an array of lines
  • Updated all intermediate variables and array operations to work with string[] instead of joining/splitting strings
  • Converted back to string only at the final return boundary where PromptPieces expects a string

Reviewed changes

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

File Description
src/extension/xtab/common/promptCrafting.ts Changed areaAroundCodeToEdit parameter type from string to string[], updated array spreading to use ...areaAroundCodeToEdit, and converted back to string at return point
src/extension/xtab/test/common/promptCrafting.spec.ts Updated test helper to split the string input into array before calling the function

@ulugbekna ulugbekna added this pull request to the merge queue Jan 5, 2026
Merged via the queue into main with commit 0dee02e Jan 5, 2026
19 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/known-dove branch January 5, 2026 13:56
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