feat: tab context menu pin submenu
M2 of pinned terminals (v0.17.0): - TabBar: onPinTab prop (optional, hidden when unset for legacy callers) - Terminal tabs get a 'Pin ▸' submenu (workspace/global) or 'Unpin' row - UI vs Agent label distinction via isAgentTabId - Non-terminal tabs get no pin entry (5-item legacy menu preserved) - WorkbenchActions.pinTab threaded through split-pane LeafView - Sidebar.onPinTab wires store.reduce(setTabPin) with cwd snapshot - 12 new i18n keys synced across all 19 language dictionaries
This commit is contained in:
@@ -31,6 +31,12 @@ export interface WorkbenchActions {
|
||||
resizeSplit: (splitId: string, index: number, deltaFrac: number) => void
|
||||
/** Float a docked tab out as a free window (tab context menu entry). */
|
||||
floatTab: (tabId: string) => void
|
||||
/**
|
||||
* Pin/unpin a terminal tab (v0.17.0+). The shell snapshots the home cwd
|
||||
* at pin time; null clears the pin. Optional: when undefined the tab
|
||||
* context menu hides the pin entry (legacy callers).
|
||||
*/
|
||||
pinTab?: (tabId: string, scope: 'workspace' | 'global' | null) => void
|
||||
}
|
||||
|
||||
/** One divider: pointer-capture drag translating px deltas into fractions.
|
||||
@@ -211,6 +217,7 @@ function LeafView(props: {
|
||||
else actions.moveTabBefore(payload, leaf.id, before)
|
||||
}}
|
||||
onFloatTab={actions.floatTab}
|
||||
onPinTab={actions.pinTab}
|
||||
/>
|
||||
{leaf.tabs.length > 0 ? (
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user