- Split app.go (2091→1378 lines) into rendering.go, events.go, init.go - Add EventRouting stream event for router arm transparency - Add session auto-naming from first user message - Add context window progress bar in status bar - Add /keys cheatsheet, /replay for resumed sessions - Add inline cost-per-turn after assistant responses - Add diff previews in fs.write/fs.edit permission prompts - Collapse tool output to 3 lines by default (ctrl+o expands) - Use AddPrefix for system context instead of InjectMessage - Handle ContentThinking and ContentToolResult in session resume - Show session title in resume picker - Add /model numeric selection snapshot safety
28 lines
886 B
Go
28 lines
886 B
Go
package session
|
|
|
|
import (
|
|
"time"
|
|
|
|
"somegit.dev/Owlibou/gnoma/internal/message"
|
|
)
|
|
|
|
// Metadata holds session summary information persisted alongside messages.
|
|
type Metadata struct {
|
|
ID string `json:"id"`
|
|
Title string `json:"title,omitempty"` // auto-set from first user message
|
|
Provider string `json:"provider"`
|
|
Model string `json:"model"`
|
|
TurnCount int `json:"turn_count"`
|
|
Usage message.Usage `json:"usage"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
MessageCount int `json:"message_count"`
|
|
}
|
|
|
|
// Snapshot is a complete serialisable representation of a session at a point in time.
|
|
type Snapshot struct {
|
|
ID string `json:"id"`
|
|
Metadata Metadata `json:"metadata"`
|
|
Messages []message.Message `json:"messages"`
|
|
}
|