UseChatOptions
Defined in: react/src/hooks.ts:20
Extends
Section titled “Extends”Properties
Section titled “Properties”allowSendWhileRunning?
Section titled “allowSendWhileRunning?”optional allowSendWhileRunning?: boolean;Defined in: react/src/client.ts:304
Permits overlapping ordinary sends and retries. Off by default. A host with enqueue
can accept steering input during a run without enabling this option.
Inherited from
Section titled “Inherited from”ChatClientOptions.allowSendWhileRunning
clientTools?
Section titled “clientTools?”optional clientTools?: Readonly<Record<string, ClientToolHandler>>;Defined in: react/src/client.ts:316
App-owned handlers with an explicit repeat-safety declaration or a durable host claim. All dispatch is manual. Disclosure or a browser key alone never authorizes a write.
Inherited from
Section titled “Inherited from”optional id?: string;Defined in: react/src/hooks.ts:24
Names the conversation and the person reading it. When it changes, the hook drops everything it holds and starts over, so nothing from the last conversation or account can show in this one, however late it arrives. Leave it out for a hook that only ever shows one.
initialCursor?
Section titled “initialCursor?”optional initialCursor?: Cursor;Defined in: react/src/client.ts:301
Where initialMessages stand in the host’s log: the segment and the last seq they
include. The first observation then resumes after it. Without it, the first observation asks
for the log from the start, which for a conversation with a past is its whole history. Read
once, when the client is made. The host still answers that observation with the run’s state,
as it does any other.
Inherited from
Section titled “Inherited from”ChatClientOptions.initialCursor
initialMessages?
Section titled “initialMessages?”optional initialMessages?: readonly DisplayMessage[];Defined in: react/src/client.ts:295
What to show before the host says anything, such as a transcript rendered on the server.
Inherited from
Section titled “Inherited from”ChatClientOptions.initialMessages
pendingSend?
Section titled “pendingSend?”optional pendingSend?: PendingSendOptions;Defined in: react/src/client.ts:313
Saves each message in the app’s storage before it goes out, and keeps it there while its
delivery is unknown. After a reload the message is back in the conversation as unconfirmed,
and retry sends it again with the same clientId, only when the person asks. One message
at a time: while one is unconfirmed, a new send is refused until the person sends it again or
removes it with discard, because two could not both be sent again safely. A send whose copy
cannot be saved is refused before it goes out. Off by default. Steering input (enqueue) is
not kept.
Inherited from
Section titled “Inherited from”reconnect?
Section titled “reconnect?”optional reconnect?: ReconnectOptions;Defined in: react/src/client.ts:305
Inherited from
Section titled “Inherited from”transport
Section titled “transport”transport: ChatTransport;Defined in: react/src/client.ts:293