jnsahaj / lumen

Instant AI Git Commit message, Git changes summary from the CLI (no API key required)
MIT License
380 stars 14 forks source link

Summarize diff between 2 branches #21

Closed mohaidoss closed 1 week ago

mohaidoss commented 2 weeks ago

Is it possible to make it explain difference between branches ? Useful in case of merges, or to explain what the commited code in a specific branch is about. (feature, bugfix etc..)

jnsahaj commented 2 weeks ago

This is an idea I've been playing with. It started with thinking about summarizing PRs, but a more primitive way of implementing it would be to generate a summary for branch diffs.

The challenge here is that it is possible for the diff to be quite large in a PR, spanning multiple commits across many files.

Also, it might be beneficial to provide commit-by-commit context to the AI, but am not sure what would be the best way of doing that.

I'll try to build a basic working version for experimentation

mohaidoss commented 2 weeks ago

@jnsahaj Alright, I understand the complexity. But that same complexity is present for commits as well.

Maybe something we can learn from this repository ? https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/algo/pr_processing.py

I stay available if help needed ;)

jnsahaj commented 2 weeks ago

This is interesting. I glanced over the way it handles large PRs and I think I get the idea. Thanks for the share, I'll start working on a prototype