fix(codex): read native tool duration safely · openclaw/openclaw@13b3649
keshavbotage
·
2026-05-10
·
via Recent Commits to openclaw:main
File tree
extensions/codex/src/app-server
| Original file line number | Diff line number | Diff line change |
|---|
@@ -812,9 +812,10 @@ export class CodexAppServerEventProjector {
|
812 | 812 | |
813 | 813 | const startedAt = this.diagnosticToolStartedAtByItem.get(params.item.id); |
814 | 814 | this.diagnosticToolStartedAtByItem.delete(params.item.id); |
| 815 | +const itemDurationMs = |
| 816 | +typeof params.item.durationMs === "number" ? params.item.durationMs : undefined; |
815 | 817 | const durationMs = |
816 | | -readNumber(params.item, "durationMs") ?? |
817 | | -(startedAt === undefined ? 0 : Math.max(0, Date.now() - startedAt)); |
| 818 | +itemDurationMs ?? (startedAt === undefined ? 0 : Math.max(0, Date.now() - startedAt)); |
818 | 819 | if (params.status === "blocked") { |
819 | 820 | emitTrustedDiagnosticEvent({ |
820 | 821 | type: "tool.execution.blocked", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。