-
Notifications
You must be signed in to change notification settings - Fork 0
Fix undo restoring todo list (#4081) #58
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
WalkthroughThe changes extend the session revert functionality to capture and persist associated todo items. A new optional Changes
Sequence DiagramsequenceDiagram
participant User
participant Session
participant Revert as SessionRevert
participant Todo
User->>Session: post message with todowrite
activate Session
Session->>Revert: trigger revert
activate Revert
Note over Revert: Scan backwards for<br/>revert target
Revert->>Revert: extractTodos from<br/>prior todowrite parts
alt messageID match found
Revert->>Revert: capture todosBefore
else partID match found
Revert->>Revert: capture todosBefore
end
Revert->>Revert: assign revert.todos
Revert->>Todo: update with reverted todos
deactivate Revert
alt cleanup requested
User->>Revert: trigger cleanup
activate Revert
Revert->>Todo: persist session.revert.todos
Revert->>Session: clear revert state
deactivate Revert
end
deactivate Session
User->>Session: verify state
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (3)packages/opencode/src/session/index.ts (1)
packages/opencode/test/session/revert-todo.test.ts (3)
packages/opencode/src/session/revert.ts (3)
🔇 Additional comments (15)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Testing
Mirrored from sst/opencode PR anomalyco#4082
Summary by CodeRabbit
New Features
Tests