import type { LayoutNode } from 'officerdev'; /** Does this tree contain a panel running `appType`? */ export function hasAppType(node: LayoutNode, appType: string): boolean { if (node.type === 'panel') return node.appType === appType; return node.children.some((child) => hasAppType(child.node, appType)); } /* One sidebar panel, not two. It was a vertical 25/75 split — `chat-live` above `chat-session-list` — on the reasoning that the two answered different questions from different sources (the agent's in-memory map versus transcripts on disk). True, and still true; what made it wrong was the arithmetic. Live sessions are rare, so the top quarter of the sidebar was empty almost always, and the list that is used constantly got three quarters of the space instead of all of it. Both questions now live in one panel as tabs, which is the same information in the same place without paying for the rarer one when it has nothing to say. `chat-live` no longer exists as a panel type — see the migration guard in index.tsx, which exists because deleting a panel type from the code does not delete it from anyone's saved layout. */ export const defaultLayout: LayoutNode = { type: 'group', id: 'chat-history-root', direction: 'horizontal', children: [ { node: { type: 'panel', id: 'chat-list', appType: 'chat-session-list' }, size: 35 }, { node: { type: 'panel', id: 'chat-detail', appType: 'chat-detail' }, size: 65 }, ], };