fix: correct userID propagation for plugin nodes in agent-run scene (#630)

This commit is contained in:
lvxinyu-1117 2025-08-07 12:10:23 +08:00 committed by GitHub
parent c3e0e7045a
commit 3c7dfc906f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -332,8 +332,15 @@ func (t *pluginService) ExecutePlugin(ctx context.Context, input map[string]any,
return nil, vo.WrapError(errno.ErrSerializationDeserializationFail, err)
}
var uID string
if cfg.AgentID != nil {
uID = cfg.ConnectorUID
} else {
uID = conv.Int64ToStr(cfg.Operator)
}
req := &service.ExecuteToolRequest{
UserID: conv.Int64ToStr(cfg.Operator),
UserID: uID,
PluginID: pe.PluginID,
ToolID: toolID,
ExecScene: plugin.ExecSceneOfWorkflow,