Skip to content

fix(orchestrator): 修复回复开头 @ 导致的链式发言断链 - #33

Merged
jaychouchannel merged 1 commit into
jaychouchannel:masterfrom
Morningstar202604:fix/mention-chain-order
Aug 29, 2026
Merged

jaychouchannel merged 1 commit into
jaychouchannel:masterfrom
Morningstar202604:fix/mention-chain-order

Conversation

@Morningstar202604

Copy link
Copy Markdown
Contributor

Fixes #32

改动

  • strip_mention_prefix 增加 speaker 参数:只剥离发言者本人的开头自报前缀;对其他角色的开头 @ 原样保留(那是链式信号),并在剥离时顺带清掉紧邻标点(,、。::; 等),不再留孤立的 , 开头。
  • _stream_role 调用处传入 speaker=role.name。
  • 不传 speaker 时行为与旧版完全一致(向后兼容)。

验证

  • tests/test_engine_chain.py:引擎级回归测试——代码手回复 @研究员,请补充你的看法。 后,研究员被重新排队(role_start 序列为 研究员 → 代码手 → 研究员),且历史中该 @ 原样保留;
  • mock 掉 Anthropic 客户端的全循环实测:研究员 → 创意家 → 代码手 → @研究员 → 研究员(第二轮)完整续链后正常 done;
  • python -m pytest tests/ -q:12 passed(原 10 + 新 2)。

@jaychouchannel
jaychouchannel merged commit 0b95c4d into jaychouchannel:master Aug 29, 2026
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.

链式发言断链:回复开头 @ 下一位发言者时不会触发续链

2 participants