mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(tui): improve session picker readability
- Show full session ID in a fixed-width column for easy scanning - Pad row numbers to 2 digits to keep alignment past 9 entries - Always show session source (tui/cli) instead of conditionally hiding it - Use Box-based column layout so ID, metadata, and title don't run together
This commit is contained in:
parent
90f0aa174d
commit
cb79018977
1 changed files with 13 additions and 7 deletions
|
|
@ -103,16 +103,22 @@ export function SessionPicker({
|
|||
const i = off + vi
|
||||
|
||||
return (
|
||||
<Text key={s.id}>
|
||||
<Box key={s.id}>
|
||||
<Text color={sel === i ? t.color.label : t.color.dim}>{sel === i ? '▸ ' : ' '}</Text>
|
||||
<Box width={30}>
|
||||
<Text color={sel === i ? t.color.cornsilk : t.color.dim}>
|
||||
{String(i + 1).padStart(2)}. [{s.id}]
|
||||
</Text>
|
||||
</Box>
|
||||
<Box width={30}>
|
||||
<Text color={t.color.dim}>
|
||||
({s.message_count} msgs, {age(s.started_at)}, {s.source || 'tui'})
|
||||
</Text>
|
||||
</Box>
|
||||
<Text color={sel === i ? t.color.cornsilk : t.color.dim}>
|
||||
{i + 1}. {s.title || s.preview || s.id.slice(0, 8)}
|
||||
{s.title || s.preview || '(untitled)'}
|
||||
</Text>
|
||||
<Text color={t.color.dim}>
|
||||
{' '}
|
||||
({s.message_count} msgs, {age(s.started_at)}{s.source && s.source !== 'tui' ? `, ${s.source}` : ''})
|
||||
</Text>
|
||||
</Text>
|
||||
</Box>
|
||||
)
|
||||
})}
|
||||
{off + VISIBLE < items.length && <Text color={t.color.dim}> ↓ {items.length - off - VISIBLE} more</Text>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue