PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
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
extendify / src / Agent / lib / canvas-views.js

canvas-views.js in Extendify 3.2.1, at src/Agent/lib/canvas-views.js

18 lines 724 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // No seat means a modal of the canvas alone.
2 // dims 'agent' puts the agent window behind the scrim along with the page.
3 const VIEWS = {
4 assisted: { assist: true, seat: 'beside', dims: 'page' },
5 'assisted-modal': { assist: true, seat: 'modal', dims: 'page' },
6 simple: { assist: false, seat: null, dims: 'agent' },
7 };
8
9 // An unknown or absent view renders whenFinished inline in the transcript.
10 export const canvasView = (name) => VIEWS[name] ?? null;
11
12 // Only the docked sidebar can widen for a pane; mobile has room for neither.
13 export const canvasSeat = (seat, { mode, isMobile }) => {
14 if (!seat || isMobile) return null;
15 if (seat === 'modal') return 'modal';
16 return mode === 'docked-left' ? 'beside' : 'modal';
17 };
18