From 5112af6741d9931929281fbe8a2f6ba667c4ebc9 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Mon, 23 Mar 2026 18:52:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20progress=20ticker=20on=20tool-activity,?= =?UTF-8?q?=20last-line=20=E2=94=94,=20summary+description=20both=20shown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ensure progressTicker runs during tool-activity updates for time refresh - Last activity line uses └ instead of ├ - Summary (📋) and description shown together when both present - Description indented as sub-item under summary --- runners/agent-runner/src/index.ts | 13 ++++++++++--- src/message-turn-controller.ts | 18 +++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/runners/agent-runner/src/index.ts b/runners/agent-runner/src/index.ts index 09c23b9..c4c3945 100644 --- a/runners/agent-runner/src/index.ts +++ b/runners/agent-runner/src/index.ts @@ -555,12 +555,19 @@ async function runQuery( const tp = message as Record; const summary = typeof tp.summary === 'string' ? tp.summary : ''; const description = typeof tp.description === 'string' ? tp.description : ''; - const activityText = description || summary; - if (activityText) { + if (summary) { writeOutput({ status: 'success', phase: 'tool-activity', - result: activityText, + result: `📋 ${summary}`, + newSessionId, + }); + } + if (description) { + writeOutput({ + status: 'success', + phase: 'tool-activity', + result: description, newSessionId, }); } diff --git a/src/message-turn-controller.ts b/src/message-turn-controller.ts index eccd978..a3bd5b0 100644 --- a/src/message-turn-controller.ts +++ b/src/message-turn-controller.ts @@ -105,6 +105,11 @@ export class MessageTurnController { } if (result.phase === 'tool-activity') { + // Flush pending progress so the message exists for tool activity sub-lines + if (this.pendingProgressText && !this.progressMessageId) { + void this.sendProgressMessage(this.pendingProgressText); + this.pendingProgressText = null; + } if (text) { this.addToolActivity(text); } @@ -230,7 +235,17 @@ export class MessageTurnController { const activityLines = this.toolActivities.length > 0 - ? '\n' + this.toolActivities.map((a) => `├ ${a}`).join('\n') + ? '\n' + + this.toolActivities + .map((a, i) => { + const isLast = i === this.toolActivities.length - 1; + const connector = isLast ? '└' : '├'; + const isSummary = a.startsWith('📋'); + return isSummary + ? `${connector} ${a}` + : `${connector} ${a}`; + }) + .join('\n') : ''; const suffix = `\n\n${elapsedParts.join(' ')}`; const maxText = @@ -287,6 +302,7 @@ export class MessageTurnController { // Update the displayed progress message with tool activity sub-lines if (this.latestProgressText && this.progressMessageId) { void this.syncTrackedProgressMessage(); + this.ensureProgressTicker(); } }