Documentation
¶
Index ¶
- func BootID() string
- func CopySession(sessionID string, newSessionID string) (string, string)
- func DeleteSession(sessionID string, yes bool)
- func Dir() string
- func GetSessionID(sessionOverride string) string
- func HashString(s string) string
- func IsAllowedNameChar(r rune) bool
- func IsValidSessionName(name string) bool
- func LookupDir() string
- func QuitSession(sessionOverride string)
- func RenameSession(sessionID string, newSessionID string)
- func SetSession(sessionId string)
- func StoreSession(state State)
- func StoredSessionExists(sessionID string) bool
- func TerminalId() string
- func TerminalSessionID() string
- type Header
- type HistoryEntry
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteSession ¶
func GetSessionID ¶
func HashString ¶
func IsAllowedNameChar ¶ added in v0.0.28
func IsValidSessionName ¶ added in v0.0.28
func QuitSession ¶
func QuitSession(sessionOverride string)
func RenameSession ¶
func SetSession ¶
func SetSession(sessionId string)
func StoreSession ¶
func StoreSession(state State)
func StoredSessionExists ¶
func TerminalId ¶
func TerminalId() string
func TerminalSessionID ¶
func TerminalSessionID() string
Types ¶
type Header ¶
type Header struct { SessionID string `json:"session_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` InputTokens int `json:"input_tokens"` OutputTokens int `json:"output_tokens"` InputTokensAccum int `json:"input_tokens_accum"` OutputTokensAccum int `json:"output_tokens_accum"` }
func ListSessions ¶
func ListSessions() []Header
type HistoryEntry ¶
type State ¶
type State struct { Header History []HistoryEntry `json:"history"` StateFile string `json:"-"` }
func LoadSession ¶
func NewSession ¶
func (*State) AddMessage ¶
func (*State) MessageHistory ¶ added in v0.0.22
Click to show internal directories.
Click to hide internal directories.