/** * The chat of a mirrored session, drawn with pi's own components. * * pi's interactive mode is fed by the same events this receives, and runs the * same switch: `message_start` opens an assistant message, each * `message_update` hands it the partial message, a tool call in it opens a * tool box, `tool_execution_end` fills the box in. History is drawn from the * transcript by role. So the pane looks like pi because it *is* pi's chat, * minus what belongs to a session it does not own. */ import { Container, type TUI } from "@earendil-works/pi-tui"; /** A transcript entry, read the way pi's chat reads it. */ export type Message = { role: string; content: unknown; toolCallId?: string; stopReason?: string; errorMessage?: string; isError?: boolean; }; /** A pi session event, the fields the chat reads. Loose like `SessionEvent`. */ export type Live = { type: string; message?: Message; toolCallId?: string; toolName?: string; args?: unknown; result?: unknown; isError?: boolean; partialResult?: unknown; }; /** The chat: one container, fed by transcript entries and by live events. */ export declare class Chat { #private; readonly container: Container; constructor(ui: TUI, cwd: string); /** One entry of the transcript as it stood when the pane attached. */ replay(message: Message): void; /** One event of the turn in flight. */ live(event: Live): void; } //# sourceMappingURL=chat.d.ts.map