Documentation
¶
Index ¶
- Variables
- func Clone(in []map[string]any) []map[string]any
- type Manager
- func (m *Manager) Clone(fromID, toID string) bool
- func (m *Manager) EnablePersistence(path string) error
- func (m *Manager) Get(id string) (*Session, bool)
- func (m *Manager) GetOrCreate(id string) *Session
- func (m *Manager) List() []*Session
- func (m *Manager) NewForkID(base string) string
- func (m *Manager) Rewind(id, userMessageID string) bool
- func (m *Manager) RewindFiles(id, userMessageID, root string) error
- func (m *Manager) SetState(id string, messages []map[string]any, userTurns int)
- func (m *Manager) Snapshot(id, userMessageID string)
- func (m *Manager) SnapshotFiles(id, userMessageID, root string) error
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCheckpoint = errors.New("no checkpoint found")
ErrNoCheckpoint indicates that no checkpoint exists for requested message ID.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages in-memory sessions.
func (*Manager) EnablePersistence ¶
EnablePersistence enables durable session persistence at the provided path. Existing state from disk is loaded immediately when present.
func (*Manager) GetOrCreate ¶
GetOrCreate gets or creates a session.
func (*Manager) RewindFiles ¶
RewindFiles rewinds files rooted at root to a stored snapshot.
func (*Manager) SetState ¶
SetState replaces the current session message history and user-turn count.
func (*Manager) SnapshotFiles ¶
SnapshotFiles stores a filesystem snapshot rooted at root for a user message.
Click to show internal directories.
Click to hide internal directories.