mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
MAESTRO: Integrate unified tab system into MainPanel
Connect FilePreviewTab rendering to the unified tab system: - Add unified tab props to MainPanel (unifiedTabs, activeFileTabId, etc.) - Remove !previewFile condition so TabBar always renders in AI mode - Update content area to prioritize activeFileTabId over legacy previewFile - Add showCloseButton prop to FilePreview (false when rendered as tab) - Add activeFileTab computation in App.tsx - Connect handlers through useMainPanelProps hook
This commit is contained in:
@@ -4783,6 +4783,16 @@ You are taking over this conversation. Based on the context above, provide a bri
|
||||
activeSession?.unifiedTabOrder,
|
||||
]);
|
||||
|
||||
// Get the active file preview tab (if a file tab is active)
|
||||
const activeFileTab = useMemo((): FilePreviewTab | null => {
|
||||
if (!activeSession?.activeFileTabId) return null;
|
||||
return (
|
||||
activeSession.filePreviewTabs.find(
|
||||
(tab) => tab.id === activeSession.activeFileTabId
|
||||
) ?? null
|
||||
);
|
||||
}, [activeSession?.activeFileTabId, activeSession?.filePreviewTabs]);
|
||||
|
||||
const isResumingSession = !!activeTab?.agentSessionId;
|
||||
const canAttachImages = useMemo(() => {
|
||||
if (!activeSession || activeSession.inputMode !== 'ai') return false;
|
||||
@@ -12835,6 +12845,14 @@ You are taking over this conversation. Based on the context above, provide a bri
|
||||
handleCloseOtherTabs,
|
||||
handleCloseTabsLeft,
|
||||
handleCloseTabsRight,
|
||||
|
||||
// Unified tab system (Phase 4)
|
||||
unifiedTabs,
|
||||
activeFileTabId: activeSession?.activeFileTabId ?? null,
|
||||
activeFileTab,
|
||||
handleFileTabSelect: handleSelectFileTab,
|
||||
handleFileTabClose: handleCloseFileTab,
|
||||
|
||||
handleScrollPositionChange,
|
||||
handleAtBottomChange,
|
||||
handleMainPanelInputBlur,
|
||||
|
||||
Reference in New Issue
Block a user