Repository navigation
fix: remove non-working summarization middleware - #1883
Merged
Merged
Conversation
PR #1881 moved auto-compaction into the TUI but left the library-replacing SummarizationMiddleware registered. Remove it, its onCompacted plumbing, and the trigger/keep/enabled config. Keep keepMessages and contextFraction, and make /compact and auto-compact honor keepMessages.
The status bar spinner turned red at a hardcoded 80% while auto-compaction used config.summarization.contextFraction, so the two could drift apart. Pass contextFraction through App and InputArea to StatusBar so red starts exactly where auto-compaction fires. Take the fallback default from SummarizationSchema instead of duplicating 0.8 in the TUI.
6 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR #1881 moved auto-compaction into the TUI but left the custom
SummarizationMiddlewareregistered indeepAgents.js. This removes the middleware, itsonCompactedplumbing, and theenabled/trigger/keepconfig.keepMessagesandcontextFractionstay, and/compactand auto-compact now honorkeepMessages. The status bar's red threshold now comes fromsummarization.contextFractioninstead of a hardcoded 80%, so it turns red exactly where auto-compaction fires.docs/CONFIGURATION.mdis rewritten, and thedocs/DOCKER.mdtable now listsSUMMARIZATION_KEEP_MESSAGESandSUMMARIZATION_CONTEXT_FRACTION.Type of Change
Breaking: the summarization schema is strict, so a
config.yamlthat still setssummarization.enabled,triggerorkeepis rejected. Delete those keys.Testing
tests/unit/config/summarization.test.jsfor the reduced schema, including rejection of the removed keys.statusBar.test.jsso the orange/red boundary follows the compaction fraction, with a test that a configured fraction overrides the default. UpdatedconversationArea.test.jsto compare the default against the schema.npm test: 5512 pass, 0 fail.npm run lint: 0 errors.Coverage
Not verified for this update: a standalone
npm run coveragerun was not completed. The pre-commit hook regeneratescoverage.txton each commit.Checklist
npm run lintpassesThreat model: N/A. This removes code and adds no new inputs, I/O, or secrets. The reactive context-window handler (#1251) is unchanged and remains the overflow safety net.