fix: progress ticker on tool-activity, last-line └, summary+description both shown
- 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
This commit is contained in:
@@ -555,12 +555,19 @@ async function runQuery(
|
|||||||
const tp = message as Record<string, unknown>;
|
const tp = message as Record<string, unknown>;
|
||||||
const summary = typeof tp.summary === 'string' ? tp.summary : '';
|
const summary = typeof tp.summary === 'string' ? tp.summary : '';
|
||||||
const description = typeof tp.description === 'string' ? tp.description : '';
|
const description = typeof tp.description === 'string' ? tp.description : '';
|
||||||
const activityText = description || summary;
|
if (summary) {
|
||||||
if (activityText) {
|
|
||||||
writeOutput({
|
writeOutput({
|
||||||
status: 'success',
|
status: 'success',
|
||||||
phase: 'tool-activity',
|
phase: 'tool-activity',
|
||||||
result: activityText,
|
result: `📋 ${summary}`,
|
||||||
|
newSessionId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (description) {
|
||||||
|
writeOutput({
|
||||||
|
status: 'success',
|
||||||
|
phase: 'tool-activity',
|
||||||
|
result: description,
|
||||||
newSessionId,
|
newSessionId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,11 @@ export class MessageTurnController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result.phase === 'tool-activity') {
|
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) {
|
if (text) {
|
||||||
this.addToolActivity(text);
|
this.addToolActivity(text);
|
||||||
}
|
}
|
||||||
@@ -230,7 +235,17 @@ export class MessageTurnController {
|
|||||||
|
|
||||||
const activityLines =
|
const activityLines =
|
||||||
this.toolActivities.length > 0
|
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 suffix = `\n\n${elapsedParts.join(' ')}`;
|
||||||
const maxText =
|
const maxText =
|
||||||
@@ -287,6 +302,7 @@ export class MessageTurnController {
|
|||||||
// Update the displayed progress message with tool activity sub-lines
|
// Update the displayed progress message with tool activity sub-lines
|
||||||
if (this.latestProgressText && this.progressMessageId) {
|
if (this.latestProgressText && this.progressMessageId) {
|
||||||
void this.syncTrackedProgressMessage();
|
void this.syncTrackedProgressMessage();
|
||||||
|
this.ensureProgressTicker();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user