A reference to the UI chat resource.
API
interface UiChatResourceRef<Tools extends Chat.AnyTool> extends Resource<UiChatMessage<Tools>[]> {lastAssistantMessage: Signal <
UiAssistantMessage <Tools> | undefined
>;resendMessages: () => void;sendMessage: (message: Chat.UserMessage) => void;stop: (clearStreamingMessage?: boolean) => void;}UiChatResourceRef
@typeToolsChat.AnyToollastAssistantMessage
Signal<UiAssistantMessage<Tools> | undefined>The last assistant message for the UI chat resource.
resendMessages
() => voidCause current messages to be resent. Can be used after an error in chat.
sendMessage
(message: Chat.UserMessage) => voidSend a new user message to the chat.
stop
(clearStreamingMessage?: boolean) => voidStops any currently-streaming message.