(sessionID: string, messageID: string, partID: string, type: DeltaPartType)
| 168 | } |
| 169 | |
| 170 | function assistantMessage(sessionID: string, messageID: string, partID: string, type: DeltaPartType) { |
| 171 | return { |
| 172 | info: { |
| 173 | id: messageID, |
| 174 | sessionID, |
| 175 | role: "assistant", |
| 176 | time: { created: Date.now() }, |
| 177 | parentID: "msg_parent", |
| 178 | modelID: "model", |
| 179 | providerID: "provider", |
| 180 | mode: "build", |
| 181 | agent: "build", |
| 182 | path: { cwd: "/workspace", root: "/workspace" }, |
| 183 | cost: 0, |
| 184 | tokens: { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } }, |
| 185 | }, |
| 186 | parts: [ |
| 187 | type === "text" |
| 188 | ? { |
| 189 | id: partID, |
| 190 | sessionID, |
| 191 | messageID, |
| 192 | type: "text", |
| 193 | text: "", |
| 194 | } |
| 195 | : { |
| 196 | id: partID, |
| 197 | sessionID, |
| 198 | messageID, |
| 199 | type: "reasoning", |
| 200 | text: "", |
| 201 | time: { start: Date.now() }, |
| 202 | }, |
| 203 | ], |
| 204 | } satisfies SessionMessageResponse |
| 205 | } |
| 206 | |
| 207 | function assistantToolMessage(part: ToolPart) { |
| 208 | return { |
no outgoing calls
no test coverage detected