fix: prevent nil pointer dereference when updating agent model (#1560)
commit8ab8324be9bfa66240d3d30a22a0e1122c6c8a65
authorGustave-241021 <2909789120@qq.com>
dateMon 8 Dec 2025, 22:42 (1 year ago)
parentc65ec47
internal/app/app.go+3
@@ -260,6 +260,9 @@ func (app *App) RunNonInteractive(ctx context.Context, output io.Writer, prompt
260260}
261261
262262func (app *App) UpdateAgentModel(ctx context.Context) error {
263+ if app.AgentCoordinator == nil {
264+ return fmt.Errorf("agent configuration is missing")
265+ }
263266 return app.AgentCoordinator.UpdateModels(ctx)
264267}
265268