Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultDir() (string, error)
- func TitleFromMessages(messages []llm.Message) string
- func TitleFromText(text string) string
- type Metadata
- type SearchResult
- type SearchWarning
- type Session
- type Store
- func (s *Store) Create(ctx context.Context, meta Metadata) (*Session, error)
- func (s *Store) Delete(ctx context.Context, id string) error
- func (s *Store) Dir() string
- func (s *Store) FindByExternal(ctx context.Context, source, external string) (*Session, error)
- func (s *Store) List(_ context.Context) ([]Metadata, error)
- func (s *Store) Load(_ context.Context, id string) (*Session, error)
- func (s *Store) Save(_ context.Context, sess *Session) error
- func (s *Store) Search(ctx context.Context, query string) ([]SearchResult, []SearchWarning, error)
Constants ¶
View Source
const (
DefaultSource = "tui"
)
Variables ¶
View Source
var ErrNotFound = errors.New("session not found")
Functions ¶
func DefaultDir ¶
func TitleFromMessages ¶
func TitleFromText ¶
Types ¶
type Metadata ¶
type Metadata struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Source string `json:"source"`
External string `json:"external,omitempty"`
CWD string `json:"cwd"`
Model string `json:"model"`
// Provider records which LLM backend produced this transcript. Transcripts
// can carry provider-specific blocks, so resume logic uses this to decide
// whether the saved model still applies.
Provider string `json:"provider,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type SearchResult ¶
type SearchWarning ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists sessions as one JSON file each plus an index.json summary. Index mutations are read-modify-write with an atomic rename and no cross-process lock — like the auth store, this assumes a single interactive CLI per sessions directory; concurrent neo processes can lose index updates (session files themselves are never affected).
func DefaultStore ¶
func (*Store) FindByExternal ¶
func (*Store) Search ¶
func (s *Store) Search(ctx context.Context, query string) ([]SearchResult, []SearchWarning, error)
Click to show internal directories.
Click to hide internal directories.