StoredMessageWithSimilarity
Defined in: src/lib/db/chat/types.ts:361
Extends
Properties
anuma?
optionalanuma:AnumaTurn
Defined in: src/lib/db/chat/types.ts:301
Anuma 1:1 turn fields; only vault chat backends store them.
Inherited from
chunks?
optionalchunks:MessageChunk[]
Defined in: src/lib/db/chat/types.ts:282
Chunks of this message with individual embeddings for fine-grained search
Inherited from
content
content:
string
Defined in: src/lib/db/chat/types.ts:268
Inherited from
conversationId
conversationId:
string
Defined in: src/lib/db/chat/types.ts:266
Inherited from
createdAt
createdAt:
Date
Defined in: src/lib/db/chat/types.ts:277
Inherited from
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
Inherited from
StoredMessage.decryptionStatus
embeddingModel?
optionalembeddingModel:string
Defined in: src/lib/db/chat/types.ts:280
Inherited from
error?
optionalerror:string
Defined in: src/lib/db/chat/types.ts:288
If set, indicates the message failed with this error
Inherited from
feedback?
optionalfeedback:MessageFeedback
Defined in: src/lib/db/chat/types.ts:295
User feedback: ‘like’, ‘dislike’, or null for no feedback
Inherited from
fileIds?
optionalfileIds:string[]
Defined in: src/lib/db/chat/types.ts:275
Array of media_id references for direct lookup in media table
Inherited from
files?
optionalfiles:FileMetadata[]
Defined in: src/lib/db/chat/types.ts:273
Deprecated
Use fileIds with media table instead
Inherited from
imageModel?
optionalimageModel:string
Defined in: src/lib/db/chat/types.ts:271
Image generation model used for this message (e.g., “nano-banana-flash”)
Inherited from
messageId
messageId:
number
Defined in: src/lib/db/chat/types.ts:265
Inherited from
model?
optionalmodel:string
Defined in: src/lib/db/chat/types.ts:269
Inherited from
origin?
optionalorigin:MessageOrigin
Defined in: src/lib/db/chat/types.ts:299
Provenance for synthetic rows; undefined for typed messages and pre-v44 rows
Inherited from
parentMessageId?
optionalparentMessageId:string
Defined in: src/lib/db/chat/types.ts:293
Parent message ID for branching (edit/regenerate). Null for root messages.
Inherited from
responseDuration?
optionalresponseDuration:number
Defined in: src/lib/db/chat/types.ts:285
Inherited from
StoredMessage.responseDuration
role
role:
ChatRole
Defined in: src/lib/db/chat/types.ts:267
Inherited from
similarity
similarity:
number
Defined in: src/lib/db/chat/types.ts:362
sources?
optionalsources:SearchSource[]
Defined in: src/lib/db/chat/types.ts:284
Inherited from
thinking?
optionalthinking:string
Defined in: src/lib/db/chat/types.ts:291
Reasoning/thinking content from models that support extended thinking
Inherited from
thoughtProcess?
optionalthoughtProcess:ActivityPhase[]
Defined in: src/lib/db/chat/types.ts:289
Inherited from
toolCallEvents?
optionaltoolCallEvents:LlmapiToolCallEvent[]
Defined in: src/lib/db/chat/types.ts:297
Tool call events from the backend response (for reconstructing tool call history)
Inherited from
uniqueId
uniqueId:
string
Defined in: src/lib/db/chat/types.ts:264
Inherited from
updatedAt
updatedAt:
Date
Defined in: src/lib/db/chat/types.ts:278
Inherited from
usage?
optionalusage:StoredChatCompletionUsage
Defined in: src/lib/db/chat/types.ts:283
Inherited from
vaultAttachments?
optionalvaultAttachments:VaultAttachmentRef[]
Defined in: src/lib/db/chat/types.ts:276
Inherited from
StoredMessage.vaultAttachments
vector?
optionalvector:number[]
Defined in: src/lib/db/chat/types.ts:279
Inherited from
wasStopped?
optionalwasStopped:boolean
Defined in: src/lib/db/chat/types.ts:286
Inherited from