| 205 | } |
| 206 | |
| 207 | function assistantToolMessage(part: ToolPart) { |
| 208 | return { |
| 209 | info: { |
| 210 | id: part.messageID, |
| 211 | sessionID: part.sessionID, |
| 212 | role: "assistant", |
| 213 | time: { created: Date.now() }, |
| 214 | parentID: "msg_parent", |
| 215 | modelID: "model", |
| 216 | providerID: "provider", |
| 217 | mode: "build", |
| 218 | agent: "build", |
| 219 | path: { cwd: "/workspace", root: "/workspace" }, |
| 220 | cost: 0, |
| 221 | tokens: { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } }, |
| 222 | }, |
| 223 | parts: [part], |
| 224 | } satisfies SessionMessageResponse |
| 225 | } |
| 226 | |
| 227 | function runningTool( |
| 228 | sessionID: string, |