fix(serializer): validate required fields for blocks without tools (#3137)

This commit is contained in:
Waleed
2026-02-04 16:47:18 -08:00
committed by GitHub
parent fce566cc2f
commit 36ec68d93e
4 changed files with 231 additions and 58 deletions

View File

@@ -185,6 +185,10 @@ export function formatDuration(
const precision = options?.precision ?? 0
if (ms < 1) {
// Zero or near-zero: show "0ms" instead of "0.00ms"
if (ms === 0 || ms < 0.005) {
return '0ms'
}
// Sub-millisecond: show with 2 decimal places
return `${ms.toFixed(2)}ms`
}