Repository navigation
Support ediff and smerge modes to view diffs - #39
Conversation
Add support for displaying file diffs using ediff, smerge, or text. Introduce a custom variable to select the diff tool. Refactor content handling code to use the new diff functions and improve tool call and progress handling.Add diff view options to ECA chat Added new function `eca-chat-diff-tool` to select display method for file-change diffs. Implemented three different display methods: • Ediff: Interactive side-by-side comparison. • Smerge: Merge-style conflict presentation with Smerge mode. • Text: Plain text unified diff in a separate buffer. Modified `eca-chat--show-diff` function to dispatch the selected view based on `eca-chat-diff-tool`. Updated tool call content display for fileChange tools, including new diff view options.
|
Looks interesting! will review later today |
Cool, in both BTW the frame always opens full screen, I prefer it and I think users would also prefer viewing side-by-side diff in a full screen frame. |
ericdallo
left a comment
There was a problem hiding this comment.
@CsBigDataHub I tested and that looks really nice!
But can we please do not use frames for this feature? I understand your rationale but I don't think that's a good way, I never saw a emacs package open frames for anytihng, and there are so many cases to handle when going with that approach.
I'm pretty confortable in opening a new window or just the diff buffer like gptel.el, buffers are way easier for people to manage with their own rules if needed.
I will take a closer look to code then
|
I did some improvement to show buttons on the bottom instead of right too, sorry for the conflicts, can you solve it please? |
|
@ericdallo fixed merge conflicts and creating windows in the same frame rather than creating new frames. There are in-line comments and function docs for your reference, I will clean these up when we are ready to merge. |
|
Thanks @CsBigDataHub, will test in a couple of mins |
ericdallo
left a comment
There was a problem hiding this comment.
That's great, thank you a lot!
ediff still behaves weird to me, when quitting ediff, I lost the buffer I was and eca-chat beomes the main buffer which is weird, smerge tho behaves perfectly, typeing ESC quit the buffer and goes back to old behavior.
Will merge but let me know if you know how to improve that for ediff
|
I noticed we lost the changes I did to actions who in the next line, will check that |
Huh, I tested it and did not notice the issue, I am capturing window configuration and restoring once user quit ediff or smerge. Also I am binding Should be a easy fix. |
Can you please let me know where? I mean which function. |
|
oh, let me see if there is race condition introduced. Will test and push a fix tomorrow |




Note: I have in-line comments for the review, will delete it before merging.
Should fix #13