amazon-q-developer-cli
amazon-q-developer-cli copied to clipboard
Rahulrajaram compaction fixes
Fix: Conversation overflow, terminal responsiveness, and transcript accuracy
Changes
- Conversation overflow with token-based compaction
- Fixed bug where message count was used instead of token count, causing overflow errors with large tool outputs
- Track cumulative token usage (input + output) from backend MetadataEvent
- Trigger proactive compaction at 98% of context window based on actual tokens
- Add MetadataEvent support to ChatResponseStream
- Ctrl+C handling during hook execution
- CLI no longer freezes during "Thinking..." state when hooks are running
- Hooks now respond immediately to Ctrl+C instead of waiting for 30s timeout
- Uses tokio::select! to monitor both hook completion and Ctrl+C signals
- Transcript sanitization
- Fixed bug where hidden unicode characters appeared in transcript but not in messages sent to LLM
- Moved transcript append to after sanitization step
- ANSI escape codes in /clear command
- Replaced StyledText helpers with direct crossterm commands for consistent rendering across terminals