class

Smith::Session::Store

Inherits Reference < Object

Constructors

new(base_dir : String | Nil = nil)
Source

Instance methods

base_dir
Source
create(model : String, provider : String, cwd : String = Dir.current) : Data
Source
fork(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.

Source
index_path
Source
latest
Source
list
Source
load(id : String) : Data
Source
new_id
Source
rename(reference : String, name : String) : Data
Source
resolve(reference : String) : Data

A reference is whatever the user typed: an id or a name. An id wins, since it is unambiguous by construction.

Source
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.

Source
session_dir(id : String) : String

A session owns a directory now, so its checkpoints have somewhere to live next to it.

Source
sessions_dir
Source