Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
/** Which node ⌘⇧F / the "Focus node" palette entry acts on (issue #78): the selected terminal
* node. Only terminals — focus mode reparents the node's xterm host, which is meaningless for
* stickies/groups/editors. With several selected, the first wins (a deliberate, boring rule —
* matching how single-node actions elsewhere resolve multi-selection). */
export function focusTargetId(
nodes: readonly { id: string; type?: string; selected?: boolean }[]
): string | null {
return nodes.find((n) => n.selected && n.type === 'terminal')?.id ?? null
}