import { useEffect, useRef, useState } from "react"; import "../../styles/pages/model-generation-showcase.css"; type ShowMode = "agent" | "image" | "video"; const MODE_TABS = [ { key: "agent" as const, icon: "🤖", title: "Agent 模式", desc: "文本生成,对话式交互,智能推理" }, { key: "image" as const, icon: "🖼️", title: "图片模式", desc: "图像生成,风格迁移,场景合成" }, { key: "video" as const, icon: "🎬", title: "视频模式", desc: "视频生成,动态场景,数字人演绎" }, ]; const AGENT_OUTPUTS = [ { tag: "Agent", title: "营销文案", preview: "「未来已来,腕间即达」—— 全新智能手表,让每一秒都充满可能。健康监测、智能提醒、时尚设计,三合一体验。从晨跑配速到会议提醒,它比你更懂你的节奏。" }, { tag: "Agent", title: "产品描述", preview: "搭载最新AI芯片,支持实时心率/血氧/睡眠监测,50米防水,AMOLED视网膜屏,续航长达14天。钛合金表壳 + 硅胶快拆表带,商务运动自由切换。" }, { tag: "Agent", title: "剧本大纲", preview: "第一幕:品牌故事引入 → 第二幕:产品亮点展示 → 第三幕:用户见证与CTA引导。" }, ]; const IMAGE_OUTPUTS = [ { tag: "Image", title: "写实风格", icon: "📷", styleClass: "realistic" }, { tag: "Image", title: "插画风格", icon: "🎨", styleClass: "illustration" }, { tag: "Image", title: "电商风格", icon: "🛍️", styleClass: "ecommerce" }, ]; const VIDEO_OUTPUTS = [ { tag: "Video", title: "数字人播报", duration: "0:15" }, { tag: "Video", title: "场景动画", duration: "0:30" }, { tag: "Video", title: "产品展示", duration: "0:20" }, ]; function ModelGenerationShowcase() { const [mode, setMode] = useState("agent"); const [selectedImageOpt, setSelectedImageOpt] = useState(0); const [, setAnimated] = useState(false); const containerRef = useRef(null); useEffect(() => { const el = containerRef.current; if (!el) return; const observer = new IntersectionObserver( ([entry]) => { if (entry?.isIntersecting) { setAnimated(true); observer.disconnect(); } }, { threshold: 0.2 }, ); observer.observe(el); return () => observer.disconnect(); }, []); const workflowSteps = [ { label: "选择模式", active: mode === "agent" }, { label: "输入描述", active: mode === "image" }, { label: "AI生成", active: mode === "video" }, { label: "输出内容", active: false }, ]; return (
{/* Left Panel */}

模型生成
多模态内容一键产出

通过AI模型生成文本、图片、视频,三种模式覆盖全内容类型

{MODE_TABS.map((tab) => (
setMode(tab.key)} role="button" tabIndex={0} onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") setMode(tab.key); }} >
{tab.icon}

{tab.title}

{tab.desc}

))}
工作流程
{workflowSteps.map((step, i) => ( {i > 0 && } {step.label} ))}
{/* Center Area */}
{/* Agent Mode */} {mode === "agent" && (
Agent 模式
在线 · GPT-4o