Add files via upload

This commit is contained in:
公明
2026-08-18 20:20:39 +08:00
committed by GitHub
parent c7603c2b66
commit cecbe5a086
97 changed files with 42451 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)
}