class

Smith::Session::Data

Inherits JSON::Serializable < Reference < Object

Constructors

new(id : String, cwd : String, model : String, provider : String, messages : Array(Smith::LLM::Message) = Array(Smith::LLM::Message).new, usage : Smith::LLM::Usage = Smith::LLM::Usage.new(0, 0, 0), todos : Array(Smith::TodoList::Item) = Array(Smith::TodoList::Item).new, created_at : Time = Time.local, updated_at : Time = Time.local, name : String | Nil = nil, parent_id : String | Nil = nil)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

created_at
Source
cwd=(cwd : String)
Source
first_prompt
Source
messages
Source
messages=(messages : Array(Smith::LLM::Message))
Source
model
Source
model=(model : String)
Source
name
Source
name=(name : String | Nil)
Source
parent_id
Source
parent_id=(parent_id : String | Nil)
Source
prompted?

True when first_prompt is one of its own placeholders rather than something the user actually typed.

Source
provider
Source
provider=(provider : String)
Source
reference

What to type to get this session back.

Source
to_index_entry
Source
todos

Sessions written before the todo tool existed simply have no field. The same goes for name and parent_id: both default so older files load.

Source
todos=(todos : Array(Smith::TodoList::Item))

Sessions written before the todo tool existed simply have no field. The same goes for name and parent_id: both default so older files load.

Source
updated_at
Source
updated_at=(updated_at : Time)
Source
usage
Source
usage=(usage : Smith::LLM::Usage)
Source