Skip to Content

StoredMessage

Defined in: src/lib/db/chat/types.ts:263 

Extended by

Properties

anuma?

optional anuma: AnumaTurn

Defined in: src/lib/db/chat/types.ts:301 

Anuma 1:1 turn fields; only vault chat backends store them.


chunks?

optional chunks: 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?

optional decryptionStatus: "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’s enc:vN: version in the store
  • auth_mismatch: a key was present but AES-GCM auth failed (wrong key)
  • invalid_payload: malformed ciphertext envelope

embeddingModel?

optional embeddingModel: string

Defined in: src/lib/db/chat/types.ts:280 


error?

optional error: string

Defined in: src/lib/db/chat/types.ts:288 

If set, indicates the message failed with this error


feedback?

optional feedback: MessageFeedback

Defined in: src/lib/db/chat/types.ts:295 

User feedback: ‘like’, ‘dislike’, or null for no feedback


fileIds?

optional fileIds: string[]

Defined in: src/lib/db/chat/types.ts:275 

Array of media_id references for direct lookup in media table


files?

optional files: FileMetadata[]

Defined in: src/lib/db/chat/types.ts:273 

Deprecated

Use fileIds with media table instead


imageModel?

optional imageModel: 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?

optional model: string

Defined in: src/lib/db/chat/types.ts:269 


origin?

optional origin: MessageOrigin

Defined in: src/lib/db/chat/types.ts:299 

Provenance for synthetic rows; undefined for typed messages and pre-v44 rows


parentMessageId?

optional parentMessageId: string

Defined in: src/lib/db/chat/types.ts:293 

Parent message ID for branching (edit/regenerate). Null for root messages.


responseDuration?

optional responseDuration: number

Defined in: src/lib/db/chat/types.ts:285 


role

role: ChatRole

Defined in: src/lib/db/chat/types.ts:267 


sources?

optional sources: SearchSource[]

Defined in: src/lib/db/chat/types.ts:284 


thinking?

optional thinking: string

Defined in: src/lib/db/chat/types.ts:291 

Reasoning/thinking content from models that support extended thinking


thoughtProcess?

optional thoughtProcess: ActivityPhase[]

Defined in: src/lib/db/chat/types.ts:289 


toolCallEvents?

optional toolCallEvents: 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?

optional usage: StoredChatCompletionUsage

Defined in: src/lib/db/chat/types.ts:283 


vaultAttachments?

optional vaultAttachments: VaultAttachmentRef[]

Defined in: src/lib/db/chat/types.ts:276 


vector?

optional vector: number[]

Defined in: src/lib/db/chat/types.ts:279 


wasStopped?

optional wasStopped: boolean

Defined in: src/lib/db/chat/types.ts:286 

Last updated on