PluginProbe
Extendify / trunk
Extendify vtrunk
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/Chat.jsx +20 -0 3.1.5 → trunk View file →
@@ -1,5 +1,7 @@
1 +import { useCanvasSeat } from '@agent/components/Canvas';
1 2 import { DOMHighlighter } from '@agent/components/DOMHighlighter';
3 +import { CanvasModalLayout } from '@agent/components/layouts/CanvasModalLayout';
2 4 import { DragResizeLayout } from '@agent/components/layouts/DragResizeLayout';
3 5 import { MobileLayout } from '@agent/components/layouts/MobileLayout';
4 6 import { DESKTOP_MIN_WIDTH, useGlobalStore } from '@agent/state/global';
5 7 import { useEditModeStore } from '@quick-edit/state/edit-mode';
@@ -8,8 +10,9 @@
8 10 import { SidebarLayout } from './components/layouts/SidebarLayout';
9 11
10 12 export const Chat = ({ busy, working, children }) => {
11 13 const { setIsMobile, isMobile, mode } = useGlobalStore();
14 + const canvasModal = useCanvasSeat() === 'modal';
12 15 const editModeOn = useEditModeStore((s) => s.on);
13 16 const block = useQuickEditStore((s) => s.agentBlock);
14 17 const setBlock = useQuickEditStore((s) => s.setAgentBlock);
15 18
@@ -43,8 +46,25 @@
43 46 >
44 47 {children}
45 48 </div>
46 49 </MobileLayout>
50 + );
51 + }
52 +
53 + if (canvasModal) {
54 + return (
55 + <>
56 + {/* The docked panel holds the page's offset, so it stays behind. */}
57 + {mode === 'docked-left' ? <SidebarLayout /> : null}
58 + <CanvasModalLayout>
59 + <div
60 + id="extendify-agent-chat"
61 + className="flex min-h-0 flex-1 grow flex-col font-sans"
62 + >
63 + {children}
64 + </div>
65 + </CanvasModalLayout>
66 + </>
47 67 );
48 68 }
49 69
50 70 if (mode === 'docked-left') {