MessageRuntime
useMessage
Retrieve the message object:
MessageState
message:
The current message.
parentId:
The parent message id.
branches:
The branches for the message.
isLast:
Whether the message is the last in the thread.
useMessageUtils
Provides utility functions for a message (e.g., copy status):
MessageUtilsState
isCopied:
Whether the message is copied.
setIsCopied:
A function to set the is copied.
isHovering:
Whether the message is being hovered.
setIsHovering:
A function to set the is hovering.
isSpeaking:
Whether the message is currently being spoken.
stopSpeaking:
A function to stop the message from being spoken.
addUtterance:
A function to add a speech utterance.
useEditComposer
Access the edit composer state (used when editing a message):
EditComposerState
text:
The current text of the composer.
setText:
A function to set the text of the composer.
attachments:
The current attachments of the composer.
addAttachment:
A function to add an attachment to the composer.
removeAttachment:
A function to remove an attachment from the composer.
reset:
A function to reset the composer.
canCancel:
Whether the composer can be canceled.
isEditing:
Whether the composer is in edit mode.
edit:
A function to enter edit mode.
send:
A function to send the message.
cancel:
A function to exit the edit mode.