| 1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. |
| 2 | import type { ContentBlock } from "./ContentBlock"; |
| 3 | import type { StreamStatus } from "./StreamStatus"; |
| 4 | import type { Usage } from "./Usage"; |
| 5 | import type { JsonValue } from "./serde_json/JsonValue"; |
| 6 | |
| 7 | /** |
| 8 | * One entry in the viewer timeline. Tagged on `kind` so the TypeScript |
| 9 | * side can discriminate exhaustively. |
| 10 | */ |
| 11 | export type Message = { "kind": "user", id: string, at: string, text: string, |
| 12 | /** |
| 13 | * `true` when this "user" event is actually a tool-result wrapper |
| 14 | * injected by the agent loop, not something the human typed. |
| 15 | */ |
| 16 | isMeta: boolean, } | { "kind": "assistant", id: string, at: string, model: string | null, blocks: Array<ContentBlock>, stopReason: string | null, usage: Usage | null, |
| 17 | /** |
| 18 | * v1 seam: when v1's chat pane streams a response into the same |
| 19 | * viewer, it sets `status: "streaming"` on the in-flight message. |
| 20 | * v0 never sets this. |
| 21 | */ |
| 22 | status?: StreamStatus, } | { "kind": "system", id: string, at: string, text: string, subtype: string | null, } | { "kind": "attachment", id: string, at: string, attachmentType: string, hookName: string | null, text: string, } | { "kind": "unknown", id: string, at: string | null, rawType: string, raw: JsonValue, }; |