From 7ce4d4cdc20ad4a0cdcbc83372dd5161759a5b0b Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 17 Mar 2026 21:02:59 +0800 Subject: [PATCH] feat: make mode stage a full workspace --- app/canvas/[id]/page.tsx | 149 +++++++++-------- components/canvas/CanvasChatPanel.tsx | 227 ++++++++++++++------------ 2 files changed, 207 insertions(+), 169 deletions(-) diff --git a/app/canvas/[id]/page.tsx b/app/canvas/[id]/page.tsx index 4944316e0..073ddf677 100644 --- a/app/canvas/[id]/page.tsx +++ b/app/canvas/[id]/page.tsx @@ -957,78 +957,99 @@ export default function CanvasEditorPage({ params }: PageProps) { ) : (
-
-
-
-
-
-
- - 生图模式 -
-
- 先在本页选择生图模式,再使用上方 SKU / SPU 取图,右侧会自动进入对应图片槽位。 -
-
- 第 2 步 / 2 步 +
+
+
+
+
+
+
+ + 生图模式 +
+
+ 先在本页选择生图模式,再使用上方 SKU / SPU 取图,右侧全屏工作区会自动进入对应图片槽位并展示结果。 +
+
+ 第 2 步 / 2 步 +
+
- + {!workflowProgress.isComplete ? ( +
+ 第一步尚未完成,你也可以在当前直接继续生图模式选择。 +
+ ) : null}
- {!workflowProgress.isComplete ? ( -
- 第一步尚未完成,你也可以在当前直接继续生图模式选择。 +
+
+ +
- ) : null} -
-
-
- -
-
-
-
- {}} - selectedAgentPresetId={isAgentFeatureEnabled ? selectedAgentPresetId : null} - chatScope="agent" - workflowContext={workflowContext} - /> +
+
+
+
+
执行工作区
+
+ 这里不再是侧边对话框,而是全屏生图工作台。生成结果、槽位操作和补充指令都在这里完成。 +
+
+
+ {selectedAgentPresetId ? ( +
+ 当前模式已选 +
+ ) : ( +
+ 请选择左侧生图模式 +
+ )} +
+
+
+ +
+
diff --git a/components/canvas/CanvasChatPanel.tsx b/components/canvas/CanvasChatPanel.tsx index 6b42c99a7..73c29b602 100644 --- a/components/canvas/CanvasChatPanel.tsx +++ b/components/canvas/CanvasChatPanel.tsx @@ -114,6 +114,7 @@ interface CanvasChatPanelProps { selectedAgentPresetId?: string | null; chatScope?: "canvas" | "agent"; workflowContext?: AgentWorkflowComposerContext | null; + presentation?: "panel" | "workspace"; } type VideoStoryboardStreamData = @@ -1686,6 +1687,7 @@ export function CanvasChatPanel({ selectedAgentPresetId, chatScope = "canvas", workflowContext = null, + presentation = "panel", }: CanvasChatPanelProps) { const { data: session } = useSession(); const [input, setInput] = useState(""); @@ -7882,9 +7884,15 @@ export function CanvasChatPanel({ const fallbackTitle = String(projectTitle || "").trim(); return fallbackTitle || "未命名画布"; }, [activeSessionTitle, projectTitle]); + const isWorkspacePresentation = presentation === "workspace"; return ( -
+
{/* 全局遮罩提示 - 当处于画布选图模式时显示 */} {detailSlotPickerIndex !== null && (
@@ -7912,111 +7920,112 @@ export function CanvasChatPanel({
)} - {/* Header - Minimal with Icons */} -
-
- - - -

- {displayCanvasName} -

-
-
-
- -
- - {isSessionMenuOpen && ( -
-
聊天窗口记录
-
- {chatSessions.length === 0 ? ( -
暂无记录
- ) : ( - chatSessions.map((session, index) => { - const isActive = session.id === activeChatId; - const timeLabel = new Date(session.updatedAt).toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - }); - return ( - - ); - }) - )} -
-
- )} + {displayCanvasName} + +
+
+
+ +
+ + {isSessionMenuOpen && ( +
+
聊天窗口记录
+
+ {chatSessions.length === 0 ? ( +
暂无记录
+ ) : ( + chatSessions.map((session, index) => { + const isActive = session.id === activeChatId; + const timeLabel = new Date(session.updatedAt).toLocaleTimeString([], { + hour: "2-digit", + minute: "2-digit", + }); + return ( + + ); + }) + )} +
+
+ )} +
+ + +
- -
-
-
+ ) : null} {/* 消息列表 */} {isDetailEmptyState ? ( @@ -8025,7 +8034,8 @@ export function CanvasChatPanel({
+