Documentation
¶
Overview ¶
Package journal provides per-session memory of key actions extracted from assistant responses, enabling context recall when users ask about earlier work.
Index ¶
- type Config
- type Entry
- type SessionJournal
- func (sj *SessionJournal) Clear(sessionID string)
- func (sj *SessionJournal) ClearAll()
- func (sj *SessionJournal) ExtractEvents(content string) []string
- func (sj *SessionJournal) Format(sessionID string) string
- func (sj *SessionJournal) GetEntries(sessionID string) []Entry
- func (sj *SessionJournal) GetStats() Stats
- func (sj *SessionJournal) NeedsContext(lastUserMessage string) bool
- func (sj *SessionJournal) Record(sessionID string, events []string, model string)
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config controls journal behavior.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with sensible defaults.
type SessionJournal ¶
type SessionJournal struct {
// contains filtered or unexported fields
}
SessionJournal stores per-session action journals.
func (*SessionJournal) Clear ¶
func (sj *SessionJournal) Clear(sessionID string)
Clear removes the journal for a specific session.
func (*SessionJournal) ClearAll ¶
func (sj *SessionJournal) ClearAll()
ClearAll removes all journals.
func (*SessionJournal) ExtractEvents ¶
func (sj *SessionJournal) ExtractEvents(content string) []string
ExtractEvents scans assistant response content for action patterns.
func (*SessionJournal) Format ¶
func (sj *SessionJournal) Format(sessionID string) string
Format renders the session journal as a block for system message injection.
func (*SessionJournal) GetEntries ¶
func (sj *SessionJournal) GetEntries(sessionID string) []Entry
GetEntries returns raw journal entries for a session.
func (*SessionJournal) GetStats ¶
func (sj *SessionJournal) GetStats() Stats
GetStats returns aggregate statistics about the journal store.
func (*SessionJournal) NeedsContext ¶
func (sj *SessionJournal) NeedsContext(lastUserMessage string) bool
NeedsContext returns true if the user message triggers session history recall.