3 ms·
Hrm. Still not quite what I crave. Here's roughly what I want. I want to be able to highlight some block of code, ask the AI to modify it in some way, and then
by forrestthewoods 2y ago
Hrm. Still not quite what I crave.
Here's roughly what I want. I want to be able to highlight some block of code, ask the AI to modify it in some way, and then I want to see a diff view of before/after that lets me accept or reject changes.
LLMs often get code slightly wrong. That's fine! Doesn't bother me at all. What I need is an interface that allows me to iterate on code AND helps me understand the changes.
As a concrete example I recently used Claude to help me write some Python matplotlib code. It took me roughly a dozen plus iterations. I had to use a separate diff tool so that I could understand what changes were being made. Blindly copy/pasting LLM code is insufficient.
- garbanz0 2y agoFWIW, that's what cursor does: https://www.trycursor.com/ https://www.trycursor.com/
- chr_norm 2y ago[dead]
- rtfeldman 2y ago> I want to be able to highlight some block of code, ask the AI to modify it in some way, and then I want to see a diff view of before/after that lets me accept or reject changes. Zed does that - here's a clip of it on some Python code: https://youtu.be/6OdI6jYpw9M?t=66 https://youtu.be/6OdI6jYpw9M?t=66
- simonw 2y ago"Here's roughly what I want. I want to be able to highlight some block of code, ask the AI to modify it in some way, and then I want to see a diff view of before/after that lets me accept or reject changes." That's exactly what this new set of Zed features lets you do. Here's an animated GIF demo: https://gist.github.com/simonw/520fcd8ad5580e538ad16ed2d8b87ed2?permalink_comment_id=5161430#gistcomment-5161430 https://gist.github.com/simonw/520fcd8ad5580e538ad16ed2d8b87...
- brewski 2y agoEmacs + gptel supports this: https://github.com/karthink/gptel/tree/master?tab=readme-ov-file#in-any-buffer https://github.com/karthink/gptel/tree/master?tab=readme-ov-...
- deleted 2y ago[deleted]
- iamnbutler 2y agoHey, this is Nate from Zed. Give the inline assistant a try. Here is a little demo: https://share.cleanshot.com/F2mg2lXy https://share.cleanshot.com/F2mg2lXy You can even edit the prompt after the fact if the diff doesn't show what you want and regenerate without having to start all over.
- forrestthewoods 2y agoAh interesting. I missed that when browsing the page. Can you make the diff side-by-side? I’ve always hated the “inline” terminal style diff view. My brain just can’t parse it. I need the side-by-side view that lets me see what the actual before/after code is.
- iamnbutler 2y agoHaha I actually agree – I always prefer them side by side. We don't have side-by-side diffs yet, but once we do I'll make sure it works here :)
- zackproser 2y agoExcited to try Zed, but FWIW, this is exactly Cursor's default behavior if you use the side chat panel
- Terretta 2y ago> I want to be able to highlight some block of code, ask the AI to modify it in some way, and then I want to see a diff view of before/after that lets me accept or reject changes. If you squint, that's the same as using an IDE with first class git support and co-editing with a (junior) pair programmer that commits each thing you ask them to do locally, or just saves the file and lets you see stageable diffs you can reject instead of push. Try the /commit workflow using aider.chat as a REPL in your terminal, with the same git repo open in whatever IDE you like that supports real time git sync. The REPL talks to you in diffs, and you can undo commits, and of course your IDE shows you any Aider changes the same as it would show you any other devs' changes. That said, I use Zed and while it doesn't have all the smarts of Aider, its inline integration is fantastic.