fix: align canvas loading placeholder with start marker
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

Only show the image loading placeholder after the generation-start marker and avoid overlapping with the thinking state.
This commit is contained in:
Your Name 2026-02-03 19:50:11 +08:00
parent 20efbbbb53
commit 35b190011a

View File

@ -1071,7 +1071,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
)
);
const currentModel = allModels.find(m => m.id === selectedModelId);
const shouldShowImageLoading = (isLoading || hasGeneratingMarker) && !!currentModel;
const shouldShowImageLoading = hasGeneratingMarker && !!currentModel;
const loadingImageCount = imageParams.imageCount || 1;
return (
@ -1353,7 +1353,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
/>
)}
{isLoading && (
{isLoading && !shouldShowImageLoading && (
<div className="flex gap-3">
<Avatar className="h-8 w-8 shrink-0 border shadow-sm">
<AvatarFallback className="bg-muted text-foreground">