/** * The whole pane: the chat, a footer, a line for what was refused, and the * prompt. What the keyboard does is decided here, and only here. * * `enter` steers, `esc` stops, `ctrl+c` leaves without touching the subagent. * A pane whose subagent is done keeps the transcript on screen and says so in * the footer, so the last thing it said is not lost with the window. */ import { type TUI } from "@earendil-works/pi-tui"; import type { MirrorOut } from "../src/mirror.ts"; /** What the screen does with what the person typed. */ export type ScreenActions = { /** A line submitted while the subagent works. */ steer(text: string): void; /** `esc`: stop the subagent. */ abort(): void; /** `ctrl+c`: leave the pane. */ leave(): void; }; /** The pane's screen, fed by the mirror's lines. */ export type Screen = { /** One line from the mirror. */ handle(line: MirrorOut): void; /** The line to the mirror went, with a reason or not. */ disconnected(reason?: string): void; }; /** Builds the screen into `ui`. Nothing is drawn until `ui.start()`. */ export declare function createScreen(ui: TUI, id: string, cwd: string, actions: ScreenActions): Screen; //# sourceMappingURL=screen.d.ts.map