class

Smith::UI::App

Inherits Reference < Object

The fullscreen controller. Owns the terminal, the block list and the key loop; everything else — the renderer, the approver, the plan gate — asks it to show things and, where a human decision is needed, blocks until one arrives.

Rendering model (same as Claude Code): finished blocks are flushed into the normal scrollback once; the live region at the bottom — streaming text, running tools, status bar, input — is redrawn in place every tick. No alternate screen, so the transcript stays in the terminal's scrollback and can be copied and searched like any other output.

Constants

RESIZE_SETTLE_TICKS = 3

Dragging a window edge delivers a SIGWINCH per step. Redrawing on each is wasted work that reads as flicker, so the redraw waits for this many quiet poll windows (~50ms apiece) in a row.

Constructors

new(terminal : Terminal = Terminal.new, history : Array(String) = Array(String).new)
Source

Instance methods

activity
Source
activity=(activity : String)
Source
add_block(block : Block, finalize : Bool = false) : Block
Source
blocks
Source
cost_text
Source
cost_text=(cost_text : String)
Source
editor
Source
flush_blocks!

Every finished block, in order, moves into the scrollback — printed once by draw! and never redrawn after that.

Source
mark_dirty
Source
mode
Source
mode=(mode : Smith::Mode)
Source
model_name

Status bar contents, updated by whoever drives the run.

Source
model_name=(model_name : String)

Status bar contents, updated by whoever drives the run.

Source
notice(text : String, style : Style = Style.new(fg: Palette::INFO)) : Nil
Source
notice(lines : Array(StyledLine)) : Nil
Source
on_abort

Called on the second interrupt within two seconds.

Source
on_interrupt
Source
quit
Source
state
Source
teardown
Source
terminal
Source
turn_finished

Called by the turn fiber once agent.send returns, so the prompt comes back.

Source
usage_text
Source
usage_text=(usage_text : String)
Source

Nested types