Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages sessions, keyed by "channel:chat_id".
func NewManager ¶
NewManager creates a new session manager.
type Session ¶
type Session struct {
Messages []provider.Message
LastConsolidated int // index of last consolidated message
// contains filtered or unexported fields
}
Session holds the message history for a channel:chat_id pair.
func (*Session) GetMessages ¶
GetMessages returns a copy of all messages.
func (*Session) MarkConsolidated ¶
MarkConsolidated updates the consolidation pointer.
func (*Session) ReplaceMessages ¶
ReplaceMessages replaces all session messages with the given list. This is used after context compaction to trim the session.
func (*Session) UnconsolidatedCount ¶
UnconsolidatedCount returns the number of messages since last consolidation.
Click to show internal directories.
Click to hide internal directories.