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
+12
View File
@@ -0,0 +1,12 @@
package handler
import "context"
// detachedAgentContext lets a long-running Agent survive an SSE disconnect
// while retaining immutable request values such as the authenticated Principal.
func detachedAgentContext(parent context.Context) context.Context {
if parent == nil {
parent = context.Background()
}
return context.WithoutCancel(parent)
}