fix(tui): keep retry attempt before message (#30275)

This commit is contained in:
Kit Langton
2026-06-01 17:41:21 -04:00
committed by GitHub
parent 6072a68d6b
commit 57d602d07a
2 changed files with 12 additions and 1 deletions

View File

@@ -2228,7 +2228,7 @@ function Task(props: ToolProps<typeof TaskTool>) {
const retrying = retry()
if (isRunning() && retrying) {
content.push(`${Locale.truncate(retrying.message, 80)} [retrying attempt #${retrying.attempt}]`)
content.push(`${formatSubagentRetry(retrying.attempt, Locale.truncate(retrying.message, 80))}`)
} else if (isRunning() && tools().length > 0) {
if (current()) {
const state = current()!.state
@@ -2274,6 +2274,10 @@ export function formatSubagentTitle(agent: string, description: string, backgrou
return `${agent} Task${background ? " (background)" : ""}${description}`
}
export function formatSubagentRetry(attempt: number, message: string) {
return `Retrying (attempt ${attempt}) · ${message}`
}
export function formatCompletedSubagentDetail(toolcalls: number, duration: string) {
if (toolcalls === 0) return duration
return `${formatSubagentToolcalls(toolcalls)} · ${duration}`