feat: group reply chain — continue conversation without @mention#11
Merged
feat: group reply chain — continue conversation without @mention#11
Conversation
After a bot is triggered by @mention in a group, any member can continue the conversation by replying to any message in the chain without needing to @mention the bot again. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace unbounded set with deque(maxlen=MAX_REPLY_CHAIN_IDS) to prevent memory growth. Oldest message IDs are automatically evicted when the chain exceeds 10 entries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reduce MAX_TURNS from 25 to 10 (better suited for group chat) and set MAX_REPLY_CHAIN_IDS to 20 (10 turns × 2 IDs per turn) so both limits stay in sync. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ensure test fixtures use deque(maxlen=MAX_REPLY_CHAIN_IDS) to match production behavior, and use deque() instead of set() as the fallback default for type consistency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
@mentiontriggers bot in a group, any member can continue the conversation by replying to any message in the chain — no@mentionneededdeque(maxlen=10)per group to bound memory usage; oldest IDs are automatically evictedTest plan
@mentionseeds reply chain (user msg + bot reply tracked)@mention@mention🤖 Generated with Claude Code