feat: PlatformChannel 支持 AdapterID/AdapterName — 多账号全链路区分

- PlatformChannel 新增 AdapterID + AdapterName 字段
- AddOrUpdatePlatformChannel 接受 adapter 信息参数
- channel_sync 传递 adapter_id/adapter_name
- 消息处理路径传递 adapter_name

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-23 18:01:27 +08:00
parent 45fac267fe
commit c96bd23f83
6 changed files with 16 additions and 152 deletions
+2 -2
View File
@@ -967,7 +967,7 @@ func handleChat(
adapterKey = req.Source.AdapterName
}
thinker.SetBotUID(adapterKey, req.Source.BotUID)
thinker.AddOrUpdatePlatformChannel(req.Source.Platform, req.Source.ChannelType, req.Source.ChannelID, req.Source.GroupName)
thinker.AddOrUpdatePlatformChannel(req.Source.Platform, req.Source.ChannelType, req.Source.ChannelID, req.Source.GroupName, "", req.Source.AdapterName)
}
}
// 图片预处理:静默观察时也分析图片内容,供后台思考使用
@@ -1007,7 +1007,7 @@ func handleChat(
thinker.SetBotUID(adapterKey, req.Source.BotUID)
}
if req.Source.Platform != "" && req.Source.ChannelID != "" {
thinker.AddOrUpdatePlatformChannel(req.Source.Platform, req.Source.ChannelType, req.Source.ChannelID, req.Source.GroupName)
thinker.AddOrUpdatePlatformChannel(req.Source.Platform, req.Source.ChannelType, req.Source.ChannelID, req.Source.GroupName, "", req.Source.AdapterName)
}
}