Skip to Content

StoredMessage

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

Extended by

Properties

chunks?

optional chunks: MessageChunk[]

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

Chunks of this message with individual embeddings for fine-grained search


content

content: string

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


conversationId

conversationId: string

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


createdAt

createdAt: Date

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


embeddingModel?

optional embeddingModel: string

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


error?

optional error: string

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

If set, indicates the message failed with this error


feedback?

optional feedback: MessageFeedback

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

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


fileIds?

optional fileIds: string[]

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

Array of media_id references for direct lookup in media table


files?

optional files: FileMetadata[]

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

Deprecated

Use fileIds with media table instead


imageModel?

optional imageModel: string

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

Image generation model used for this message (e.g., “nano-banana-flash”)


messageId

messageId: number

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


model?

optional model: string

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


parentMessageId?

optional parentMessageId: string

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

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


responseDuration?

optional responseDuration: number

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


role

role: ChatRole

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


sources?

optional sources: SearchSource[]

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


thinking?

optional thinking: string

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

Reasoning/thinking content from models that support extended thinking


thoughtProcess?

optional thoughtProcess: ActivityPhase[]

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


toolCallEvents?

optional toolCallEvents: LlmapiToolCallEvent[]

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

Tool call events from the backend response (for reconstructing tool call history)


uniqueId

uniqueId: string

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


updatedAt

updatedAt: Date

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


usage?

optional usage: StoredChatCompletionUsage

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


vector?

optional vector: number[]

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


wasStopped?

optional wasStopped: boolean

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

Last updated on