Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Sources/Bonsplit/Internal/Views/TabItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,21 @@ enum TabContextMenuBuilder {
)
}

if state.canForkConversation {
if state.isTerminal || state.canForkConversation {
menu.addItem(.separator())
}

if state.isTerminal {
addAction(
title: localized("tabContext.openAsChatView", defaultValue: "Open as Chat View"),
action: .openAsChatView,
state: state,
target: target,
to: menu
)
}

if state.canForkConversation {
addAction(
title: localized("tabContext.forkConversation", defaultValue: "Fork Conversation"),
action: .forkConversation,
Expand Down
1 change: 1 addition & 0 deletions Sources/Bonsplit/Public/Types/TabContextAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public enum TabContextAction: String, CaseIterable, Sendable {
case markAsRead
case markAsUnread
case toggleZoom
case openAsChatView
case forkConversation
case forkConversationRight
case forkConversationLeft
Expand Down
1 change: 1 addition & 0 deletions Sources/Bonsplit/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"tabContext.pinTab" = "Pin Tab";
"tabContext.markTabAsRead" = "Mark Tab as Read";
"tabContext.markTabAsUnread" = "Mark Tab as Unread";
"tabContext.openAsChatView" = "Open as Chat View";
"tabContext.forkConversation" = "Fork Conversation";
"tabContext.forkConversationTo" = "Fork Conversation To";
"tabContext.forkConversation.right" = "Right Split";
Expand Down
1 change: 1 addition & 0 deletions Sources/Bonsplit/Resources/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"tabContext.pinTab" = "タブをピン留め";
"tabContext.markTabAsRead" = "タブを既読にする";
"tabContext.markTabAsUnread" = "タブを未読にする";
"tabContext.openAsChatView" = "チャットビューで開く";
"tabContext.forkConversation" = "会話をフォーク";
"tabContext.forkConversationTo" = "会話のフォーク先";
"tabContext.forkConversation.right" = "右分割";
Expand Down
Loading