Smith::Session::Store
Inherits Reference < Object
Constructors
new(base_dir : String | Nil = nil)
SourceInstance methods
base_dir
Sourcecreate(model : String, provider : String, cwd : String = Dir.current) : Data
Sourcefork(reference : String) : Data
A copy under a new id, so one conversation can be taken two ways. The original is untouched — including its checkpoints, which stay with it.
index_path
Sourcelatest
Sourcelist
Sourceload(id : String) : Data
Sourcenew_id
Sourcerename(reference : String, name : String) : Data
Sourceresolve(reference : String) : Data
A reference is whatever the user typed: an id or a name. An id wins, since it is unambiguous by construction.
save(session : Data, derive_name : Bool = true, check_name : Bool = true) : Nil
derive_name and check_name exist so a rename can write a name the
normal path would have refused or replaced; everyday saves want both.
session_dir(id : String) : String
A session owns a directory now, so its checkpoints have somewhere to live next to it.
sessions_dir
Source