Add files via upload

This commit is contained in:
公明
2026-07-10 18:54:04 +08:00
committed by GitHub
parent a145687508
commit 1b64f5d8a0
28 changed files with 1040 additions and 125 deletions
+5 -1
View File
@@ -36,6 +36,7 @@ func (h *AgentHandler) roleForWorkflow(req *ChatRequest) (config.RoleConfig, boo
}
func (h *AgentHandler) runRoleWorkflowStreamIfBound(
c *gin.Context,
req *ChatRequest,
prep *multiAgentPrepared,
sendEvent func(eventType, message string, data interface{}),
@@ -60,7 +61,10 @@ func (h *AgentHandler) runRoleWorkflowStreamIfBound(
}
}()
baseCtx, cancelWithCause := context.WithCancelCause(context.Background())
if c == nil || c.Request == nil {
return false
}
baseCtx, cancelWithCause := context.WithCancelCause(detachedAgentContext(c.Request.Context()))
defer cancelWithCause(nil)
taskCtx, timeoutCancel := context.WithTimeout(baseCtx, 600*time.Minute)
defer timeoutCancel()