feat: append customInstructions from session_before_compact to summary - #56
Open
EarthChen wants to merge 1 commit into
Open
feat: append customInstructions from session_before_compact to summary#56EarthChen wants to merge 1 commit into
EarthChen wants to merge 1 commit into
Conversation
session_before_compact exposes customInstructions (also forwarded by
ctx.compact({ customInstructions })), but the hook ignored it. Append it
to the rendered summary so callers (other extensions/tools) can inject
focus notes or task-boundary context into the compacted memory.
Collaborator
|
Could you add unit tests to the PR? Currently there are no tests or when customInstructions is present vs not present. Otherwise I see no issue with this. @elpapi42 do you agree? |
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
Append
event.customInstructions(fromsession_before_compact) to the rendered compaction summary when present. Closes #55.Why
session_before_compactalready carriescustomInstructions(forwarded byctx.compact({ customInstructions })), but the hook ignored it. Other extensions/tools can use this field to inject focus notes or task-boundary context into the compacted memory. This enables cross-extension composition without touching package internals.Change
const summary->let summarycustomInstructionsseparated by a---divider.Behavior is unchanged when
customInstructionsis absent.Test plan
customInstructions-> summary unchanged.customInstructionsset -> note appended after---.