fix: failed to set right status in memory (#17472)

As title

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Haruko386
2026-07-28 19:13:22 +08:00
committed by GitHub
parent 7f21a7ba18
commit 4885dda32a
8 changed files with 161 additions and 33 deletions

View File

@@ -1492,7 +1492,12 @@ func (s *AgentService) buildRunFunc(canvasID string, versionRow *entity.UserCanv
if uid, ok := root["user_id"].(string); ok && uid != "" {
state.Sys["user_id"] = uid
}
state.Sys["agent_id"] = canvasID
if canvasID != "" {
state.Sys["canvas_id"] = canvasID
}
if sessionID != "" {
state.Sys["session_id"] = sessionID
}
if tid, ok := root["tenant_id"].(string); ok && tid != "" {
state.Sys["tenant_id"] = tid
}