Repository navigation
Add openAsChatView tab context action for terminal tabs - #144
lawrencecchen wants to merge 1 commit into
Conversation
Adds an 'Open as Chat View' item to the tab context menu, shown only for terminal tabs (state.isTerminal), mirroring how forkConversation items are gated. The action flows through the existing requestTabContextAction -> splitTabBar(_:didRequestTabContextAction:for:inPane:) delegate path so the host app decides what opening a chat view means. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds a new "Open as Chat View" context menu item for terminal tabs. The change defines a new action type, provides localized UI labels in English and Japanese, and updates the tab context menu construction logic to conditionally show the item and manage separator placement. ChangesTerminal Tab Chat View Menu
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds an "Open as Chat View" tab context menu action for terminal tabs, flowing through the existing
Confidence Score: 5/5Safe to merge — the change is additive and purely delegates to the host app; no library-internal logic is affected. All four changed files follow the established patterns precisely: the new enum case slots in alongside the fork-conversation cases, the menu-builder refactor is a clean split of one conditional into two without introducing any new state, and both localization files are updated consistently. There are no exhaustive switches on TabContextAction inside the library that would need updating, and the action is always enabled when shown, matching the forkConversation precedent. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant TabContextMenuBuilder
participant TabItemView
participant BonsplitController
participant Delegate as BonsplitDelegate (host app)
User->>TabItemView: Right-click terminal tab
TabItemView->>TabContextMenuBuilder: makeMenu(snapshot:, target:)
Note over TabContextMenuBuilder: state.isTerminal == true
TabContextMenuBuilder-->>TabItemView: NSMenu with "Open as Chat View" item
TabItemView-->>User: Show context menu
User->>TabItemView: Select "Open as Chat View"
TabItemView->>BonsplitController: requestTabContextAction(.openAsChatView, for: tabId, inPane:)
BonsplitController->>Delegate: splitTabBar(_:didRequestTabContextAction: .openAsChatView, for: tab, inPane:)
Delegate-->>BonsplitController: (host app handles: open agent chat as tab)
Reviews (1): Last reviewed commit: "Add openAsChatView tab context action fo..." | Re-trigger Greptile |
|
Closing: this existed only to support the chat-as-tab entrypoint in manaflow-ai/cmux PR 5772, which was superseded by the workspace-pane direction in manaflow-ai/cmux#5736. |
Adds an "Open as Chat View" item to the tab context menu, shown only for terminal tabs (
state.isTerminal), mirroring the forkConversation gating pattern. The action flows through the existingrequestTabContextAction→splitTabBar(_:didRequestTabContextAction:for:inPane:)delegate path, so the host app decides what opening a chat view means.New
TabContextAction.openAsChatViewcase, menu construction inTabContextMenuBuilder.makeMenu, and localized titles (en + ja) via the existingBundle.modulestrings tables.Consumed by cmux in manaflow-ai/cmux#5576 follow-up (open agent chat as a tab in the pane instead of a separate window).
🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Add an “Open as Chat View” option to terminal tab context menus. It sends a new
openAsChatViewaction through the existing delegate so host apps decide how to open the chat view.TabContextAction.openAsChatView.state.isTerminal.requestTabContextAction→splitTabBar(_:didRequestTabContextAction:for:inPane:).tabContext.openAsChatViewstrings in en and ja.Written for commit ea86dfe. Summary will update on new commits.
Summary by CodeRabbit