A reference to the UI completion resource.
API
interface UiCompletionResourceRef<Tools extends Chat.AnyTool, State = unknown> extends Resource<UiAssistantMessage<Tools> | null> {isReceiving: Signal <boolean>;readonly isResuming: Signal<boolean>;isSending: Signal <boolean>;readonly pendingInterrupts: Signal<PendingInterruptBatch | undefined>;reload: () => boolean;resume(options: ResumeOptions): void;setState(state: State): void;readonly state: Signal<State | undefined>;stop: (clearStreamingMessage?: boolean) => void;}UiCompletionResourceRef
@typeToolsChat.AnyTool@typeStateisReceiving
Signal<boolean>Indicates whether the underlying completion call is currently receiving data.
isResuming
Signal<boolean>Whether the whole resumed interaction is executing.
isSending
Signal<boolean>Indicates whether the underlying completion call is currently sending a request.
pendingInterrupts
Signal<PendingInterruptBatch | undefined>The current interrupt batch, retained until resume is acknowledged.
reload
() => booleanReloads the completion.
state
Signal<State | undefined>The currently visible shared agent state.
stop
(clearStreamingMessage?: boolean) => voidStops any currently streaming response.