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)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
created_at
Sourcecwd
Sourcecwd=(cwd : String)
Sourcefirst_prompt
Sourceid
Sourcemessages
Sourcemodel
Sourcemodel=(model : String)
Sourcename
Sourcename=(name : String | Nil)
Sourceparent_id
Sourceparent_id=(parent_id : String | Nil)
Sourceprompted?
True when first_prompt is one of its own placeholders rather than something the user actually typed.
provider
Sourceprovider=(provider : String)
Sourceto_index_entry
Sourcetodos
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.
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.
updated_at
Sourceupdated_at=(updated_at : Time)
Sourceusage
Sourceusage=(usage : Smith::LLM::Usage)
Source