1package soy.iko.opencode.data.model
3import kotlinx.serialization.SerialName
4import kotlinx.serialization.Serializable
5import kotlinx.serialization.json.JsonElement
6import kotlinx.serialization.json.JsonClassDiscriminator
9 * The state machine of a tool call, discriminated on `status`.
10 * pending -> running -> completed | error
12@OptIn(kotlinx.serialization.ExperimentalSerializationApi::class)
14@JsonClassDiscriminator("status")
15sealed interface ToolState
19data object ToolPending : ToolState
23data class ToolRunning(
24 val input: JsonElement? = null,
25 val title: String? = null,
26 val time: TimeInfo? = null,
30@SerialName("completed")
31data class ToolCompleted(
32 val input: JsonElement? = null,
33 val output: String? = null,
34 val title: String? = null,
35 val time: TimeInfo? = null,
41 val input: JsonElement? = null,
42 val error: String? = null,
43 val time: TimeInfo? = null,
46/** Fallback for an unrecognized `status`. */
48@SerialName("__unknown")
49data object ToolUnknown : ToolState
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list