Documentation
¶
Index ¶
Constants ¶
View Source
const (
// MaxTitleLength is the maximum length for a session title
MaxTitleLength = 60
)
View Source
const (
// SessionRetentionDays is how long sessions are kept before cleanup
SessionRetentionDays = 30
)
Variables ¶
This section is empty.
Functions ¶
func GenerateTitle ¶
func GenerateTitle(messages []StoredMessage) string
GenerateTitle generates a title from the first user message
Types ¶
type Session ¶
type Session struct {
Metadata SessionMetadata `json:"metadata"`
Messages []StoredMessage `json:"messages"`
}
Session represents a complete session with metadata and messages
type SessionMetadata ¶
type SessionMetadata struct {
ID string `json:"id"`
Title string `json:"title"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Provider string `json:"provider"`
Model string `json:"model"`
Cwd string `json:"cwd"`
MessageCount int `json:"messageCount"`
}
SessionMetadata contains metadata about a session
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages session file storage
func (*Store) List ¶
func (s *Store) List() ([]*SessionMetadata, error)
List returns all sessions sorted by update time (newest first)
type StoredMessage ¶
type StoredMessage struct {
Role string `json:"role"`
Content string `json:"content,omitempty"`
ToolCalls []provider.ToolCall `json:"toolCalls,omitempty"`
ToolResult *provider.ToolResult `json:"toolResult,omitempty"`
ToolName string `json:"toolName,omitempty"`
IsSummary bool `json:"isSummary,omitempty"`
}
StoredMessage represents a message stored in a session
Click to show internal directories.
Click to hide internal directories.