feat(lark): 普通群回复支持按 bot 开话题#116
Open
xiongz-c wants to merge 5 commits into
Open
Conversation
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.
背景
botmux 现在在飞书普通群里默认使用 chat-scope:顶层
@bot消息会落到整群会话,回复也直接发在群里。这个模式适合“一个 bot 看整个群”的用法,但在任务型对话里容易把上下文摊到整群消息流里。仓库已经支持通过
/t//topic在普通群里手动开话题。本 PR 把这个能力做成 per-bot 配置:开启后,普通群里新的顶层@bot消息会在原消息下开话题回复,后续发送和 history 都沿用现有 thread-scope 逻辑。修改
regularGroupReplyInThreadbot 配置,默认关闭,保持现有行为不变。bots.json、同步 daemon 内存。autoStartOnNewTopic仍只对真实话题群新话题生效,避免普通群开启“回复开话题”后未 @ 消息被误自动启动。验证
pnpm test -- test/event-dispatcher.test.ts test/card-prefs-auto-start.test.ts test/bot-registry-grant.test.tspnpm build