Skip to Content

StoredMessage

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

Extended by

Properties

chunks?

optional chunks: MessageChunk[]

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

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


content

content: string

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


conversationId

conversationId: string

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


createdAt

createdAt: Date

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


embeddingModel?

optional embeddingModel: string

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


error?

optional error: string

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

If set, indicates the message failed with this error


feedback?

optional feedback: MessageFeedback

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

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


fileIds?

optional fileIds: string[]

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

Array of media_id references for direct lookup in media table


files?

optional files: FileMetadata[]

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

Deprecated

Use fileIds with media table instead


imageModel?

optional imageModel: string

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

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


messageId

messageId: number

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


model?

optional model: string

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


parentMessageId?

optional parentMessageId: string

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

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


responseDuration?

optional responseDuration: number

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


role

role: ChatRole

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


sources?

optional sources: SearchSource[]

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


thinking?

optional thinking: string

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

Reasoning/thinking content from models that support extended thinking


thoughtProcess?

optional thoughtProcess: ActivityPhase[]

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


toolCallEvents?

optional toolCallEvents: LlmapiToolCallEvent[]

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

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


uniqueId

uniqueId: string

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


updatedAt

updatedAt: Date

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


usage?

optional usage: StoredChatCompletionUsage

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


vector?

optional vector: number[]

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


wasStopped?

optional wasStopped: boolean

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

Last updated on