struct

Smith::Session::IndexEntry

Inherits JSON::Serializable < Struct < Value < Object

Constructors

new(id : String, created_at : Time, updated_at : Time, first_prompt : String, message_count : Int32, name : String | Nil = nil, parent_id : String | Nil = nil, provider : String | Nil = nil, model : String | Nil = nil, usage : Smith::LLM::Usage | Nil = nil)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

cost(overrides : Smith::Pricing::Overrides | Nil = nil) : Float64 | Nil

What the tokens came to, per the pricing table and any [pricing] overrides. nil when the rate is unknown or the entry predates usage tracking — a wrong cost figure is worse than no cost figure.

Source
created_at
Source
first_prompt
Source
message_count
Source
model
Source
name

Index files written before names existed simply have no field.

Source
parent_id
Source
provider

Index files written before costs were listed have none of these; the row shows n/a rather than guessing or breaking the list.

Source
reference

What to type to get this session back.

Source
updated_at
Source
usage
Source