fix: reminder platform 改用 AdapterName(唯一标识符),不再硬编码 obv11
- ProcessParams/SynthesizeParams 新增 AdapterName - main.go 传递 req.Source.AdapterName - reminder_create 自动注入使用 adapter 名而非平台类型 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,7 @@ type ProcessParams struct {
|
||||
ChannelType string // direct / group
|
||||
ChannelID string // platform channel ID (group ID or private OBv11 number)
|
||||
BotUID string // bot's own platform UID (e.g., OBv11 account)
|
||||
AdapterName string // adapter config name for routing
|
||||
}
|
||||
|
||||
// ProcessResult 处理结果
|
||||
@@ -430,6 +431,7 @@ func (o *Orchestrator) ProcessInput(
|
||||
Mode: params.Mode,
|
||||
ChannelType: params.ChannelType,
|
||||
ChannelID: params.ChannelID,
|
||||
AdapterName: params.AdapterName,
|
||||
}
|
||||
if prevEnrichment != nil {
|
||||
synthParams.MemorySummary = prevEnrichment.MemorySummary
|
||||
|
||||
@@ -54,6 +54,7 @@ type SynthesizeParams struct {
|
||||
Mode string // text / voice_assistant
|
||||
ChannelType string // direct / group
|
||||
ChannelID string // platform channel ID
|
||||
AdapterName string // adapter config name
|
||||
}
|
||||
|
||||
// Synthesize 综合所有子会话结果,流式生成最终回复。
|
||||
@@ -97,7 +98,7 @@ func (s *Synthesizer) Synthesize(ctx context.Context, params SynthesizeParams, e
|
||||
// 自动注入当前会话的平台信息(reminder_create 需要知道来源)
|
||||
if tc.Name == "reminder_create" && params.ChannelType != "" {
|
||||
if _, ok := args["platform"]; !ok || args["platform"] == "" {
|
||||
args["platform"] = "obv11"
|
||||
args["platform"] = params.AdapterName
|
||||
}
|
||||
if _, ok := args["channel_type"]; !ok || args["channel_type"] == "" {
|
||||
args["channel_type"] = params.ChannelType
|
||||
|
||||
Reference in New Issue
Block a user