diff --git a/app/canvas/[id]/page.tsx b/app/canvas/[id]/page.tsx
index 69d75c24c..eecb9c2d0 100644
--- a/app/canvas/[id]/page.tsx
+++ b/app/canvas/[id]/page.tsx
@@ -463,34 +463,9 @@ export default function CanvasEditorPage({ params }: PageProps) {
isPanelOpen ? "translate-x-0 opacity-100" : "translate-x-[120%] opacity-0"
)}>
- {/* 移除 Tabs 组件,直接显示 AI 对话面板 */}
-
-
-
-
- AI 对话
-
-
- {/* Integrated Close Button */}
-
-
-
-
- 隐藏面板
-
-
-
- {/* AI 对话内容 */}
-
-
-
+ {/* AI 对话内容 */}
+
+ setIsPanelOpen(false)} />
diff --git a/components/canvas/CanvasChatPanel.tsx b/components/canvas/CanvasChatPanel.tsx
index ac451039e..0601e1dcb 100644
--- a/components/canvas/CanvasChatPanel.tsx
+++ b/components/canvas/CanvasChatPanel.tsx
@@ -26,6 +26,7 @@ import { ImageParamsBar, type ImageGenerationParams } from "@/components/image-p
interface CanvasChatPanelProps {
chatId: string;
initialMessages?: ChatMessage[];
+ onClose?: () => void;
}
// 建议卡片数据 - 已移除
@@ -54,7 +55,7 @@ function extractImageUrls(text: string): string[] {
return urls;
}
-export function CanvasChatPanel({ chatId, initialMessages = [] }: CanvasChatPanelProps) {
+export function CanvasChatPanel({ chatId, initialMessages = [], onClose }: CanvasChatPanelProps) {
const [input, setInput] = useState("");
const [attachments, setAttachments] = useState([]);
const [selectedModelId, setSelectedModelId] = useState("");
@@ -312,28 +313,41 @@ export function CanvasChatPanel({ chatId, initialMessages = [] }: CanvasChatPane
const isLoading = status === 'streaming' || status === 'submitted';
return (
-
+
{/* Header - Minimal with Icons */}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {onClose && (
+
+ )}
{/* 消息列表 */}
-
+
{messages.length === 0 && (