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
feat(speech): mic button on the terminal node header — dictate into that node (dictation)
enes1affa96fe3fe
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex e634a575d..614e9cedc 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -2210,6 +2210,31 @@ export function Canvas() {}}, [openFile, revealProjectFile])+ // Mic button on a terminal/chat node's header (TerminalNode dispatches this — same+ // no-direct-line-to-canvas pattern as nodeterm:open-file above). Unlike toggleDictation's+ // shortcut path, which infers the target from the current selection, this opens the overlay+ // targeting THAT node explicitly. If the overlay is already open — e.g. a different node was+ // targeted via the shortcut, or another mic button — a fresh mic click always means "dictate+ // here", so this just retargets it (close-and-reopen with the new target); simplest correct+ // behavior, since a mic click carries an explicit target and needs none of the shortcut's+ // own-phase STOP-vs-CANCEL ambiguity.+ useEffect(() => {+ const onDictate = (e: Event): void => {+ const d = (e as CustomEvent<{ nodeId: string }>).detail+ if (!d?.nodeId) return+ const n = nodesRef.current.find((x) => x.id === d.nodeId)+ if (!n) return+ setDictationTarget({+ kind: n.type === 'chat' ? 'chat' : 'terminal',+ nodeId: n.id,+ title: (n.data.title as string) || 'Untitled'+ })+ setDictationOpen(true)+ }+ window.addEventListener('nodeterm:dictate', onDictate)+ return () => window.removeEventListener('nodeterm:dictate', onDictate)+ }, [])+/** Open a git diff editor node for a changed file (from Source Control). */const openDiff = useCallback((relPath: string, staged: boolean, scopeCwd?: string) => {diff --git a/src/renderer/components/icons.tsx b/src/renderer/components/icons.tsxindex f139f5423..879c5aacf 100644--- a/src/renderer/components/icons.tsx+++ b/src/renderer/components/icons.tsx@@ -194,6 +194,13 @@ export const IconSearch = () => (</svg>)+export const IconMic = () => (+ <svg {...S}>+ <rect x="9" y="2" width="6" height="12" rx="3" />+ <path d="M5 11a7 7 0 0 0 14 0M12 18v4M8 22h8" />+ </svg>+)+export const IconSessions = () => (<svg {...S}><rect x="3" y="4" width="18" height="5" rx="1.5" />diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsxindex 6883ad306..8d092f548 100644--- a/src/renderer/nodes/TerminalNode.tsx+++ b/src/renderer/nodes/TerminalNode.tsx@@ -51,7 +51,7 @@ import {import { registerWebglClient, type WebglClientHandle } from '../terminal/webgl-budget'import { deliverCommand } from '../terminal/command-delivery'import { FindBar } from '../components/FindBar'-import { IconSearch, IconChat } from '../components/icons'+import { IconSearch, IconChat, IconMic } from '../components/icons'import { NodeTags } from '../components/NodeTags'import { Tooltip } from '../components/Tooltip'import { useTerminalSearch } from '../terminal/useTerminalSearch'@@ -1701,6 +1701,17 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasN<IconSearch /></button></Tooltip>+ <Tooltip label="Dictate into this terminal">+ <button+ className="term-node__mic nodrag"+ onClick={(e) => {+ e.stopPropagation()+ window.dispatchEvent(new CustomEvent('nodeterm:dictate', { detail: { nodeId: id } }))+ }}+ >+ <IconMic />+ </button>+ </Tooltip><Tooltip label="Name with AI (from terminal output)"><button className="term-node__ai nodrag" disabled={naming} onClick={nameWithAi}>{naming ? '…' : '✦'}diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 8e8bed675..45d53883f 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -1202,6 +1202,24 @@ body,color: #6cb0ff;}+.term-node__mic {+ background: transparent;+ border: none;+ color: var(--muted);+ cursor: pointer;+ line-height: 1;+ padding: 2px 5px;+ border-radius: 4px;+ flex-shrink: 0;+ display: inline-flex;+ align-items: center;+}++.term-node__mic:hover {+ background: rgba(10, 132, 255, 0.18);+ color: #6cb0ff;+}+.term-node__chat {background: transparent;border: none;