Skip to main content

Module storage

Module storage 

Source
Expand description

Session and message storage helpers.

Structs§

MessageData
Message data returned to frontends.
SessionInfo
Session metadata returned to frontends.
ToolCallInfoData
Tool call info for storage in message.

Functions§

delete_session
Soft-delete a session.
find_session_by_chat_id
Find an active session by its platform chat identifier.
get_messages
Get all messages for a session, ordered by creation time.
get_session
Get a single session by ID.
init_db
Initialize the database: create tables if needed, then run migrations.
insert_message
Insert a message into a session.
insert_session
Insert a new session.
list_sessions
List all active sessions, ordered by most recently updated.
resolve_db_path
Resolve the session database path for a working directory and storage scope.
touch_session
Update a session’s updated_at timestamp.
update_session_title
Update a session’s title.
update_tool_message
Update a tool message with output and status.