zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.47k stars 2.89k forks source link

AI completion is overriding end of line #18615

Open baptisteArno opened 2 weeks ago

baptisteArno commented 2 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When accepting AI autocompletion in the middle of the line, sometimes it overwrite the end of the line even though the preview did not show that it will be erased

Environment

Zed: v0.155.2 (Zed Preview) OS: macOS 15.0.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

https://github.com/user-attachments/assets/81c6da84-7c90-4253-b2be-ebb950b6c9a8

If applicable, attach your Zed.log file to this issue.

No response

JosephTLyons commented 1 week ago

cc @kevmo314 - is this something you'd be interested in looking into Since you worked on:

kevmo314 commented 1 week ago

@JosephTLyons I suspect this is actually working as intended but the UX could definitely be improved. In particular, the model can suggest deletions (which is consistent with the issue description stating "sometimes") but there isn't an elegant way at the moment to render this information so as an end user it can be a bit surprising.

In light of that I'm happy to work on implementing a deletion UI pattern however I would need some support from the Zed team as far as what that should look like visually.