Skip to content

feat(tui): allow fork from AI messages#21349

Open
divitkashyap wants to merge 2 commits intoanomalyco:devfrom
divitkashyap:feat/fork-from-ai-message
Open

feat(tui): allow fork from AI messages#21349
divitkashyap wants to merge 2 commits intoanomalyco:devfrom
divitkashyap:feat/fork-from-ai-message

Conversation

@divitkashyap
Copy link
Copy Markdown

@divitkashyap divitkashyap commented Apr 7, 2026

Issue for this PR

Closes #8689

Type of change

  • New feature

What does this PR do?

The TUI fork dialog previously only allowed forking from user messages due to a role filter (). This change removes that filter entirely, allowing users to fork from both user and assistant messages.

Note: The message.role type only allows 'user' or 'assistant', so any role check against 'system' was redundant.

How did you verify your code works?

Code compiles successfully. The change removes a redundant conditional that was preventing assistant messages from appearing in the fork dialog.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@divitkashyap divitkashyap force-pushed the feat/fork-from-ai-message branch from 22b471b to b576d41 Compare April 7, 2026 17:09
The message.role type only allows 'user' or 'assistant', so checking
for 'system' role was redundant. Removed the conditional to show all
non-system messages in fork dialog.
@divitkashyap divitkashyap force-pushed the feat/fork-from-ai-message branch from b576d41 to 1681daf Compare April 7, 2026 17:36
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.

[FEATURE]: ability to revert/fork from the ai message, not only from the user's

1 participant