Smith::UI::InputEditor
Inherits Reference < Object
The prompt's single line of input. One line on purpose: everything the agent takes is one prompt, and multi-line editing buys little here while complicating the layout. History is what makes it comfortable.
Constructors
new(history : Array(String) = Array(String).new, max_history : Int32 = 500)
SourceInstance methods
display_width
Sourceempty?
Sourcehandle(key : Key) : String | Nil
Handles one key. Returns the submitted text when Enter was pressed, nil otherwise.
history
Sourcereset
Sourcetext
Source