f25af64f00
New files:
- src/api/mention_utils.py: extract_mentions(), infer_intent(),
_build_response_guidance(), AGENT_ALIAS mapping
- templates/toolchain/mention.md: @mention notification template
with context API + response guidance by intent type
Modified:
- src/api/toolchain_routes.py: S1-S5 handler changes
- S1: Issue body @mention on opened
- S2+S4: _handle_issue_comment control flow refactored
(guard clause → positive if, CI + @mention independent paths)
- S3: PR body @mention on opened
- S5: Review body @mention on submitted
- New _send_mention_mails() with auto-flow suppression
- src/daemon/toolchain_templates.py: register mention template
Design: docs/design/25-gitea-mention-toolchain.md (v2.0)
Tests: 405 passed, 3 skipped
393 B
393 B
{mention_type}通知
来源: {source_type} {source_url} 评论者: {commenter} 意图: {intent_hint} 内容: {content_snippet}
📋 获取完整上下文:
- 查看{source_type}详情: GET {gitea_api}/repos/{repo}/{source_detail_api_path}
- 查看评论列表: GET {gitea_api}/repos/{repo}/{source_comments_api_path}
📌 响应指引: {response_guidance}
完成后按指引操作。