Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport vscode-v1.60.x] feat(auto-edits): fix the suffix duplication on inline accept #6590

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

sourcegraph-release-bot
Copy link
Collaborator

Context

For the auto-edits feature, the suffix is duplicated on every inline suffix. This is a regression from the current pre-release, and this is affecting almost every inline completion suggestion spanning multiple lines. This is happening because, for inline completion item acceptance:

  1. First vscode internally accepts the completion and replace in editor and
  2. Our custom acceptEdit replaces the replaced text from vscode

Linear Issue Link

Before
Suggestion:
<img width="325" alt="image" src="https://github.com/user-attachments/assets/76835430-f6aa-4b03-9407-bce25e28badf" />

On Acceptance:
<img width="312" alt="image" src="https://github.com/user-attachments/assets/1c18168a-dc8f-44af-9c09-5ae8e401e41f" />

After
Replaces the correct suggestion without suffix duplication:
<img width="279" alt="image" src="https://github.com/user-attachments/assets/b8505644-5686-4171-8351-8d054bf0946c" />

Test plan

Inline Examples from the cody-chat-eval repo

Backport e56f4f7 from #6583

Fix the suffix duplication happening on inline completion acceptance.

(cherry picked from commit e56f4f7)
@hitesh-1997 hitesh-1997 merged commit 3265f86 into vscode-v1.60.x Jan 10, 2025
23 checks passed
@hitesh-1997 hitesh-1997 deleted the backport-6583-to-vscode-v1.60.x branch January 10, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants