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
47.04k stars 2.7k forks source link

Add ```/diff``` to the assistant #16821

Open knyazer opened 3 weeks ago

knyazer commented 3 weeks ago

Check for existing issues

Describe the feature

A /diff command that would pass git diff (with a configurable number of lines around every diff included too, for example 2) to the assistant.

And maybe a bunch of other git related commands? Something like /git diff|merge|branch. Tho diff seems to be the most useful one.

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

This is useful when making tons of small changes around a bunch of files. Passing the /diff to the assistant would let it know about all the changes, thus the assistant could be of help when fixing e.g. merge conflicts; besides, it could be useful to minimize the amount of info passed to the assistant: instead of passing all the tabs, you pass only the relevant changes.

There were some papers about the fact that too much irrelevant context might worsen performance

AlbertMarashi commented 2 weeks ago

bloody amazing idea