Add files via upload

This commit is contained in:
公明
2026-08-15 02:19:19 +08:00
committed by GitHub
parent 6fc0004ac3
commit 409e75f15a
97 changed files with 42068 additions and 0 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)
}