(taskId: string)
| 335 | } |
| 336 | |
| 337 | const findCompletionText = (taskId: string) => |
| 338 | messages[taskId] |
| 339 | ?.filter( |
| 340 | (message) => |
| 341 | message.type === "say" && (message.say === "completion_result" || message.say === "text"), |
| 342 | ) |
| 343 | .map((message) => message.text?.trim()) |
| 344 | .find((text): text is string => !!text) |
| 345 | |
| 346 | const findErrorText = (taskId: string) => |
| 347 | messages[taskId] |