class

Smith::UI::App

Inherits Reference < Object

The fullscreen controller.

The machinery — the event loop, the live region, committing finished blocks into the scrollback, the modal channels — comes from Anvil::App. What lives here is what is smith's own: which keys mean what while a prompt is open, how the status bar reads, and what the slash-command popup does to the keys it owns.

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 whenever something changes. No alternate screen, so the transcript stays in the terminal's scrollback and can be copied and searched like any other output.

Constants

INTERRUPT_WINDOW = 2.seconds

Two seconds, not the library's default: a turn can take a moment to notice the first interrupt, and a hasty second press should not kill it.

Constructors

new(anvil : Anvil::App)
Source
terminal(history : Array(String) = Array(String).new) : App

The real thing: a live region at the bottom of the terminal.

Source

Instance methods

activity
Source
activity=(activity : String)
Source
add_block(block : Anvil::View::Block) : Anvil::View::Block

A block reaches the scrollback once it reports itself finalized — which is what the old finalize: flag always meant, so the flag is gone.

Source
anvil
Source
blocks(*args, **options)
Source
blocks(*args, **options, &)
Source
clear!
Source
completions=(list : Array(Completion)) : Nil
Source
cost_text
Source
cost_text=(cost_text : String)
Source
editor(*args, **options)
Source
editor(*args, **options, &)
Source
io

Where the app's output goes — an IO::Memory under test.

Source
mark_dirty(*args, **options)
Source
mark_dirty(*args, **options, &)
Source
mode
Source
mode=(mode : Smith::Mode)
Source
model_name
Source
model_name=(model_name : String)
Source
notice(text : String, style : Style = Style.new(fg: Palette::INFO)) : Nil

smith's own notice block, not the library's generic one: it brings the rendering the renderer relies on.

Source
notice(lines : Array(StyledLine)) : Nil
Source
on_abort
Source
on_interrupt
Source
quit(*args, **options)
Source
quit(*args, **options, &)
Source
render(*args, **options)
Source
render(*args, **options, &)
Source
state(*args, **options)
Source
state(*args, **options, &)
Source
surface(*args, **options)
Source
surface(*args, **options, &)
Source
teardown
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