Add diff module: message-level dialog diffing by id and facet - #16
Add diff module: message-level dialog diffing by id and facet#16erikgaas wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vhjh1wgvSZcTW3zjjGPrkR
|
@jph00 My main concern about this PR is that it adds a bunch of code. But I thought it would be useful in multiple places so I thought it could be good. Lmk if you think there is a better way of doing it. |
|
I don't really know what any of this means, tbh, or why it's useful. I can't find a way to make headway on reviewing this. Any suggestions on how we can get a "meeting of minds" here? In general, maybe we should start with a Discord chat of "here's a problem I want to solve, and an idea for solving it" - starting with a PR may be getting things backwards - especially now that code is cheap, but ideas are where the value is? (I'm not saying this as a strong opinion - just exploring possibilities). BTW nbdev already has quite an interesting nb-level diffing algo/api, in case that helps you. |
Nice I didn't know about nbdev's diffing. I made this PR because I was investigating the diff-watcher idea you had for solveit. But regarding your point on best ways to contribute to AAI im going to close this and some other PRs and try the new approach. |
diff_dlgs(old, new)returns aDlgDiffof what changed between two versions of a dialog, exact by message id:addedandmovedas(prev_id, msg)pairs in new-dialog order,removedmessages, andchangedmapping id to{facet: old value}across content/output/meta/attachments, so consumers update only what a change touched. Volatile output fields (execution_count,transient) are ignored, moves are the minimal set from aligning surviving-id sequences, and aDlgDiffis falsy when nothing changed. Pure function on the model, stdlib only.