// ============================================================ // CamTalk — 主应用组件(Web 端双栏布局) // ============================================================ import { useState } from "react"; import { useVisionSession } from "./hooks/useVisionSession"; import { VideoPreview } from "./components/VideoPreview"; import { ChatPanel } from "./components/ChatPanel"; import { ConfigPanel } from "./components/ConfigPanel"; import { ToastContainer } from "./components/Toast"; import "./App.css"; function App() { const [showConfig, setShowConfig] = useState(false); const { messages, currentReply, isProcessing, isAudioPlaying, isSpeaking, isVADReady, vadError, connectionStatus, videoRef, stream, config, updateConfig, stats, mode, isObserving, toggleMode, startSession, stopSession, interrupt, } = useVisionSession(); const isConnected = connectionStatus === "connected"; return (