UseChatMessagesReturn
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:452
Properties
Section titled “Properties”appendMessage
Section titled “appendMessage”appendMessage: (
message) =>void
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:458
Append a new message to the end
Parameters
Section titled “Parameters”message
Section titled “message”Returns
Section titled “Returns”void
clearMessages
Section titled “clearMessages”clearMessages: () =>
void
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:472
Clear all messages
Returns
Section titled “Returns”void
getMessage
Section titled “getMessage”getMessage: (
id) =>ChatMessageData|undefined
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:474
Find a message by ID
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”ChatMessageData | undefined
messages
Section titled “messages”messages:
ChatMessageData[]
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:454
Current message array
removeMessage
Section titled “removeMessage”removeMessage: (
id) =>void
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:470
Remove a message by ID
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
setMessages
Section titled “setMessages”setMessages:
Dispatch<SetStateAction<ChatMessageData[]>>
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:456
Replace the entire message array
updateMessage
Section titled “updateMessage”updateMessage: (
id,update) =>void
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:463
Update a message by ID. Accepts a partial update or an updater function.
Parameters
Section titled “Parameters”string
update
Section titled “update”Partial<ChatMessageData> | ((prev) => Partial<ChatMessageData>)
Returns
Section titled “Returns”void