Documentation
¶
Index ¶
- Variables
- func FindTranscript(root, id string) (string, error)
- type Compaction
- type History
- type Meta
- type Page
- type PageCursor
- type PageOptions
- type Schedule
- type Store
- func (s *Store) AddSchedule(sessionID, schedule, prompt string, anchor time.Time) (id int, err error)
- func (s *Store) ClearMessages(id string) error
- func (s *Store) ClearSnapshots(id string) error
- func (s *Store) Close() error
- func (s *Store) Compactions(id string) []Compaction
- func (s *Store) Create(cwd, model, provider string) (id string, err error)
- func (s *Store) Delete(id string) error
- func (s *Store) DeleteCompaction(id string, seq int) error
- func (s *Store) DeleteFrom(id string, from int) error
- func (s *Store) DeleteSchedule(sessionID string, id int) error
- func (s *Store) Fork(srcID string, uptoSeq int, title string) (id string, err error)
- func (s *Store) ForkTitle(base string) (title string, err error)
- func (s *Store) ForksOf(id string) (out []Meta, err error)
- func (s *Store) History(id string, initial []ai.Message) (*History, []ai.Message, error)
- func (s *Store) LastExchange(id string) (user, assistant string)
- func (s *Store) LatestInDir(dir string) (meta Meta, err error)
- func (s *Store) ListPage(ctx context.Context, options PageOptions) (Page, error)
- func (s *Store) Load(idOrPrefix string) (meta Meta, msgs []ai.Message, err error)
- func (s *Store) LoadTasks(id string) ([]Task, error)
- func (s *Store) MarkFired(sessionID string, id int, at time.Time) error
- func (s *Store) RawMessages(id string) []ai.Message
- func (s *Store) Recent(n int) (out []Meta, err error)
- func (s *Store) RecordCompaction(id string, cutoff int, summary, model string, usage ai.Usage) error
- func (s *Store) Save(id string, from int, msgs []ai.Message, model, provider string) error
- func (s *Store) SaveHistory(id string, h *History, msgs []ai.Message, model, provider string) error
- func (s *Store) SaveHistoryWithUsage(id string, h *History, msgs []ai.Message, model, provider string, ...) error
- func (s *Store) SaveSubagentTranscript(parentID, taskID string, msgs []ai.Message, model, provider string) (string, error)
- func (s *Store) SaveTask(id string, t Task) error
- func (s *Store) Schedules(id string) []Schedule
- func (s *Store) Search(query string, includeArchived bool) (out []Meta, err error)
- func (s *Store) SessionsDir() string
- func (s *Store) SetArchived(id string, archived bool) error
- func (s *Store) SetEffort(id, effort string) error
- func (s *Store) SetGoal(id, goal string) error
- func (s *Store) SetPinned(id string, pinned bool) error
- func (s *Store) SetSnapshot(id string, seq int, ref string) error
- func (s *Store) SetTags(id string, tags []string) error
- func (s *Store) SetTitle(id, title string) error
- func (s *Store) SetTodos(id, todos string) error
- func (s *Store) SetUsage(id string, usage ai.UsageSummary) error
- func (s *Store) SnapshotReferenced(ref string) (bool, error)
- func (s *Store) Snapshots(id string) map[int]string
- func (s *Store) SubagentTranscript(parentID, taskID string) ([]ai.Message, error)
- func (s *Store) Todos(id string) string
- func (s *Store) TranscriptPath(id string) string
- func (s *Store) TruncateHistory(id string, h *History, cut int) error
- func (s *Store) UndoCompaction(id string, initial []ai.Message) (*History, []ai.Message, error)
- func (s *Store) UserHistory(limit int) (out []string, err error)
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("session store is closed")
View Source
var ErrNotFound = errors.New("session not found")
Functions ¶
func FindTranscript ¶ added in v0.103.0
Types ¶
type Compaction ¶
type History ¶ added in v0.103.0
type History struct {
// contains filtered or unexported fields
}
func (*History) NewContext ¶ added in v0.104.0
type Meta ¶
type Meta struct {
ID string `json:"id"`
Title string `json:"title"`
Model string `json:"model"`
Provider string `json:"provider"`
CWD string `json:"cwd"`
Goal string `json:"goal"`
ForkedFrom string `json:"forked_from"`
ForkSeq int `json:"fork_seq"`
Tags []string `json:"tags"`
Pinned bool `json:"pinned"`
Archived bool `json:"archived"`
Effort string `json:"effort"`
UsageIn int `json:"usage_in"`
UsageCached int `json:"usage_cached"`
UsageOut int `json:"usage_out"`
UsageCacheWrite int `json:"usage_cache_write,omitempty"`
SubUsage map[string]ai.Usage `json:"sub_usage"`
ModelUsage map[string]ai.Usage `json:"model_usage,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
TaskID string `json:"task_id"`
}
func (Meta) UsageSummary ¶ added in v0.103.0
func (m Meta) UsageSummary(msgs []ai.Message) ai.UsageSummary
type Page ¶ added in v0.103.0
type Page struct {
Sessions []Meta
Next *PageCursor
}
type PageCursor ¶ added in v0.103.0
func (PageCursor) Valid ¶ added in v0.103.0
func (c PageCursor) Valid() bool
type PageOptions ¶ added in v0.103.0
type PageOptions struct {
CWD *string
After *PageCursor
Limit int
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func OpenProjectHome ¶ added in v0.103.0
func (*Store) AddSchedule ¶
func (*Store) ClearMessages ¶
func (*Store) ClearSnapshots ¶
func (*Store) Compactions ¶
func (s *Store) Compactions(id string) []Compaction
func (*Store) LastExchange ¶
func (*Store) RecordCompaction ¶
func (*Store) SaveHistory ¶ added in v0.103.0
func (*Store) SaveHistoryWithUsage ¶ added in v0.103.0
func (*Store) SaveSubagentTranscript ¶
func (*Store) SessionsDir ¶ added in v0.103.0
func (*Store) SetArchived ¶ added in v0.103.0
func (*Store) SnapshotReferenced ¶ added in v0.103.0
func (*Store) SubagentTranscript ¶
func (*Store) TranscriptPath ¶ added in v0.103.0
func (*Store) TruncateHistory ¶ added in v0.103.0
func (*Store) UndoCompaction ¶ added in v0.103.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.