mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 12:03:23 +00:00
Fix auto-compaction TUI integration and cut point logic
- Trigger auto-compaction after agent_end instead of during message_end - Show CompactionComponent after auto-compaction (same as manual /compact) - Fix cut point to include bash executions before kept user message - Stop backward scan at compaction, assistant, user, or toolResult boundaries
This commit is contained in:
parent
75c2eea151
commit
4227fd5996
3 changed files with 46 additions and 20 deletions
|
|
@ -597,7 +597,11 @@ export class InteractiveMode {
|
|||
// Rebuild chat to show compacted state
|
||||
this.chatContainer.clear();
|
||||
this.rebuildChatFromMessages();
|
||||
this.showStatus(`Auto-compacted: ${event.result.tokensBefore.toLocaleString()} tokens`);
|
||||
// Add compaction component (same as manual /compact)
|
||||
const compactionComponent = new CompactionComponent(event.result.tokensBefore, event.result.summary);
|
||||
compactionComponent.setExpanded(this.toolOutputExpanded);
|
||||
this.chatContainer.addChild(compactionComponent);
|
||||
this.footer.updateState(this.session.state);
|
||||
}
|
||||
this.ui.requestRender();
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue