agent-Specialization/utils
JOJO 67fdb715f5 refactor(messages): 统一运行期消息插入为 [系统通知|source] 前缀的 user 消息
- 新增 server/chat_flow_task_support.inject_runtime_user_message 作为唯一入口,
  统一处理 add_conversation + messages.insert + sender(user_message) 三件事
- 子智能体 / 后台 run_command / runtime_guidance / mode notice 全部走该入口,
  role 一律 user,inline 仅作 metadata 标记,不再复用 system role 表达语义
- inline poll 移出 tool 执行循环,改为整轮 tool 完成后批量注入,
  避免在 assistant.tool_calls 与 tool 序列之间插入 user 导致 API 报错
- 删除 _insert_completion_notice_message / _record_sub_agent_message
  以及 build_messages 中 system→user 的回转分支
- 移除已废弃的 wait_sub_agent 工具残留(后端注册、前端图标/动画、
  prompts、SKILL 文档;保留 sleep 的 wait_sub_agent_ids 参数)
- 前端取消对 is_auto_generated/auto_message_type 的过滤,
  让运行期注入的 user 消息在历史和实时推送中正常渲染

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 02:01:36 +08:00
..
__pycache__ <fix thinking chunk> 2025-11-19 20:47:56 +08:00
__init__.py feat: 添加 terminal-guide 和 sub-agent-guide skills 2026-03-16 21:17:02 +08:00
aliyun_fallback.py feat: add aliyun quota fallback 2026-03-06 12:31:20 +08:00
api_client.py fix: harden multimodal handling and sanitize mcp action results 2026-04-27 20:11:21 +08:00
context_manager.py feat: add host workspace manager, mcp-tool-config skill, and UI enhancements 2026-04-28 13:04:51 +08:00
conversation_manager.py feat(host-security+ui): unify host execution/approval behavior, runtime notices, and approval overlay UX 2026-05-12 19:16:38 +08:00
host_workspace_debug.py feat: add host workspace manager, mcp-tool-config skill, and UI enhancements 2026-04-28 13:04:51 +08:00
logger.py feat: add custom tools guide and id validation 2026-01-05 21:46:55 +08:00
media_store.py fix: render user media previews from media store refs 2026-04-27 12:57:13 +08:00
terminal_factory.py chore: initial import 2025-11-14 16:44:12 +08:00
tool_result_formatter.py refactor(messages): 统一运行期消息插入为 [系统通知|source] 前缀的 user 消息 2026-05-23 02:01:36 +08:00