Documentation
¶
Index ¶
- type DB
- func (db *DB) AddMessage(sessionID string, message *pkg.Message) error
- func (db *DB) Close() error
- func (db *DB) CreateSession(session *pkg.Session) error
- func (db *DB) DeleteSession(id string) error
- func (db *DB) GetSession(id string) (*pkg.Session, error)
- func (db *DB) GetSessionMessages(sessionID string) ([]pkg.Message, error)
- func (db *DB) GetSetting(key string) (string, error)
- func (db *DB) GetWorkspaceMetadata(projectPath string) (*pkg.ProjectContext, error)
- func (db *DB) ListSessions(limit int) ([]*pkg.Session, error)
- func (db *DB) LogToolExecution(sessionID, messageID, toolName string, input map[string]interface{}, ...) error
- func (db *DB) SaveWorkspaceMetadata(ctx *pkg.ProjectContext) error
- func (db *DB) SetSetting(key, value string) error
- func (db *DB) UpdateSession(session *pkg.Session) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB represents the SQLite database connection
func (*DB) AddMessage ¶
AddMessage adds a message to a session
func (*DB) CreateSession ¶
CreateSession creates a new session
func (*DB) DeleteSession ¶
DeleteSession deletes a session and all related data
func (*DB) GetSession ¶
GetSession retrieves a session by ID
func (*DB) GetSessionMessages ¶
GetSessionMessages retrieves all messages for a session
func (*DB) GetSetting ¶
GetSetting retrieves a setting value
func (*DB) GetWorkspaceMetadata ¶
func (db *DB) GetWorkspaceMetadata(projectPath string) (*pkg.ProjectContext, error)
GetWorkspaceMetadata retrieves workspace analysis for a path
func (*DB) ListSessions ¶
ListSessions returns all sessions ordered by updated_at
func (*DB) LogToolExecution ¶
func (db *DB) LogToolExecution(sessionID, messageID, toolName string, input map[string]interface{}, output string, exitCode int, duration time.Duration) error
LogToolExecution records a tool execution for audit
func (*DB) SaveWorkspaceMetadata ¶
func (db *DB) SaveWorkspaceMetadata(ctx *pkg.ProjectContext) error
SaveWorkspaceMetadata saves or updates workspace analysis
func (*DB) SetSetting ¶
SetSetting saves a setting value
Click to show internal directories.
Click to hide internal directories.