收敛模型选择弹窗尺寸与文字大小
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模式"} {allModels.find(m => m.id === selectedModelId)?.displayName || "Agent模式"}
</span> </span>
</SelectTrigger> </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)]"> <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-[348px] space-y-1 overflow-y-auto pr-1"> <div className="max-h-[312px] space-y-1 overflow-y-auto pr-1">
{allModels.map((model) => ( {allModels.map((model) => (
<SelectItem <SelectItem
key={model.id} key={model.id}
value={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 w-full items-center justify-between gap-2">
<span className="flex min-w-0 items-center gap-2.5"> <span className="flex min-w-0 items-center gap-2">
<span className="h-6 w-6 overflow-hidden rounded-full border border-[#d4d9df] bg-white"> <span className="h-5 w-5 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
{model.avatarUrl ? ( {model.avatarUrl ? (
<img src={model.avatarUrl} alt={model.displayName} className="h-full w-full object-cover" /> <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)} {model.id === "auto" ? "A" : model.displayName.slice(0, 1)}
</span> </span>
)} )}
</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> </span>
{selectedModelId === model.id ? ( {selectedModelId === model.id ? (
<span className="text-base font-semibold text-[#1f2937]">✓</span> <span className="text-sm font-semibold text-[#1f2937]">✓</span>
) : null} ) : null}
</span> </span>
</SelectItem> </SelectItem>

View File

@ -1336,29 +1336,29 @@ export function LovartHome({
</span> </span>
</span> </span>
</SelectTrigger> </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)]"> <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-[348px] space-y-1 overflow-y-auto pr-1"> <div className="max-h-[312px] space-y-1 overflow-y-auto pr-1">
{[{ id: "auto", displayName: "Agent模式", avatarUrl: null }, ...imageModels].map((model) => ( {[{ id: "auto", displayName: "Agent模式", avatarUrl: null }, ...imageModels].map((model) => (
<SelectItem <SelectItem
key={model.id} key={model.id}
value={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 w-full items-center justify-between gap-2">
<span className="flex min-w-0 items-center gap-2.5"> <span className="flex min-w-0 items-center gap-2">
<span className="h-6 w-6 overflow-hidden rounded-full border border-[#d4d9df] bg-white"> <span className="h-5 w-5 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
{model.avatarUrl ? ( {model.avatarUrl ? (
<img src={model.avatarUrl} alt={model.displayName} className="h-full w-full object-cover" /> <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)} {model.id === "auto" ? "A" : model.displayName.slice(0, 1)}
</span> </span>
)} )}
</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> </span>
{(selectedModelId || "auto") === model.id ? ( {(selectedModelId || "auto") === model.id ? (
<span className="text-base font-semibold text-[#1f2937]">✓</span> <span className="text-sm font-semibold text-[#1f2937]">✓</span>
) : null} ) : null}
</span> </span>
</SelectItem> </SelectItem>

View File

@ -1178,22 +1178,22 @@ function PureModelSelectorCompact({
<ChevronDownIcon size={16} /> <ChevronDownIcon size={16} />
</Button> </Button>
</Trigger> </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)]"> <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-[348px] space-y-1 overflow-y-auto pr-1"> <div className="max-h-[312px] space-y-1 overflow-y-auto pr-1">
{displayModels.map((model) => ( {displayModels.map((model) => (
<SelectItem <SelectItem
key={model.id} key={model.id}
value={model.id} value={model.id}
className={cn( 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]", "focus:bg-[#dfe2e6] focus:text-[#1f2937]",
"data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]", "data-[state=checked]:bg-[#dfe2e6] data-[state=checked]:text-[#1f2937]",
model.isSubModel ? "pl-8" : "" model.isSubModel ? "pl-8" : ""
)} )}
> >
<span className="flex w-full items-center justify-between gap-3"> <span className="flex w-full items-center justify-between gap-2">
<span className="flex min-w-0 items-center gap-2.5"> <span className="flex min-w-0 items-center gap-2">
<span className="h-6 w-6 overflow-hidden rounded-full border border-[#d4d9df] bg-white"> <span className="h-5 w-5 overflow-hidden rounded-full border border-[#d4d9df] bg-white">
{model.avatarUrl ? ( {model.avatarUrl ? (
<img <img
src={model.avatarUrl} src={model.avatarUrl}
@ -1201,17 +1201,17 @@ function PureModelSelectorCompact({
className="h-full w-full object-cover" 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)} {model.id === "auto" ? "A" : model.displayName.slice(0, 1)}
</span> </span>
)} )}
</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} {model.isSubModel ? `└ ${model.displayName}` : model.displayName}
</span> </span>
</span> </span>
{selectedModel?.id === model.id ? ( {selectedModel?.id === model.id ? (
<span className="text-base font-semibold text-[#1f2937]">✓</span> <span className="text-sm font-semibold text-[#1f2937]">✓</span>
) : null} ) : null}
</span> </span>
</SelectItem> </SelectItem>