feat: /undo & /redo slash commands — revert/restore messages + file changes #293
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman#293
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of OpenCode command parity (transparent-layer goal). OpenCode's TUI has
/undoand/redoto revert the last message + its file changes and restore them. These are git-backed inside OpenCode.Approach (decided): proxy the OpenCode API — do NOT reimplement git in ocman
OpenCode's SDK/HTTP exposes session revert/unrevert:
session.revert({ path, body })→ returns Session (maps to /undo)session.unrevert({ path })→ returns Session (maps to /redo)Ref: https://opencode.ai/docs/sdk (Sessions table)
Scope
undo/redotoBUILTIN_COMMANDS;/redoonly meaningful after/undo.Notes
Biggest functional gap of the batch. Because it mutates files on disk, confirm the API contract (what a message id means for revert, partial vs full) with a small spike before wiring the UI.