Skip to content

feat: group reply chain — continue conversation without @mention#11

Merged
John-Lin merged 4 commits intomasterfrom
feature/group-reply-chain
Apr 4, 2026
Merged

feat: group reply chain — continue conversation without @mention#11
John-Lin merged 4 commits intomasterfrom
feature/group-reply-chain

Conversation

@John-Lin
Copy link
Copy Markdown
Owner

@John-Lin John-Lin commented Apr 4, 2026

Summary

  • After @mention triggers bot in a group, any member can continue the conversation by replying to any message in the chain — no @mention needed
  • Track message IDs using deque(maxlen=10) per group to bound memory usage; oldest IDs are automatically evicted
  • DM behavior unchanged; reply chains are isolated per group

Test plan

  • @mention seeds reply chain (user msg + bot reply tracked)
  • Reply to tracked message triggers bot without @mention
  • Reply to untracked message still requires @mention
  • Chain grows on each turn
  • Oldest IDs evicted when chain exceeds limit
  • Chains isolated per group
  • All 112 tests pass

🤖 Generated with Claude Code

John-Lin and others added 2 commits April 4, 2026 21:17
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>
@John-Lin John-Lin changed the title feat: allow group reply chain to continue conversation without @mention feat: group reply chain — continue conversation without @mention Apr 4, 2026
John-Lin and others added 2 commits April 4, 2026 21:36
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>
@John-Lin John-Lin merged commit 88971c0 into master Apr 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant