feat(tui): bare /details opens a keyboard selector

DetailsDialog is a centered SelectList over the five transcript-detail
states (three tool-card phases, reasoning shown/hidden); it preselects
the current phase, marks both current values, applies on Enter, and
cancels on Esc/Ctrl+C. Width is the new detailsDialogWidth config key.
The argument grammar is unchanged and shares the same setters.
This commit is contained in:
Turtle
2026-07-30 19:52:58 +08:00
parent 3899a26c87
commit 2c98f35a86
13 changed files with 256 additions and 34 deletions

View File

@@ -46,6 +46,7 @@ const CHECKPOINTS = [
'advanced-cards-expanded',
'tool-cards-hidden-folded',
'details-command',
'details-selector',
'untrusted-controls',
'question-dialog',
'question-dialog-single-option',
@@ -661,11 +662,14 @@ describe('TUI terminal-state snapshots', () => {
harness.terminal.send('/details hidden reasoning off')
harness.terminal.send('\r')
})
await checkpoint('details-command', harness.terminal, { includeScrollback: true })
// Bare /details opens the selector, preselecting and marking the current
// hidden/reasoning-off state.
await renderAfter(harness, () => {
harness.terminal.send('/details')
harness.terminal.send('\r')
})
await checkpoint('details-command', harness.terminal, { includeScrollback: true })
await checkpoint('details-selector', harness.terminal, { includeScrollback: true })
nowSpy.mockRestore()
await disposeSnapshot(harness)
})