Documentation
¶
Index ¶
- Variables
- func LegacySessionDBPath(sessionID, persistDir string) string
- func MessageContentAsSessionListTitle(s string) string
- func RemovePersistedSession(dir, sharedSQLiteFile, sessionID string) error
- func SanitizeSessionIDForFile(id string) string
- func StripHostRuntimeFromHistoryContent(role, content string) string
- func StripHostRuntimeUserInject(s string) string
- func TruncateSessionListTitle(s string) string
- type ChatHistoryEntry
- type PersistedSessionInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPersistedSessionNotFound = errors.New("persisted session not found")
)
Functions ¶
func LegacySessionDBPath ¶
func RemovePersistedSession ¶
Types ¶
type ChatHistoryEntry ¶
type ChatHistoryEntry struct {
Role string `json:"role"`
Content string `json:"content"`
ToolCalls string `json:"tool_calls,omitempty"`
}
func ReadPersistedChatHistory ¶
func ReadPersistedChatHistory(ctx context.Context, dir, sharedSQLiteFile, sessionID string) ([]ChatHistoryEntry, error)
type PersistedSessionInfo ¶
func ListPersistedSessions ¶
func ListPersistedSessions(dir, sharedSQLiteFile string) ([]PersistedSessionInfo, error)
Click to show internal directories.
Click to hide internal directories.