(input: {
tool: string
state: ToolPart["state"]
phase?: StreamCommit["phase"]
toolState?: StreamCommit["toolState"]
text?: string
id?: string
messageID?: string
})
| 20 | } |
| 21 | |
| 22 | function toolCommit(input: { |
| 23 | tool: string |
| 24 | state: ToolPart["state"] |
| 25 | phase?: StreamCommit["phase"] |
| 26 | toolState?: StreamCommit["toolState"] |
| 27 | text?: string |
| 28 | id?: string |
| 29 | messageID?: string |
| 30 | }) { |
| 31 | return commit({ |
| 32 | kind: "tool", |
| 33 | text: input.text ?? "", |
| 34 | phase: input.phase ?? "final", |
| 35 | source: "tool", |
| 36 | tool: input.tool, |
| 37 | toolState: input.toolState ?? "completed", |
| 38 | part: toolPart(input.tool, input.state, input.id, input.messageID), |
| 39 | }) |
| 40 | } |
| 41 | |
| 42 | function structured(next: StreamCommit) { |
| 43 | const body = entryBody(next) |
no test coverage detected