fix(subagents): correct duration display showing 5-6x inflated runtime (#57739)

Merged via squash.

Prepared head SHA: 018bbbca4d
Co-authored-by: samzong <13782141+samzong@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
This commit is contained in:
samzong
2026-03-30 23:44:36 +08:00
committed by GitHub
parent f011d0be28
commit 09bb93c6e0
5 changed files with 8 additions and 22 deletions

View File

@@ -345,7 +345,7 @@ export function buildSubagentList(params: {
}),
),
);
const runtime = formatDurationCompact(runtimeMs);
const runtime = formatDurationCompact(runtimeMs) ?? "n/a";
const label = truncateLine(resolveSubagentLabel(entry), 48);
const task = truncateLine(entry.task.trim(), params.taskMaxChars ?? 72);
const line = `${index}. ${label} (${resolveModelDisplay(sessionEntry, entry.model)}, ${runtime}${usageText ? `, ${usageText}` : ""}) ${status}${task.toLowerCase() !== label.toLowerCase() ? ` - ${task}` : ""}`;