diff --git a/ui-tui/src/components/learningLedger.tsx b/ui-tui/src/components/learningLedger.tsx index 514141112e..8a723d0f0e 100644 --- a/ui-tui/src/components/learningLedger.tsx +++ b/ui-tui/src/components/learningLedger.tsx @@ -28,14 +28,6 @@ const typeIcon: Record = { user: '●' } -const typeVerb: Record = { - integration: 'connected', - memory: 'remembered', - recall: 'recalled', - 'skill-use': 'applied skill', - user: 'remembered' -} - const fmtTime = (ts?: null | number) => { if (!ts) { return '' @@ -181,7 +173,7 @@ export function LearningLedger({ borderColor, gw, maxHeight, onClose, t, width: ? [ { content: , - grow: 3, + grow: 2, id: 'learning-details', title: 'Details' } @@ -229,14 +221,13 @@ function LedgerRow({ active, index, item, t }: LedgerRowProps) { const when = fmtTime(item.last_used_at ?? item.learned_at) const count = item.count ? ` ×${item.count}` : '' const icon = typeIcon[item.type] ?? '•' - const verb = typeVerb[item.type] ?? item.type - const title = item.type === 'memory' || item.type === 'user' ? item.summary : item.name + const title = compactTitle(item) return ( {active ? '▸ ' : ' '} - {index}. {icon} {verb}: {title} + {index}. {icon} {title} {' '} {count} @@ -247,6 +238,14 @@ function LedgerRow({ active, index, item, t }: LedgerRowProps) { ) } +function compactTitle(item: LearningLedgerItem) { + const raw = item.type === 'memory' || item.type === 'user' ? item.summary : item.name + return raw + .replace(/^User\s+/i, '') + .replace(/^Durable memory updates$/i, 'memory updated') + .replace(/^session_search$/i, 'past sessions') +} + function LedgerDetails({ item, t }: LedgerDetailsProps) { const memoryLike = item.type === 'memory' || item.type === 'user'