From b1ce1aeefefb5342b3e7b4bb669397457ef9e7d6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 14 Feb 2026 21:09:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9E=8B=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=BC=B9=E7=AA=97=E8=A7=86=E8=A7=89=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E4=B8=8E=E5=9B=BE=E6=A0=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/multimodal-input.tsx | 47 ++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/components/multimodal-input.tsx b/components/multimodal-input.tsx index 65d7e807d..96cfcdc75 100644 --- a/components/multimodal-input.tsx +++ b/components/multimodal-input.tsx @@ -1,13 +1,16 @@ "use client"; import type { UseChatHelpers } from "@ai-sdk/react"; +import { Bot, ImageIcon, Sparkles, Video } from "lucide-react"; // 动态模型类型定义 type DynamicModel = { id: string; + modelId?: string; displayName: string; avatarUrl?: string | null; description: string | null; + providerType?: string; supportsVision: boolean; isDefault: boolean; providerName: string; @@ -1059,9 +1062,11 @@ function PureModelSelectorCompact({ // 定义自动模式 const autoModel: DynamicModel = { id: "auto", + modelId: "auto", displayName: "Agent模式", avatarUrl: null, description: "根据您的意图自动选择最合适的模型", + providerType: "system", supportsVision: true, isDefault: false, providerName: "System", @@ -1178,40 +1183,58 @@ function PureModelSelectorCompact({ - -
+ +
{displayModels.map((model) => ( span:first-child]:hidden", - "focus:bg-[#dfe2e6] focus:text-[#1f2937]", - "data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]", + "h-11 rounded-[14px] px-3 text-[#2f3640] [&>span:first-child]:hidden", + "focus:bg-[#d9dde3] focus:text-[#1f2937]", + "data-[state=checked]:bg-[#d2d7de] data-[state=checked]:text-[#1f2937]", model.isSubModel ? "pl-8" : "" )} > - + {model.avatarUrl ? ( {model.displayName} ) : ( - - {model.id === "auto" ? "A" : model.displayName.slice(0, 1)} + + {(() => { + const providerType = model.providerType || ""; + if (providerType === "volcano-video" || providerType === "qianwen-video" || providerType === "fal-video") { + return )} - + {model.isSubModel ? `└ ${model.displayName}` : model.displayName} - {selectedModel?.id === model.id ? ( - ✓ + {optimisticModelId === model.id ? ( + ✓ ) : null}