hashbrown

UiChatResourceRef

A reference to the UI chat resource.

UiChatResourceRef
@typeTools
Chat.AnyTool
@typeState
isResuming
Signal<boolean>

Whether the resumed interaction is still running.

lastAssistantMessage
Signal<UiAssistantMessage<Tools> | undefined>

The last assistant message for the UI chat resource.

pendingInterrupts
Signal<PendingInterruptBatch | undefined>

The complete pending interrupt batch, including while claimed.

reload
() => boolean

Remove the last assistant response and resend the preceding history.

resendMessages
() => void

Cause current messages to be resent. Can be used after an error in chat.

sendMessage
(message: Chat.UserMessage) => void

Send a new user message to the chat.

setMessages
(messages: Chat.Message<s.Infer<UiChatMessageOutput>, Tools>[]) => void

Replace the current chat history.

state
Signal<State | undefined>

The currently visible shared agent state.

stop
(clearStreamingMessage?: boolean) => void

Stops any currently-streaming message.