Skip to content

Commit d79aa2a

Browse files
committed
Remove delay when showing duration
1 parent e5f1dd2 commit d79aa2a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/working-indicator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export interface TurnStats {
1212
streamMode: StreamMode;
1313
}
1414

15-
const SHOW_STATS_AFTER_MS = 3_000;
1615

1716
export class WorkingIndicatorComponent extends Container {
1817
private spacer: Spacer;
@@ -106,10 +105,11 @@ export class WorkingIndicatorComponent extends Container {
106105
}
107106

108107
const elapsed = Date.now() - stats.turnStartMs;
109-
if (elapsed < SHOW_STATS_AFTER_MS) return null;
110-
111108
this.advanceDisplayedChars(stats.streamedChars);
112109
const tokens = Math.round(this.displayedChars / 4);
110+
if (tokens <= 0) {
111+
return theme.muted(`(${formatTurnDuration(elapsed)})`);
112+
}
113113
const arrow = stats.streamMode === 'requesting' ? '↑' : '↓';
114114
return theme.muted(`(${formatTurnDuration(elapsed)} · ${arrow} ${formatTokensCompact(tokens)} tokens)`);
115115
}

0 commit comments

Comments
 (0)