diff --git a/app/canvas/[id]/page.tsx b/app/canvas/[id]/page.tsx
index 6d58576f9..03aa8c12a 100644
--- a/app/canvas/[id]/page.tsx
+++ b/app/canvas/[id]/page.tsx
@@ -165,14 +165,8 @@ export default function CanvasEditorPage({ params }: PageProps) {
: null;
const resolvedPanelWidth = viewportWidth > 0
- ? isAgentMode
- ? Math.min(
- 520,
- Math.max(Math.floor((viewportWidth - DOCKED_PANEL_INSET * 2) / 2), 340)
- )
- : Math.min(FLOATING_PANEL_WIDTH, Math.max(viewportWidth - DOCKED_PANEL_INSET, 0))
+ ? Math.min(FLOATING_PANEL_WIDTH, Math.max(viewportWidth - DOCKED_PANEL_INSET, 0))
: FLOATING_PANEL_WIDTH;
- const agentPanelWidth = isAgentMode ? resolvedPanelWidth : 0;
const panelOcclusionRight = isPanelOpen ? resolvedPanelWidth + DOCKED_PANEL_INSET : 0;
const floatingToolbarOffset = isPanelOpen ? -(panelOcclusionRight / 2) : 0;
const compactControlsLeft = FLOATING_UI_GAP;
@@ -705,6 +699,73 @@ export default function CanvasEditorPage({ params }: PageProps) {
);
}
+ const brandEntry = (
+
+
+
+ );
+
+ const agentDisabledNotice =
+ requestedAgentMode && !isAgentFeatureEnabled ? (
+
+
+
+
智能体功能未开启,请联系管理员在系统设置中开启。
+
+
+ ) : null;
+
+ if (isAgentMode) {
+ return (
+
+
+ {brandEntry}
+ {agentDisabledNotice}
+
+
+
+
+
+
+ {}}
+ selectedAgentPresetId={isAgentFeatureEnabled ? selectedAgentPresetId : null}
+ />
+
+
+
+
+
+ );
+ }
+
return (
@@ -714,38 +775,8 @@ export default function CanvasEditorPage({ params }: PageProps) {
- {/* Brand Entry (Top Left) */}
-
-
-
-
- {/* Agent Disabled Notice */}
- {requestedAgentMode && !isAgentFeatureEnabled ? (
-
-
-
-
智能体功能未开启,请联系管理员在系统设置中开启。
-
-
- ) : null}
+ {brandEntry}
+ {agentDisabledNotice}
{/* 2. Floating Actions (Top Right) */}
{!isPanelOpen && (
@@ -762,26 +793,6 @@ export default function CanvasEditorPage({ params }: PageProps) {
)}
{/* 4. Floating Sidebar (Right) */}
- {isAgentMode ? (
-
- ) : null}
-