diff --git a/src/components/pages/AssistantPage.tsx b/src/components/pages/AssistantPage.tsx index a7fe3fa..b362ed1 100644 --- a/src/components/pages/AssistantPage.tsx +++ b/src/components/pages/AssistantPage.tsx @@ -19,9 +19,11 @@ import { ChevronRight, Save, Mic, - Volume2, Send, MessageCircle, + HelpCircle, + Waypoints, + AudioLines, } from "lucide-react"; import { Button } from "@/components/ui/button"; @@ -42,14 +44,18 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; import { Card, CardContent, - CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; -import { useState } from "react"; +import { useEffect, useRef, useState } from "react"; type RuntimeMode = "pipeline" | "realtime"; @@ -675,11 +681,11 @@ export function AssistantPage() { return (
-
-

创建助手

-

- 通过提示词、模型、语音和知识库快速创建 AI 视频助手 -

+
+ updateForm("name", value)} + />
@@ -703,22 +709,32 @@ export function AssistantPage() {
- +
- +
} - title="基础信息" - description="定义助手名称、开场白和提示词" + icon={} + title="提示词" + description="描述助手的角色、能力和回答要求" > - updateForm("name", value)} - placeholder="请输入助手名称" - /> - - updateForm("greeting", value)} - placeholder="请输入助手开场白" - /> - - {form.runtimeMode === "realtime" && ( + {form.runtimeMode === "pipeline" ? ( } - title="Realtime 配置" + title="模型配置" + description="配置语音管线的大语言模型、语音识别与播报音色" + > + updateForm("model", value)} + options={["DeepSeek-V3", "Qwen-Max", "Kimi-K2", "Doubao-Pro", "GPT-4o"]} + /> + updateForm("asr", value)} + options={["SenseVoice", "Paraformer", "Whisper", "FunASR"]} + /> + updateForm("voice", value)} + options={["晓宁", "晓美", "晓宇", "晓晨"]} + /> + + ) : ( + } + title="模型配置" description="当前模式下 ASR 与 TTS 由 Realtime 模型内置完成" > )} - {form.runtimeMode === "pipeline" && ( - <> - } - title="LLM 配置" - description="选择驱动对话理解与生成的大语言模型" - > - updateForm("model", value)} - options={["DeepSeek-V3", "Qwen-Max", "Kimi-K2", "Doubao-Pro", "GPT-4o"]} - /> - - - } - title="ASR 配置" - description="选择将用户语音转为文本的识别引擎" - > - updateForm("asr", value)} - options={["SenseVoice", "Paraformer", "Whisper", "FunASR"]} - /> - - - } - title="TTS 配置" - description="选择助手播报回复时使用的合成音色" - > - updateForm("voice", value)} - options={["晓宁", "晓美", "晓宇", "晓晨"]} - /> - - - )} + } + title="开场白" + description="助手与用户首次对话时的开场语" + > + updateForm("greeting", value)} + placeholder="请输入助手开场白" + /> + } @@ -895,7 +896,7 @@ function DebugDrawer({ return (