[PR #5610] feat(tui): fork slash command for keyboard-friendly session forking (resolves #5599) #11496

Closed
opened 2026-02-16 18:16:20 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5610

State: closed
Merged: Yes


This PR adds a /fork slash command which pops a "Fork from message" modal dialog window resembling the existing timeline dialog window. Upon selection of a message in this window, the session is immediately forked upon that message, as if the user had clicked on the message and selected the fork option.

This command may also be bound to a key using the key command name session_fork if the user chooses to bind it in their opencode.json file (but is not bound to any key by default).

Screenshot 2025-12-16 at 12 25 02 AM

Note: I do think it is slightly awkward that this timeline includes ignored/synthatic messages from plugins in the list (the DCP messages shown in the screenshot), but filtering them out would make it inconsistent with the behaviour of the existing session timeline, and I do prefer consistency. Addressing this by making both of these timeline dialogs exclude these plugin methods is probably outside the scope of this particular PR, and so I'll leave that as something to consider for the future.

Resolves #5599.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5610 **State:** closed **Merged:** Yes --- This PR adds a `/fork` slash command which pops a "Fork from message" modal dialog window resembling the existing timeline dialog window. Upon selection of a message in this window, the session is immediately forked upon that message, as if the user had clicked on the message and selected the fork option. This command may also be bound to a key using the key command name `session_fork` if the user chooses to bind it in their `opencode.json` file (but is not bound to any key by default). <img width="682" height="438" alt="Screenshot 2025-12-16 at 12 25 02 AM" src="https://github.com/user-attachments/assets/e13aa742-d2e9-41c8-a130-6e8d0b3385d7" /> Note: I do think it is slightly awkward that this timeline includes `ignored`/`synthatic` messages from plugins in the list (the DCP messages shown in the screenshot), but filtering them out would make it inconsistent with the behaviour of the existing session timeline, and I do prefer consistency. Addressing this by making both of these timeline dialogs exclude these plugin methods is probably outside the scope of this particular PR, and so I'll leave that as something to consider for the future. Resolves #5599.
yindo added the pull-request label 2026-02-16 18:16:20 -05:00
yindo closed this issue 2026-02-16 18:16:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11496