| 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 |
|