feat: 后端统一消息类型分类 + 更新 API 文档

msg_type 现在由后端在所有消息路径上自动填充,前端无需解析内容猜测类型。
- chat_handler: SendSystemMessage → system_info, parseMultiMessage 返回 proactiveSegment{msgType}
- protocol: MultiMessageItem 增加 MsgType 字段
- useWebSocket: 所有 handler 直接读取 msg_type,移除前端类型推断
- docs/api/gateway-api.md: 文档化 msg_type 分类机制,移除已删除的每日简报章节

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 12:35:13 +08:00
parent 6f4056eefb
commit 2574f60823
5 changed files with 41 additions and 76 deletions
+1
View File
@@ -92,6 +92,7 @@ type MultiMessagePayload struct {
type MultiMessageItem struct {
Index int `json:"index"`
Content string `json:"content"`
MsgType string `json:"msg_type,omitempty"` // chat | action | system_info
}
// NotificationInfo 通知推送信息