Skip to content
providerkit
GitHub

ConversationData

Defined in: react/src/ui/context.tsx:26

A hook result or the same values from the host’s own state owner. No client or store.

  • Partial<Omit<ChatState, "messages" | "run">>
optional canReconnect?: boolean;

Defined in: react/src/client.ts:267

The connection is lost and the transport can observe, so reconnect can work.

ChatState.canReconnect


optional canRetry?: boolean;

Defined in: react/src/client.ts:262

retry can send a message whose delivery is unknown now. False while a run is going (unless allowSendWhileRunning), even when steering keeps canSend true: sending it again into a running one could ask for the same work twice. Also false until the host has said where its run stands since the delivery became unknown, because the message may have started a run nobody reported yet. Show Retry on a message only when this is true and messageErrors has it.

ChatState.canRetry


optional canSend?: boolean;

Defined in: react/src/client.ts:255

ChatState.canSend


optional canStop?: boolean;

Defined in: react/src/client.ts:265

A stop can reach the run: the transport has stop, or the client can abort its pending command or reply stream, or keep a message whose copy is still being saved from going out.

ChatState.canStop


optional connection?: ConnectionStatus;

Defined in: react/src/client.ts:244

ChatState.connection


optional error?: DisplayError;

Defined in: react/src/client.ts:247

What went wrong that is not about one message or one request: the connection, or a stop that did not go through.

ChatState.error


optional inputs?: readonly InputView[];

Defined in: react/src/client.ts:251

User input delivery, never completed assistant output.

ChatState.inputs


optional messageErrors?: Readonly<Record<string, DisplayError>>;

Defined in: react/src/client.ts:254

By message id: why a message this client sent shows as failed. unconfirmed means it may not have arrived, and retry sends it again.

ChatState.messageErrors


messages: readonly DisplayMessage[];

Defined in: react/src/ui/context.tsx:29


optional recallInput?: (inputId) => Promise<CommandResult>;

Defined in: react/src/ui/context.tsx:34

Manual recall through a host that can fence the race with input acceptance.

Parameter Type
inputId string

Promise<CommandResult>


optional reconnect?: () => void | Promise<void>;

Defined in: react/src/ui/context.tsx:35

void | Promise<void>


optional requests?: readonly RequestView[];

Defined in: react/src/client.ts:249

Every request that is waiting, in reading order.

ChatState.requests


optional respond?: RespondToRequest;

Defined in: react/src/ui/context.tsx:32


optional run?: RunInfo;

Defined in: react/src/ui/context.tsx:30


optional scopeKey?: string;

Defined in: react/src/ui/context.tsx:28

Change with the authenticated principal or conversation, even when message ids repeat.


optional startClientTool?: (requestId) => Promise<RespondResult>;

Defined in: react/src/ui/context.tsx:33

Explicit user action only. Never wire this to an effect or a replay listener. After a result delivery failure, this resubmits the saved result, never reruns the handler.

Parameter Type
requestId string

Promise<RespondResult>


optional status?: ChatStatus;

Defined in: react/src/client.ts:243

ChatState.status


optional stop?: () =>
| void
| CommandResult
| Promise<void | CommandResult>;

Defined in: react/src/ui/context.tsx:31

| void | CommandResult | Promise<void | CommandResult>