diff --git a/frontend/src/components/features/conversation/conversation-main.tsx b/frontend/src/components/features/conversation/conversation-main.tsx index 8b1f061e20..f6fbf91010 100644 --- a/frontend/src/components/features/conversation/conversation-main.tsx +++ b/frontend/src/components/features/conversation/conversation-main.tsx @@ -2,7 +2,7 @@ import { useSelector } from "react-redux"; import { useWindowSize } from "@uidotdev/usehooks"; import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels"; import { ChatInterface } from "../chat/chat-interface"; -import { ConversationTabContent } from "./conversation-tabs/conversation-tab-content"; +import { ConversationTabContent } from "./conversation-tabs/conversation-tab-content/conversation-tab-content"; import { cn } from "#/utils/utils"; import { RootState } from "#/store"; diff --git a/frontend/src/components/features/conversation/conversation-tabs/conversation-tab-content.tsx b/frontend/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.tsx similarity index 50% rename from frontend/src/components/features/conversation/conversation-tabs/conversation-tab-content.tsx rename to frontend/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.tsx index fdffbbe831..6fad4ea286 100644 --- a/frontend/src/components/features/conversation/conversation-tabs/conversation-tab-content.tsx +++ b/frontend/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.tsx @@ -1,12 +1,14 @@ import { lazy, useMemo } from "react"; import { useTranslation } from "react-i18next"; import { useSelector } from "react-redux"; -import { cn } from "#/utils/utils"; import { RootState } from "#/store"; -import { ConversationLoading } from "../conversation-loading"; -import Terminal from "../../terminal/terminal"; -import { ConversationTabTitle } from "./conversation-tab-title"; +import { ConversationLoading } from "../../conversation-loading"; import { I18nKey } from "#/i18n/declaration"; +import { TabWrapper } from "./tab-wrapper"; +import { TabContainer } from "./tab-container"; +import { TabContentArea } from "./tab-content-area"; +import { ConversationTabTitle } from "../conversation-tab-title"; +import Terminal from "#/components/features/terminal/terminal"; // Lazy load all tab components const EditorTab = lazy(() => import("#/routes/changes-tab")); @@ -33,6 +35,28 @@ export function ConversationTabContent() { const isVSCodeActive = selectedTab === "vscode"; const isTerminalActive = selectedTab === "terminal"; + // Define tab configurations + const tabs = [ + { key: "editor", component: EditorTab, isActive: isEditorActive }, + { + key: "browser", + component: BrowserTab, + isActive: isBrowserActive, + }, + { + key: "jupyter", + component: JupyterTab, + isActive: isJupyterActive, + }, + { key: "served", component: ServedTab, isActive: isServedActive }, + { key: "vscode", component: VSCodeTab, isActive: isVSCodeActive }, + { + key: "terminal", + component: Terminal, + isActive: isTerminalActive, + }, + ]; + const conversationTabTitle = useMemo(() => { if (isEditorActive) { return t(I18nKey.COMMON$CHANGES); @@ -67,69 +91,15 @@ export function ConversationTabContent() { } return ( -