admin

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPersistedSessionNotFound = errors.New("persisted session not found")
)

Functions

func LegacySessionDBPath

func LegacySessionDBPath(sessionID, persistDir string) string

func MessageContentAsSessionListTitle

func MessageContentAsSessionListTitle(s string) string

func RemovePersistedSession

func RemovePersistedSession(dir, sharedSQLiteFile, sessionID string) error

func SanitizeSessionIDForFile

func SanitizeSessionIDForFile(id string) string

func StripHostRuntimeFromHistoryContent

func StripHostRuntimeFromHistoryContent(role, content string) string

func StripHostRuntimeUserInject

func StripHostRuntimeUserInject(s string) string

func TruncateSessionListTitle

func TruncateSessionListTitle(s string) string

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

type PersistedSessionInfo struct {
	ID        string
	Title     string
	UpdatedAt time.Time
}

func ListPersistedSessions

func ListPersistedSessions(dir, sharedSQLiteFile string) ([]PersistedSessionInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL