Skip to content
providerkit
GitHub

AgentRunValue

Defined in: react/src/hooks.ts:43

The same state without what belongs to sending: a panel that watches a run never writes in it.

  • Omit<ChatState, "canSend" | "canRetry" | "messageErrors">
canReconnect: boolean;

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

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

ChatState.canReconnect


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


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


inputs: readonly InputView[];

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

User input delivery, never completed assistant output.

ChatState.inputs


messages: readonly DisplayMessage[];

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

The host’s messages and this client’s own, in order. A message this client sent shows as sending while its call is out, settled once the host took it, and failed when that is unknown (see messageErrors), until the host’s own copy takes its place.

ChatState.messages


reconnect: () => void;

Defined in: react/src/hooks.ts:47

Opens a fresh observation, with a full budget of tries, after the connection was lost.

void


requests: readonly RequestView[];

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

Every request that is waiting, in reading order.

ChatState.requests


respond: Respond;

Defined in: react/src/hooks.ts:46


run: RunInfo;

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

ChatState.run


optional scopeKey?: string;

Defined in: react/src/hooks.ts:44


status: ChatStatus;

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

ChatState.status


stop: () => Promise<CommandResult>;

Defined in: react/src/hooks.ts:45

Asks the host to stop the run, then waits for it to say so, with the observation still open. Without transport.stop, closes the stream the run lives in and marks it stopped here.

Promise<CommandResult>