Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
Protect against possible panic in onBuildFileError
Dane Schneider091db00c277b
diff --git a/app/server/model/plan/build_finish.go b/app/server/model/plan/build_finish.goindex ea50d859..fa948d16 100644--- a/app/server/model/plan/build_finish.go+++ b/app/server/model/plan/build_finish.go@@ -303,10 +303,12 @@ func (fileState *activeBuildStreamFileState) onBuildFileError(err error) {activeBuild.Success = falseactiveBuild.Error = err- activePlan.StreamDoneCh <- &shared.ApiError{- Type: shared.ApiErrorTypeOther,- Status: http.StatusInternalServerError,- Msg: err.Error(),+ if activePlan != nil {+ activePlan.StreamDoneCh <- &shared.ApiError{+ Type: shared.ApiErrorTypeOther,+ Status: http.StatusInternalServerError,+ Msg: err.Error(),+ }}if err != nil {