StoredMessage
Defined in: src/lib/db/chat/types.ts:263
Extended by
Properties
anuma?
optionalanuma:AnumaTurn
Defined in: src/lib/db/chat/types.ts:301
Anuma 1:1 turn fields; only vault chat backends store them.
chunks?
optionalchunks:MessageChunk[]
Defined in: src/lib/db/chat/types.ts:282
Chunks of this message with individual embeddings for fine-grained search
content
content:
string
Defined in: src/lib/db/chat/types.ts:268
conversationId
conversationId:
string
Defined in: src/lib/db/chat/types.ts:266
createdAt
createdAt:
Date
Defined in: src/lib/db/chat/types.ts:277
decryptionStatus?
optionaldecryptionStatus:"key_missing"|"auth_mismatch"|"invalid_payload"
Defined in: src/lib/db/chat/types.ts:310
Set when content could not be decrypted on read (#561).
The content field still holds the original ciphertext — never a
[Decryption Failed] placeholder — so a later unlock can recover.
key_missing: no key for this field’senc:vN:version in the storeauth_mismatch: a key was present but AES-GCM auth failed (wrong key)invalid_payload: malformed ciphertext envelope
embeddingModel?
optionalembeddingModel:string
Defined in: src/lib/db/chat/types.ts:280
error?
optionalerror:string
Defined in: src/lib/db/chat/types.ts:288
If set, indicates the message failed with this error
feedback?
optionalfeedback:MessageFeedback
Defined in: src/lib/db/chat/types.ts:295
User feedback: ‘like’, ‘dislike’, or null for no feedback
fileIds?
optionalfileIds:string[]
Defined in: src/lib/db/chat/types.ts:275
Array of media_id references for direct lookup in media table
files?
optionalfiles:FileMetadata[]
Defined in: src/lib/db/chat/types.ts:273
Deprecated
Use fileIds with media table instead
imageModel?
optionalimageModel:string
Defined in: src/lib/db/chat/types.ts:271
Image generation model used for this message (e.g., “nano-banana-flash”)
messageId
messageId:
number
Defined in: src/lib/db/chat/types.ts:265
model?
optionalmodel:string
Defined in: src/lib/db/chat/types.ts:269
origin?
optionalorigin:MessageOrigin
Defined in: src/lib/db/chat/types.ts:299
Provenance for synthetic rows; undefined for typed messages and pre-v44 rows
parentMessageId?
optionalparentMessageId:string
Defined in: src/lib/db/chat/types.ts:293
Parent message ID for branching (edit/regenerate). Null for root messages.
responseDuration?
optionalresponseDuration:number
Defined in: src/lib/db/chat/types.ts:285
role
role:
ChatRole
Defined in: src/lib/db/chat/types.ts:267
sources?
optionalsources:SearchSource[]
Defined in: src/lib/db/chat/types.ts:284
thinking?
optionalthinking:string
Defined in: src/lib/db/chat/types.ts:291
Reasoning/thinking content from models that support extended thinking
thoughtProcess?
optionalthoughtProcess:ActivityPhase[]
Defined in: src/lib/db/chat/types.ts:289
toolCallEvents?
optionaltoolCallEvents:LlmapiToolCallEvent[]
Defined in: src/lib/db/chat/types.ts:297
Tool call events from the backend response (for reconstructing tool call history)
uniqueId
uniqueId:
string
Defined in: src/lib/db/chat/types.ts:264
updatedAt
updatedAt:
Date
Defined in: src/lib/db/chat/types.ts:278
usage?
optionalusage:StoredChatCompletionUsage
Defined in: src/lib/db/chat/types.ts:283
vaultAttachments?
optionalvaultAttachments:VaultAttachmentRef[]
Defined in: src/lib/db/chat/types.ts:276
vector?
optionalvector:number[]
Defined in: src/lib/db/chat/types.ts:279
wasStopped?
optionalwasStopped:boolean
Defined in: src/lib/db/chat/types.ts:286