API reference: @salmonui/chat/conversation
ConversationMessageinterface
import type { ConversationMessage } from '@salmonui/chat/conversation';interface ConversationMessage {
readonly id: string;
readonly author: string;
readonly text: string;
readonly createdAt?: Date | string | number;
readonly status?: ConversationMessageStatus;
readonly replyTo?: string;
readonly replyPreview?: ConversationReplyPreview;
readonly pinned?: boolean;
readonly forwarded?: boolean;
readonly mentions?: readonly string[];
readonly attachments?: readonly ConversationAttachment[];
readonly parts?: readonly ConversationResponsePart[];
readonly alternatives?: readonly string[];
readonly feedback?: 'positive' | 'negative';
}
| Name | Signature | Description |
|---|---|---|
id | readonly id: string; | Stable id: the list key and the store key. |
author | readonly author: string; | User id of the author. |
text | readonly text: string; | |
createdAtoptional | readonly createdAt?: Date | string | number; | |
statusoptional | readonly status?: ConversationMessageStatus; | |
replyTooptional | readonly replyTo?: string; | Id of the message this one replies to. |
replyPreviewoptional | readonly replyPreview?: ConversationReplyPreview; | Preview of the reply target when it is not in |
pinnedoptional | readonly pinned?: boolean; | |
forwardedoptional | readonly forwarded?: boolean; | |
mentionsoptional | readonly mentions?: readonly string[]; | User ids mentioned in |
attachmentsoptional | readonly attachments?: readonly ConversationAttachment[]; | |
partsoptional | readonly parts?: readonly ConversationResponsePart[]; | Assistant responses: reasoning and tool parts, in arrival order. |
alternativesoptional | readonly alternatives?: readonly string[]; | Assistant responses: earlier responses to the same prompt, oldest first; |
feedbackoptional | readonly feedback?: 'positive' | 'negative'; | Assistant responses: the user's rating. |