fix(ui): remove duplicate loading line and show agent avatar in auto mode
This commit is contained in:
parent
3f3088beb7
commit
545f7d4d44
@ -62,7 +62,7 @@ export const ImageGenerationLoading = memo(
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="text-[15px] leading-7 text-[#3a4352]">
|
<div className="text-[15px] leading-7 text-[#3a4352]">
|
||||||
现在开始生成设计图,使用 {resolvedModelName} 模型,预计需要 {estimateRangeLabel}。
|
现在开始生成设计图。
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-2 text-[#a8b1bf]">
|
<div className="flex items-center gap-2 text-[#a8b1bf]">
|
||||||
@ -73,7 +73,7 @@ export const ImageGenerationLoading = memo(
|
|||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative overflow-hidden rounded-[22px] border border-[#e1e4ea] bg-[#eaedf2]",
|
"relative overflow-hidden rounded-[22px] border border-[#e1e4ea] bg-[#eaedf2]",
|
||||||
count === 1 ? "h-[420px] w-full max-w-[560px]" : "grid gap-3 p-3",
|
count === 1 ? "h-[420px] w-full max-w-[460px]" : "grid gap-3 p-3",
|
||||||
count > 1 && "grid-cols-2"
|
count > 1 && "grid-cols-2"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -1478,31 +1478,39 @@ function PureModelSelectorCompact({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (readOnly) {
|
if (readOnly) {
|
||||||
|
const readOnlyAvatarUrl =
|
||||||
|
selectedModelId === "auto"
|
||||||
|
? dynamicModelsData?.agentModel?.avatarUrl || selectedModel?.avatarUrl || null
|
||||||
|
: selectedModel?.avatarUrl || null;
|
||||||
|
const readOnlyName =
|
||||||
|
selectedModelId === "auto"
|
||||||
|
? dynamicModelsData?.agentModel?.displayName || "Agent模式"
|
||||||
|
: selectedModel?.name || "模型";
|
||||||
|
|
||||||
if (avatarOnly) {
|
if (avatarOnly) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<div
|
||||||
className="h-8 w-8 rounded-full border border-border p-0 hover:bg-transparent"
|
className="flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background"
|
||||||
variant="ghost"
|
aria-label={readOnlyName}
|
||||||
disabled
|
title={readOnlyName}
|
||||||
aria-label={selectedModel?.name || "Agent模式"}
|
|
||||||
>
|
>
|
||||||
{selectedModel?.avatarUrl ? (
|
{readOnlyAvatarUrl ? (
|
||||||
<img
|
<img
|
||||||
src={selectedModel.avatarUrl}
|
src={readOnlyAvatarUrl}
|
||||||
alt={selectedModel.name}
|
alt={readOnlyName}
|
||||||
className="h-7 w-7 rounded-full object-cover"
|
className="h-7 w-7 rounded-full object-cover"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Bot className="h-4 w-4" />
|
<Bot className="h-4 w-4" />
|
||||||
)}
|
)}
|
||||||
</Button>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button className="h-8 px-2" variant="ghost" disabled>
|
<Button className="h-8 px-2" variant="ghost" disabled>
|
||||||
<CpuIcon size={16} />
|
<CpuIcon size={16} />
|
||||||
<span className="hidden font-medium text-xs sm:block">{selectedModel?.name}</span>
|
<span className="hidden font-medium text-xs sm:block">{readOnlyName}</span>
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user