fix(s06): wire compact tool's focus parameter into auto_compact#287
Merged
Merged
Conversation
The compact tool schema declares a "focus" parameter ("What to preserve
in the summary") but the handler ignored it entirely -- the parameter
was never passed to auto_compact(). Now the focus value is captured from
block.input and included in the summarization prompt so the LLM knows
what details to prioritize when compressing the conversation.
|
@123456wda is attempting to deploy a commit to the crazyboym's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
compacttool ins06_context_compact.pydeclares afocusparameter in its schema ("What to preserve in the summary") but the handler ignores it entirelyfocusvalue is never passed toauto_compact(), so the parameter has no effectChanges
agents/s06_context_compact.pyauto_compact()now accepts optionalfocus: strparameteragents/s06_context_compact.pyfocusis non-empty, the summarization prompt includes: "Pay special attention to preserving details about: {focus}"agents/s06_context_compact.pyagent_loopcapturesfocusfromblock.inputand passes it toauto_compactBefore / After
Before: Calling
compactwith{"focus": "the auth refactor"}would compress the conversation but ignore the focus entirely.After: The focus is passed to the summarization prompt, so the LLM prioritizes preserving details about the specified topic.
Test plan
python -m py_compile agents/s06_context_compact.pypassescompactwith{"focus": "task system"}produces a summary that emphasizes task system details