feat(tui): honor display.* flags in turn renderer, status bar, and event handler
- turnController gates scheduleStreaming / reasoning recorders on streaming + showReasoning so disabling them keeps the buffer silent until message.complete flushes - createGatewayEventHandler only surfaces inline_diff previews when inlineDiffs is on - StatusRule takes a showCost prop and renders `· $X.XXXX` with the same toFixed(4) formatting as /usage when usage.cost_usd is present - Usage grows cost_usd?: number to match the gateway payload - Existing handler tests flip showReasoning on in beforeEach so reasoning-flow assertions keep their meaning
This commit is contained in:
@@ -99,6 +99,7 @@ export function StatusRule({
|
||||
usage,
|
||||
bgCount,
|
||||
sessionStartedAt,
|
||||
showCost,
|
||||
voiceLabel,
|
||||
t
|
||||
}: StatusRuleProps) {
|
||||
@@ -136,6 +137,9 @@ export function StatusRule({
|
||||
) : null}
|
||||
{voiceLabel ? <Text color={t.color.dim}> │ {voiceLabel}</Text> : null}
|
||||
{bgCount > 0 ? <Text color={t.color.dim}> │ {bgCount} bg</Text> : null}
|
||||
{showCost && typeof usage.cost_usd === 'number' ? (
|
||||
<Text color={t.color.dim}> │ ${usage.cost_usd.toFixed(4)}</Text>
|
||||
) : null}
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
@@ -285,6 +289,7 @@ interface StatusRuleProps {
|
||||
cwdLabel: string
|
||||
model: string
|
||||
sessionStartedAt?: number | null
|
||||
showCost: boolean
|
||||
status: string
|
||||
statusColor: string
|
||||
t: Theme
|
||||
|
||||
@@ -190,6 +190,7 @@ const ComposerPane = memo(function ComposerPane({
|
||||
cwdLabel={status.cwdLabel}
|
||||
model={ui.info?.model?.split('/').pop() ?? ''}
|
||||
sessionStartedAt={status.sessionStartedAt}
|
||||
showCost={ui.showCost}
|
||||
status={ui.status}
|
||||
statusColor={status.statusColor}
|
||||
t={ui.theme}
|
||||
|
||||
Reference in New Issue
Block a user