fix: resolve compilation errors found during Docker verification

This commit is contained in:
DBT
2026-02-12 07:29:39 +00:00
parent 10a9b79e57
commit 6408b72086
3 changed files with 4 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ func NewAgentLoop(cfg *config.Config, msgBus *bus.MessageBus, provider providers
// 注入递归运行逻辑,使 subagent 具备 full tool-calling 能力
subagentManager.SetRunFunc(func(ctx context.Context, task, channel, chatID string) (string, error) {
sessionKey := fmt.Sprintf("subagent:%d", time.Now().UnixNano())
sessionKey := fmt.Sprintf("subagent:%d", os.Getpid()) // 改用 PID 或随机数,避免 sessionKey 冲突
return loop.ProcessDirect(ctx, task, sessionKey)
})