Versions in this module Expand all Collapse all v0 v0.8.8 Jul 5, 2026 Changes in this version + func MoveMessages(ctx context.Context, targetSessionID int64) error v0.8.7 Jun 13, 2026 v0.8.6 Jun 11, 2026 v0.8.5 Jun 7, 2026 v0.8.4 Jun 5, 2026 Changes in this version + const MaxNoteContentLen + var GetCurrentSessionID = session.GetCurrentSessionID + func BuildNotePrompt(ctx context.Context) string + func FormatTime(t time.Time) string + func GetDefaultPromptTemplate(role string) string + func GetPromptPath(role string, global bool) (string, error) + func GetPromptSourceContent(name string, global bool) string + func GetPromptTemplate(ctx context.Context, role string) string + func GetSystemPrompt(ctx context.Context) string + func HandleNote(ctx context.Context, content string) (result, warning string, err error) + func HandleRecall(ctx context.Context, keywordsStr string, days, limit int) (result, warning string, err error) + func HandleRecent(ctx context.Context, limit int, startID int64) (result, warning string, err error) + func HandleShow(ctx context.Context, id int64) (result, warning string, err error) + func JudgeHistory(messages []*Message) + func RenderPromptForRole(ctx context.Context, role string) string + func ResolvePromptEditPath(name string) (string, error) + func ResolvePromptRemovePath(name string) (string, error) + func SaveMessages(ctx context.Context, msgs ...Message) error + func SaveNote(ctx context.Context, content string) error + func ToSQLNullString(tcs []ToolCall) (toolCalls sql.NullString) + func ToolCallsID(tcs []ToolCall) string + func Truncate(content string, maxLen int) string + func UpdateContent(ctx context.Context, id int64, content string) (err error) + func UpdateHistory(ctx context.Context, id int64) (err error) + func UpdateToolCalls(ctx context.Context, id int64, tcs []ToolCall) (err error) + type Message struct + Content string + CreatedAt time.Time + ID int64 + ModelID int64 + OK bool + ReasoningContent string + Role string + SessionID int64 + ToolCallID string + ToolCalls []ToolCall + func CleanupReverse(messages []Message) (cleaned []Message) + func ListHistory(ctx context.Context) ([]*Message, error) + func LoadHistory(ctx context.Context) ([]Message, error) + func LoadPrompts(ctx context.Context) ([]Message, error) + func RecentMessages(ctx context.Context, limit int, startID int64) ([]Message, error) + func ShowMessage(ctx context.Context, id int64) (message *Message, err error) + func (m *Message) GetTokens() int + func (m *Message) SetTokens(tokens int) + type Note struct + Content string + CreatedAt time.Time + ID int64 + SessionID int64 + func LoadNotes(ctx context.Context, days int) ([]Note, error) + type PromptInfo struct + Description string + Name string + Source string + func ListPrompts() []PromptInfo + type Result struct + Message Message + ProjectPath string + func SearchMessages(ctx context.Context, keywords []string, days, limit int) ([]Result, error) + type ToolCall struct + Function ToolCallFunction + ID string + Type string + type ToolCallFunction struct + Arguments string + Name string