fix: guard Ding-specific sections behind flavor check and prevent frustration self-trigger - #183
Open
MeGaurav4 wants to merge 1 commit into
Open
fix: guard Ding-specific sections behind flavor check and prevent frustration self-trigger#183MeGaurav4 wants to merge 1 commit into
MeGaurav4 wants to merge 1 commit into
Conversation
…stration self-trigger Two fixes: 1. session-restore.sh: moved the Ding reminder mode section into a conditional block so it only injects for the "ding" flavor. The generic protocol template and auto-router table stay flavor-agnostic. 2. frustration-trigger.sh: removed 置身钉内|置身钉外 from the trigger regex (these meta-terms caused a self-trigger loop). Added a session-level marker file guard to prevent repeated injection. Closes tanweai#182
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.
Two related fixes for the always-on protocol and frustration trigger.
Context bloat on non-ding flavors. The session-restore hook
unconditionally injected ~2000 Chinese characters of Ding-specific
protocol content into every session, regardless of flavor. Moved the
Ding section behind a
$PUA_FLAVOR = "ding"guard. The genericprotocol template and auto-router table remain flavor-agnostic.
Self-trigger loop in frustration hook. The
TRIGGER_REregexincluded
置身钉内|置身钉外-- meta-terms the AI itself uses whendescribing the plugin. The user asking "why did you say that?" would
match the regex, re-inject context, and create a loop. Removed the
terms from the trigger. Also added a session-level marker file
(
/tmp/pua-frustration-fired-$PPID) to prevent re-injection withinthe same session.
Closes #182