RunState

sealed interface RunState

Where the current run has got to.

Inheritors

Types

Link copied to clipboard
data class Failed(val message: String, val code: String? = null) : RunState

The run failed. RUN_ERROR carries no thread or run id, so neither does this.

Link copied to clipboard
data class Finished(val threadId: String, val runId: String, val result: JsonElement? = null, val interrupts: List<UiInterrupt> = emptyList()) : RunState

The run finished.

Link copied to clipboard
data object Idle : RunState

No run has started yet. A run that ends stays Finished or Failed; it never returns here.

Link copied to clipboard
data class Running(val threadId: String, val runId: String) : RunState

A run is in flight.

Properties

Link copied to clipboard

What the thread is waiting on: the interrupts of a RunState.Finished that stopped to ask, and nothing for any other state. A renderer that draws the questions asks this rather than casting.