hashbrown

UseCompletionResult

The result of the useCompletion hook.

UseCompletionResult
@typeState
error
Error | undefined

The error encountered during chat operations, if any.

exhaustedRetries
boolean

Whether the current request has exhausted retries.

generatingError
Error | undefined

Error emitted during generation events.

isGenerating
boolean

Whether the chat is currently generating.

isLoading
boolean

Aggregate loading flag across transport, generation, and tool calls.

isReceiving
boolean

Whether the chat is receiving a response.

isResuming
boolean

Whether the whole resumed interaction is executing.

isRunningToolCalls
boolean

Whether the chat is running tool calls.

isSending
boolean

Whether the chat is sending a response.

output
string | null

The output from the model.

pendingInterrupts
PendingInterruptBatch | undefined

The current interrupt batch, retained until resume is acknowledged.

reload
() => void

Reload the chat, useful for retrying when an error occurs.

sendingError
Error | undefined

Transport/request failure before generation events arrive.

state
State | undefined

The currently visible shared agent state.