Skip to content

Conversation

@anak10thn
Copy link
Contributor

@anak10thn anak10thn commented Aug 17, 2025

What does this PR do?

This PR significantly improves the conversation condensing functionality by completely replacing the conversation history with a condensed summary, rather than keeping a portion of the original messages. This approach enhances token efficiency and reduces memory footprint.

Key changes include:

  • Complete replacement of conversation history with condensed summary when condensing occurs
  • Removal of the condense_conversation tool from the available tools list since condensing now happens automatically
  • Improved conditional logic in the condenseConversation utility function
  • Set maxMessagesToKeep to 0 for complete history replacement
  • Added comprehensive test suite for automatic condensing verification in test/automatic-condense-test.js

Technical Improvements

  • Enhanced token efficiency by completely removing all previous messages
  • Cleaner state management with simplified conversation history handling
  • Better performance through reduced memory footprint after condensing

Related Issues

Fixes #

Checklist

  • I tested my changes
  • I reviewed my own code
  • I added comprehensive test coverage

…nction

Remove complex deriveLLMConfigFromClient method and replace with simple default config.
Update condenseConversation to accept LLMClient directly instead of LLMConfig.
Add condenseThreshold setting to UI with configurable percentage values.
Remove unused imports (LLMProvider, BatchResult) to clean up dependencies.
@anak10thn anak10thn changed the title feat: Improve conversation condensing by completely replacing history… feat: Improve conversation condensing by completely replacing history with summary Aug 18, 2025
@anak10thn anak10thn merged commit d0e02f8 into main Aug 18, 2025
2 checks passed
@anak10thn anak10thn deleted the fixed/cendense branch August 18, 2025 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants