diff --git a/frontend/src/app/workspace/chats/[thread_id]/page.tsx b/frontend/src/app/workspace/chats/[thread_id]/page.tsx
index 47e477c2..5ae61615 100644
--- a/frontend/src/app/workspace/chats/[thread_id]/page.tsx
+++ b/frontend/src/app/workspace/chats/[thread_id]/page.tsx
@@ -6,7 +6,6 @@ import { useCallback, useEffect, useMemo, useState } from "react";
import { ConversationEmptyState } from "@/components/ai-elements/conversation";
import { Button } from "@/components/ui/button";
-import { Skeleton } from "@/components/ui/skeleton";
import {
DevDialog,
DevDialogContent,
@@ -15,6 +14,7 @@ import {
DevDialogTitle,
} from "@/components/ui/dev-dialog";
import { useSidebar } from "@/components/ui/sidebar";
+import { Skeleton } from "@/components/ui/skeleton";
import {
ArtifactFileDetail,
ArtifactFileList,
diff --git a/frontend/src/app/workspace/layout.tsx b/frontend/src/app/workspace/layout.tsx
index 14da7ae6..110de7a6 100644
--- a/frontend/src/app/workspace/layout.tsx
+++ b/frontend/src/app/workspace/layout.tsx
@@ -9,9 +9,9 @@ import {
useRef,
useState,
} from "react";
-import { Toaster } from "@/components/ui/sonner";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
+import { Toaster } from "@/components/ui/sonner";
import { CommandPalette } from "@/components/workspace/command-palette";
import { WorkspaceSidebar } from "@/components/workspace/workspace-sidebar";
import { getLocalSettings, useLocalSettings } from "@/core/settings";
diff --git a/frontend/src/components/ai-elements/artifact.tsx b/frontend/src/components/ai-elements/artifact.tsx
index cfd8f659..e7640d87 100644
--- a/frontend/src/components/ai-elements/artifact.tsx
+++ b/frontend/src/components/ai-elements/artifact.tsx
@@ -140,8 +140,8 @@ export const ArtifactContent = ({
className,
...props
}: ArtifactContentProps) => (
-
+
);
diff --git a/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx b/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx
index fb24baa3..dcee6279 100644
--- a/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx
+++ b/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx
@@ -198,7 +198,7 @@ export function ArtifactFileDetail({
// 给滚动遮挡头部定位relative
@@ -480,33 +480,39 @@ export function ArtifactFileDetail({
-
+
{/* 遮挡多余的滚动顶部 */}
{/* */}
{previewable &&
viewMode === "preview" &&
(language === "markdown" || language === "html") && (
-
+
)}
{isCodeFile && viewMode === "code" && (
-
+
+
+
)}
{!isCodeFile && (
-
+
+
+
)}
@@ -527,7 +533,7 @@ export function ArtifactFilePreview({
if (language === "markdown") {
return (
`;
})();
+ const bodyClass = kind === "image" ? "fullbleed" : "";
+
return `
@@ -648,8 +656,12 @@ function buildArtifactViewerSrcDoc({
overflow: hidden;
padding: 12px;
}
+ body.fullbleed {
+ padding: 0;
+ }
.preview {
width: 100%;
+ height: 100%;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--panel);
@@ -715,7 +727,7 @@ function buildArtifactViewerSrcDoc({
.link:hover { text-decoration: underline; }
-
+
${content}
`;
diff --git a/frontend/src/components/workspace/chats/chat-box.tsx b/frontend/src/components/workspace/chats/chat-box.tsx
index 3f693bc4..e92a6c39 100644
--- a/frontend/src/components/workspace/chats/chat-box.tsx
+++ b/frontend/src/components/workspace/chats/chat-box.tsx
@@ -23,7 +23,10 @@ import { useThread } from "../messages/context";
const CLOSE_MODE = { chat: 100, artifacts: 0 };
const OPEN_MODE = { chat: 60, artifacts: 40 };
-const ChatBox: React.FC<{ children: React.ReactNode; threadId: string }> = ({
+const ChatBox: React.FC<{
+ children: React.ReactNode;
+ threadId: string | undefined;
+}> = ({
children,
threadId,
}) => {