feat: add compact_boundary event support in web UI

https://github.com/tiann/hapi/issues/108#issuecomment-3799439152
This commit is contained in:
weishu
2026-01-27 10:04:01 +08:00
parent b63089f3f9
commit 7a8f1c3e87
3 changed files with 20 additions and 0 deletions
+3
View File
@@ -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 {