(questionState: QuestionRunState, step: string, error: unknown)
| 417 | } |
| 418 | |
| 419 | function updateErrorState(questionState: QuestionRunState, step: string, error: unknown): void { |
| 420 | const typed = asError(error); |
| 421 | questionState.status = "error"; |
| 422 | questionState.updatedAt = nowIso(); |
| 423 | questionState.lastError = { |
| 424 | message: typed.message, |
| 425 | stack: typed.stack, |
| 426 | step, |
| 427 | at: questionState.updatedAt, |
| 428 | }; |
| 429 | } |
| 430 | |
| 431 | function addOpenCodeUsage(questionState: QuestionRunState, usage: TokenUsageStats, actualCostUsd: number, config: RunnerConfig): void { |
| 432 | questionState.openCodeUsage = addTokenUsage(questionState.openCodeUsage, usage); |
no test coverage detected