Skip to content

Conversation

@damejeras
Copy link

Summary

  • Add conversation fork feature via f keybinding when a message is selected
  • Allows users to truncate conversation history and continue from an earlier point

Details

When viewing a conversation, users can now:

  1. Press Tab to focus the messages panel
  2. Navigate with j/k to select an assistant message
  3. Press f to fork the session from that point

The session is truncated to include everything up to and including the selected message, allowing the user to ask a different follow-up question.

Test plan

  • Start a conversation with multiple exchanges
  • Press Tab to focus messages, navigate to an earlier assistant response
  • Press f to fork
  • Verify notification "Session forked." appears
  • Verify messages after the selected point are removed
  • Verify you can type a new message and continue from the fork point

@damejeras damejeras requested a review from a team as a code owner February 4, 2026 14:22
@krissetto
Copy link
Contributor

Watch out, this implementation skips a bunch of things we need.
Implemented as is, this is a "TUI only" feature that does not actually fork a session. It removes the messages only on the TUI side of things, it does not remove anything from the persisted session nor does it fork the session in any way. If you reload the session, all the messages including those you thought had been removed are still present, in their original order, making subsequent use of the session not behave in the same way as the user might expect.

The concept is similar to what i implemented in #1578, maybe we can iterate there if you have suggestions.
e.g. I will be adding the ability to edit/branch off from the keyboard as well (now the edit icon is only clickable via mouse).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants