Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

Improve server setup with proper shutdown handling

Dane Schneidercdcfe5162a30
diff --git a/app/server/hooks/hooks.go b/app/server/hooks/hooks.go
index c6577625..96248960 100644
--- a/app/server/hooks/hooks.go
+++ b/app/server/hooks/hooks.go
@@ -177,3 +177,7 @@ func ExecHook(name string, params HookParams) (HookResult, *shared.ApiError) {
}
return hook(params)
}
+
+func TestUpdate() {
+
+}
diff --git a/app/server/types/active_plan.go b/app/server/types/active_plan.go
index 8629e4bb..d279a207 100644
--- a/app/server/types/active_plan.go
+++ b/app/server/types/active_plan.go
@@ -341,7 +341,7 @@ func (ap *ActivePlan) Subscribe(reqCtx context.Context) (string, chan string) {
// Make a subscription context that will end if EITHER the request ends
// OR the plan’s context ends:
- subCtx, subCancel := context.WithCancel(context.Background())
+ subCtx, subCancel := context.WithCancel(shutdown.ShutdownCtx)
// Use a small goroutine to combine the two cancels:
go func() {