appendMessage
constappendMessage: (message,files,session?) =>Promise<number> =sqliteRepo.appendMessage
Defined in: src/lib/repositories/chat-history.ts:37
Atomically append a message, its files, and the session’s active-leaf pointer. A live session snapshot may be supplied to repair a missing session row — originally for rows lost to a stale or competing per-page database, which a single owner no longer produces. The repair stays because the caller can still reach here with a session the database has not seen: a UI that optimistically created one, or a restore that landed between the two writes.
Parameters
Section titled “Parameters”message
Section titled “message”Omit<StoredMessage, "id">
files?
Section titled “files?”FileAttachment & object[] = []
session?
Section titled “session?”ChatSession
Returns
Section titled “Returns”Promise<number>