PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 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 All 128 releases
← All changes | src/Agent/Chat.jsx +37 -3 3.1.5 → 3.2.2 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';
@@ -6,10 +8,11 @@
6 8 import { useQuickEditStore } from '@quick-edit/state/store';
7 9 import { useEffect } from '@wordpress/element';
8 10 import { SidebarLayout } from './components/layouts/SidebarLayout';
9 11
10 -export const Chat = ({ busy, working, children }) => {
12 +export const Chat = ({ busy, working, waiting, taskActive, 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
@@ -46,8 +49,25 @@
46 49 </MobileLayout>
47 50 );
48 51 }
49 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 + </>
67 + );
68 + }
69 +
50 70 if (mode === 'docked-left') {
51 71 return (
52 72 <SidebarLayout>
53 73 <div
@@ -55,9 +75,16 @@
55 75 className="flex min-h-0 flex-1 grow flex-col font-sans"
56 76 >
57 77 {children}
58 78 </div>
59 - {editModeOn && <DOMHighlighter busy={busy} working={working} />}
79 + {editModeOn && (
80 + <DOMHighlighter
81 + busy={busy}
82 + working={working}
83 + waiting={waiting}
84 + taskActive={taskActive}
85 + />
86 + )}
60 87 </SidebarLayout>
61 88 );
62 89 }
63 90
@@ -68,8 +95,15 @@
68 95 className="flex min-h-0 flex-1 grow flex-col font-sans"
69 96 >
70 97 {children}
71 98 </div>
72 - {editModeOn && <DOMHighlighter busy={busy} working={working} />}
99 + {editModeOn && (
100 + <DOMHighlighter
101 + busy={busy}
102 + working={working}
103 + waiting={waiting}
104 + taskActive={taskActive}
105 + />
106 + )}
73 107 </DragResizeLayout>
74 108 );
75 109 };