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 |
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Summary
Testing
Mirrored from sst/opencode PR anomalyco#4082
Summary by CodeRabbit
New Features
Tests