onda_workspace_add_terminal
Add a terminal pane to a workspace and wait for its PTY to be ready. Control placement with split direction and relative pane.
Instructions
Add a new terminal pane to a workspace and wait for its PTY to be ready. Returns { success, terminalId, paneId, workspaceId, windowId, ready }.
Placement: by default the new pane is appended via react-mosaic's built-in logic (typically "split right"). For deterministic placement, pass direction and (optionally) relativeToPaneId — this routes through splitPane and gives you explicit control.
CALL onda_workspace_layout FIRST when you care about placement: it returns the current mosaic tree + active pane + viewport, so you can decide whether to stack "down" (output-heavy panes) or split "right" (parallel-watch panes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the new terminal. | |
| shell | No | Shell to use (e.g., /bin/zsh). | |
| direction | No | Optional. When set, the pane is created by splitting an existing one in this direction. "horizontal"/"down"/"up" produce a top/bottom pair; "vertical"/"right"/"left" produce a left/right pair. | |
| workspaceId | No | Workspace ID. Omit to use active workspace. | |
| waitForReady | No | Default true. When false, returns as soon as the pane object is created (PTY may still be spawning). | |
| relativeToPaneId | No | Optional pane ID to split. When omitted with `direction` set, the active pane is used. |