feat(conversation-memory): reduce token usage in summarization - #397
Conversation
- Increase chunk size from 8 to 32 exchanges (~75% fewer API calls) - Skip agent/subagent conversations (files starting with 'agent-') This reduces both API costs and processing time for large conversation histories while maintaining summary quality. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tion - Add test framework (Bun test) - Add tests for chunk size (32 exchanges per chunk) - Add tests for agent- file filtering behavior - Add npm test script Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces filtering to exclude agent-generated files (prefixed with "agent-") from indexing and sync operations, increases the hierarchical summarization chunk size from 8 to 32 exchanges to optimize API calls, adds comprehensive test suites for filtering and chunking logic, and sets up a test script in package.json. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
agent-)Test plan
npm run buildnpm test(9 tests)Expected impact
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Performance Improvements
Tests