fix(ui): align loading meta text and avoid duplicate completion line
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-21 03:04:50 +08:00
parent 2b7e738e84
commit 45fa541b2d
2 changed files with 4 additions and 3 deletions

View File

@ -98,13 +98,13 @@ export const ImageGenerationLoading = memo(
)} )}
</div> </div>
<div className="flex items-center gap-2 pt-1 text-[16px] text-[#8c95a3]"> <div className="flex items-center gap-2 pt-1 text-[13px] text-[#9aa3b2]">
<Grid2x2 className="h-5 w-5" /> <Grid2x2 className="h-5 w-5" />
<span className="font-medium">{isFailed ? "生成失败" : "设计图处理中"}</span> <span className="font-medium">{isFailed ? "生成失败" : "设计图处理中"}</span>
</div> </div>
<div className="space-y-0.5 text-[#a0a8b6]"> <div className="space-y-0.5 text-[#9aa3b2]">
<div className="text-[15px] font-medium"> <div className="text-[13px] font-medium">
使用 {resolvedModelName} 生成图片,预计 {estimateRangeLabel} 使用 {resolvedModelName} 生成图片,预计 {estimateRangeLabel}
</div> </div>
{(phase !== "processing" || elapsedSeconds > 0) && ( {(phase !== "processing" || elapsedSeconds > 0) && (

View File

@ -179,6 +179,7 @@ function appendImageDoneSummary(text: string): string {
if (!text) return text; if (!text) return text;
const normalized = String(text || "").trim(); const normalized = String(text || "").trim();
if (!normalized) return normalized; if (!normalized) return normalized;
if (/图片分析/.test(normalized)) return normalized;
if (!/!\[[^\]]*\]\((https?:\/\/[^\s)]+)\)/i.test(normalized)) return normalized; if (!/!\[[^\]]*\]\((https?:\/\/[^\s)]+)\)/i.test(normalized)) return normalized;
if (extractImageUrlsFromText(normalized).length === 0) return normalized; if (extractImageUrlsFromText(normalized).length === 0) return normalized;
if (normalized.includes(IMAGE_DONE_SUMMARY)) return normalized; if (normalized.includes(IMAGE_DONE_SUMMARY)) return normalized;