收敛模型选择弹窗尺寸与文字大小
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-02-14 21:05:30 +08:00
parent 09aa0de7b6
commit 7cebce517c
3 changed files with 27 additions and 27 deletions

View File

@ -2083,29 +2083,29 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
{allModels.find(m => m.id === selectedModelId)?.displayName || "Agent模式"}
</span>
</SelectTrigger>
<SelectContent className="w-[272px] max-h-[380px] overflow-hidden rounded-[20px] border border-[#cfd4dc] bg-[#f3f4f6] p-2 shadow-[0_8px_24px_rgba(15,23,42,0.14)]">
<div className="max-h-[348px] space-y-1 overflow-y-auto pr-1">
<SelectContent className="w-[248px] max-h-[340px] overflow-hidden rounded-[18px] border border-[#cfd4dc] bg-[#f3f4f6] p-1.5 shadow-[0_8px_20px_rgba(15,23,42,0.13)]">
<div className="max-h-[312px] space-y-1 overflow-y-auto pr-1">
{allModels.map((model) => (
<SelectItem
key={model.id}
value={model.id}
className="h-11 rounded-2xl px-3 text-[#2f3640] [&>span:first-child]:hidden focus:bg-[#dfe2e6] focus:text-[#1f2937] data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]"
className="h-9 rounded-xl px-2.5 text-[#2f3640] [&>span:first-child]:hidden focus:bg-[#dfe2e6] focus:text-[#1f2937] data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]"
>
<span className="flex w-full items-center justify-between gap-3">
<span className="flex min-w-0 items-center gap-2.5">
<span className="h-6 w-6 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
<span className="flex w-full items-center justify-between gap-2">
<span className="flex min-w-0 items-center gap-2">
<span className="h-5 w-5 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
{model.avatarUrl ? (
<img src={model.avatarUrl} alt={model.displayName} className="h-full w-full object-cover" />
) : (
<span className="flex h-full w-full items-center justify-center text-[10px] font-medium text-[#6b7280]">
<span className="flex h-full w-full items-center justify-center text-[9px] font-medium text-[#6b7280]">
{model.id === "auto" ? "A" : model.displayName.slice(0, 1)}
</span>
)}
</span>
<span className="truncate text-[14px] font-medium leading-none">{model.displayName}</span>
<span className="truncate text-[12px] font-medium leading-none">{model.displayName}</span>
</span>
{selectedModelId === model.id ? (
<span className="text-base font-semibold text-[#1f2937]">✓</span>
<span className="text-sm font-semibold text-[#1f2937]">✓</span>
) : null}
</span>
</SelectItem>

View File

@ -1336,29 +1336,29 @@ export function LovartHome({
</span>
</span>
</SelectTrigger>
<SelectContent className="w-[272px] max-h-[380px] overflow-hidden rounded-[20px] border border-[#cfd4dc] bg-[#f3f4f6] p-2 shadow-[0_8px_24px_rgba(15,23,42,0.14)]">
<div className="max-h-[348px] space-y-1 overflow-y-auto pr-1">
<SelectContent className="w-[248px] max-h-[340px] overflow-hidden rounded-[18px] border border-[#cfd4dc] bg-[#f3f4f6] p-1.5 shadow-[0_8px_20px_rgba(15,23,42,0.13)]">
<div className="max-h-[312px] space-y-1 overflow-y-auto pr-1">
{[{ id: "auto", displayName: "Agent模式", avatarUrl: null }, ...imageModels].map((model) => (
<SelectItem
key={model.id}
value={model.id}
className="h-11 rounded-2xl px-3 text-[#2f3640] [&>span:first-child]:hidden focus:bg-[#dfe2e6] focus:text-[#1f2937] data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]"
className="h-9 rounded-xl px-2.5 text-[#2f3640] [&>span:first-child]:hidden focus:bg-[#dfe2e6] focus:text-[#1f2937] data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]"
>
<span className="flex w-full items-center justify-between gap-3">
<span className="flex min-w-0 items-center gap-2.5">
<span className="h-6 w-6 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
<span className="flex w-full items-center justify-between gap-2">
<span className="flex min-w-0 items-center gap-2">
<span className="h-5 w-5 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
{model.avatarUrl ? (
<img src={model.avatarUrl} alt={model.displayName} className="h-full w-full object-cover" />
) : (
<span className="flex h-full w-full items-center justify-center text-[10px] font-medium text-[#6b7280]">
<span className="flex h-full w-full items-center justify-center text-[9px] font-medium text-[#6b7280]">
{model.id === "auto" ? "A" : model.displayName.slice(0, 1)}
</span>
)}
</span>
<span className="truncate text-[14px] font-medium leading-none">{model.displayName}</span>
<span className="truncate text-[12px] font-medium leading-none">{model.displayName}</span>
</span>
{(selectedModelId || "auto") === model.id ? (
<span className="text-base font-semibold text-[#1f2937]">✓</span>
<span className="text-sm font-semibold text-[#1f2937]">✓</span>
) : null}
</span>
</SelectItem>

View File

@ -1178,22 +1178,22 @@ function PureModelSelectorCompact({
<ChevronDownIcon size={16} />
</Button>
</Trigger>
<PromptInputModelSelectContent className="w-[272px] max-h-[380px] overflow-hidden rounded-[20px] border border-[#cfd4dc] bg-[#f3f4f6] p-2 shadow-[0_8px_24px_rgba(15,23,42,0.14)]">
<div className="max-h-[348px] space-y-1 overflow-y-auto pr-1">
<PromptInputModelSelectContent className="w-[248px] max-h-[340px] overflow-hidden rounded-[18px] border border-[#cfd4dc] bg-[#f3f4f6] p-1.5 shadow-[0_8px_20px_rgba(15,23,42,0.13)]">
<div className="max-h-[312px] space-y-1 overflow-y-auto pr-1">
{displayModels.map((model) => (
<SelectItem
key={model.id}
value={model.id}
className={cn(
"h-11 rounded-2xl px-3 text-[#2f3640] [&>span:first-child]:hidden",
"h-9 rounded-xl px-2.5 text-[#2f3640] [&>span:first-child]:hidden",
"focus:bg-[#dfe2e6] focus:text-[#1f2937]",
"data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]",
model.isSubModel ? "pl-8" : ""
)}
>
<span className="flex w-full items-center justify-between gap-3">
<span className="flex min-w-0 items-center gap-2.5">
<span className="h-6 w-6 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
<span className="flex w-full items-center justify-between gap-2">
<span className="flex min-w-0 items-center gap-2">
<span className="h-5 w-5 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
{model.avatarUrl ? (
<img
src={model.avatarUrl}
@ -1201,17 +1201,17 @@ function PureModelSelectorCompact({
className="h-full w-full object-cover"
/>
) : (
<span className="flex h-full w-full items-center justify-center text-[10px] font-medium text-[#6b7280]">
<span className="flex h-full w-full items-center justify-center text-[9px] font-medium text-[#6b7280]">
{model.id === "auto" ? "A" : model.displayName.slice(0, 1)}
</span>
)}
</span>
<span className="truncate text-[14px] font-medium leading-none">
<span className="truncate text-[12px] font-medium leading-none">
{model.isSubModel ? `└ ${model.displayName}` : model.displayName}
</span>
</span>
{selectedModel?.id === model.id ? (
<span className="text-base font-semibold text-[#1f2937]">✓</span>
<span className="text-sm font-semibold text-[#1f2937]">✓</span>
) : null}
</span>
</SelectItem>