Add Fork Conversation action to tab context menu

Merged
AZ
6mo ago
+22-0

Summary

  • New .forkConversation case in TabContextAction
  • New host-provided tabContextForkConversationAvailabilityProvider on BonsplitController
  • Menu item added to TabContextMenuBuilder (shown only when the provider returns true)
  • English + Japanese strings, test fixture updated for the new canForkConversation field

Used by cmux (see manaflow-ai/cmux companion PR) to surface a Fork Conversation entry when a tab is running an active forkable Claude or Codex session.

Test plan

  • swift build --build-tests clean
  • Visual: right-click a terminal tab whose host returns true for the provider, confirm "Fork Conversation" appears

🤖 Generated with Claude Code


Summary by cubic

Adds a “Fork Conversation” action to the tab context menu, shown only when the host says it’s available. This lets apps surface forking for tabs running an active, forkable agent session.

  • New Features

    • Added TabContextAction.forkConversation.
    • Added BonsplitController.tabContextForkConversationAvailabilityProvider to control visibility.
    • Menu item appears only when the provider returns true.
    • Added English and Japanese strings.
  • Migration

    • If you switch exhaustively on TabContextAction, add a .forkConversation case (or a default).
    • Implement the new provider to enable the item for tabs with forkable sessions.

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features
    • Added "Fork Conversation" action to the tab context menu, allowing users to fork conversations directly from the interface without additional navigation. The feature is fully localized in English and Japanese. Host applications can selectively enable this action on a per-conversation basis.

Review Change Stack