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

feat: minimal diff #583

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

feat: minimal diff #583

wants to merge 9 commits into from

Conversation

will-lynas
Copy link
Contributor

See #582

@yetone
Copy link
Owner

yetone commented Sep 14, 2024

I encountered an error during my local testing:

image

@will-lynas
Copy link
Contributor Author

I've added a check for that. Im interested, what do you do to get it to do that though?

@yetone
Copy link
Owner

yetone commented Sep 15, 2024

I just pulled the latest version and tried it, but I can no longer trigger any diff effects.

minimize diff:

minimal-diff.mp4

original diff:

normal-diff.mp4

Copy link
Collaborator

@aarnphm aarnphm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering if we can just generate the minimal diff instead of parsing the snippets

README.md Show resolved Hide resolved
@will-lynas
Copy link
Contributor Author

I just pulled the latest version and tried it, but I can no longer trigger any diff effects.

minimize diff:
minimal-diff.mp4

original diff:
normal-diff.mp4

Thats weird. Not sure why that's happening. The code that should be applied is definetly different from whats there already, right?

@will-lynas
Copy link
Contributor Author

wondering if we can just generate the minimal diff instead of parsing the snippets

I've moved it to where the diff is created

@yetone
Copy link
Owner

yetone commented Sep 15, 2024

wondering if we can just generate the minimal diff instead of parsing the snippets

LLMs are still unable to achieve this.

@aarnphm
Copy link
Collaborator

aarnphm commented Sep 15, 2024

Quote reply

o1 can do this, but it is pretty expensive afaict

@will-lynas
Copy link
Contributor Author

I think I'm actually running into a bug which is on main.

As far as I understand snippet.range is supposed to be start inclusive and end exclusive.

But there's this loop in insert_conflict_contents which treats the end as inclusive:

    for i = start_line, end_line do
      table.insert(result, lines[i])
    end

Heres a video of the ranges getting messed up:

Screen.Recording.2024-09-16.at.00.20.15.mov

But I also have one where it works somehow?

Screen.Recording.2024-09-16.at.00.22.51.mov

@aarnphm
Copy link
Collaborator

aarnphm commented Sep 16, 2024

ok seems like a bug then :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants