mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
feat: add compact_boundary event support in web UI
https://github.com/tiann/hapi/issues/108#issuecomment-3799439152
This commit is contained in:
@@ -63,6 +63,9 @@ export function getEventPresentation(event: AgentEvent): EventPresentation {
|
||||
const formatted = saved >= 1000 ? `${Math.round(saved / 1000)}K` : String(saved)
|
||||
return { icon: '📦', text: `Context compacted (saved ${formatted} tokens)` }
|
||||
}
|
||||
if (event.type === 'compact') {
|
||||
return { icon: '📦', text: 'Conversation compacted' }
|
||||
}
|
||||
try {
|
||||
return { icon: null, text: JSON.stringify(event) }
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user