-
Notifications
You must be signed in to change notification settings - Fork 4.9k
fix: sidebar updates for /undo and compacting #5765
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
base: dev
Are you sure you want to change the base?
Conversation
|
The compaction seems to work nicely, cool! The /undo needs more work:
|
|
i updated it so now the current diff is gotten via Session.diff(input.sessionID) so now: hopefully this works as expected.
|
|
Thanks for iterating on this! For some reason the 2nd approach doesn't work for me either, now the /undo commands don't have any effect on the Modified files at all. I send a user request, get 2 tool calls + assistant response, then another user request followed by 1 tool call + assistant response. The main view's "message(s) reverted" conversation bubbles properly show the "reverse" line changes (-2 for the first /undo, -4 for the second /undo), but perhaps that information is taken from elsewhere. |
|
Sorry for the delay in getting back to you. I was on holiday vacation. I am reusing the sidebar’s session_diff logic instead of duplicating it, and it should be working correctly now. Thanks for the patience! ps: for afa9319 github auto corrected the commit message but the actual message should just be "refactor for /undo" should i change it or is it fine like how it is? Thanks for the patience!
|
Adresses:
#5760 #4548
two very similar issues, so i batch fixed them. let me know if I should split it instead.
Issue:
compacting would not update the sidebar immediately after successful compaction and /undo does also not update Modified Files.
Cause:
Issue 1:
The /compact command triggers session.compacted event but session.compacted was NOT handled in
sync.tsx so the sidebar never updated
Issue 2:
/undo Command does not emit a session.diff event.
Only session.updated is published via Session.update causing the sidebar's Modified Files to never get updated.
Fix:
Issue 1:
Add handler for session.compacted
Issue 2:
After /revert emit a session.diff event with an empty diff array to clear the Modified Files list in the sidebar