A reference to the completion resource.
API
interface CompletionResourceRef extends Resource<string | null> {generatingError: Signal <
Error | undefined
>;isGenerating: Signal <boolean>;isLoading: Signal <boolean>;isReceiving: Signal <boolean>;isRunningToolCalls: Signal <boolean>;isSending: Signal <boolean>;reload: () => boolean;sendingError: Signal <
Error | undefined
>;stop: (clearStreamingMessage?: boolean) => void;}generatingError
Signal<Error | undefined>Error emitted during generation frames.
isGenerating
Signal<boolean>Indicates whether the chat is generating.
isLoading
Signal<boolean>Aggregate loading flag across transport, generation, and tool calls.
isReceiving
Signal<boolean>Indicates whether the chat is receiving tokens.
isRunningToolCalls
Signal<boolean>Indicates whether tool calls are running.
isSending
Signal<boolean>Indicates whether the chat is sending.
reload
() => booleanReloads the resource.
sendingError
Signal<Error | undefined>Transport/request error before generation frames arrive.
stop
(clearStreamingMessage?: boolean) => voidStops any currently-streaming message.