Refactor audio section in sidebar

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 18:49:40 +00:00
parent b1b37f5cf1
commit 18285851ac
4 changed files with 672 additions and 9 deletions
+5 -3
View File
@@ -2,7 +2,8 @@ import { useState } from "react";
import { Layout } from "@/components/Layout";
import { ChatView } from "@/components/chat/ChatView";
import { ImageView } from "@/components/images/ImageView";
import { AudioView } from "@/components/audio/AudioView";
import { TranscriptionView } from "@/components/audio/TranscriptionView";
import { GenerationView } from "@/components/audio/GenerationView";
import { BotView } from "@/components/bots/BotView";
import { BotChat } from "@/components/bots/BotChat";
import { AgentView } from "@/components/agent/AgentView";
@@ -15,7 +16,7 @@ interface Bot {
}
const Index = () => {
const [activeView, setActiveView] = useState<"chat" | "images" | "audio" | "bots" | "agent">("chat");
const [activeView, setActiveView] = useState<"chat" | "images" | "transcription" | "generation" | "bots" | "agent">("chat");
const [activeBotChat, setActiveBotChat] = useState<Bot | null>(null);
const handleStartBotChat = (bot: Bot) => {
@@ -30,7 +31,8 @@ const Index = () => {
<Layout activeTab={activeView} onTabChange={setActiveView}>
{activeView === "chat" && <ChatView />}
{activeView === "images" && <ImageView />}
{activeView === "audio" && <AudioView />}
{activeView === "transcription" && <TranscriptionView />}
{activeView === "generation" && <GenerationView />}
{activeView === "bots" && (
activeBotChat ? (
<BotChat bot={activeBotChat} onBack={handleBackFromBotChat} />