fix: HTML artifact preview renders blank in preview mode (#876)

The condition guarding ArtifactFilePreview only allowed markdown files
through, which prevented HTML files from reaching the preview component.
Added `language === "html"` to the condition so HTML artifacts render
correctly in preview mode.

Fixes #873

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
CHANGXUBO
2026-02-18 10:06:21 +08:00
committed by GitHub
parent 67dbb10c2a
commit 9f74589d09

View File

@@ -234,8 +234,7 @@ export function ArtifactFileDetail({
<ArtifactContent className="p-0">
{previewable &&
viewMode === "preview" &&
language === "markdown" &&
content && (
(language === "markdown" || language === "html") && (
<ArtifactFilePreview
filepath={filepath}
threadId={threadId}