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
API key env var check should happen *after* plan creation on REPL start when there's no existing plan, fixes #216
Dane Schneider5f526c7395fb
diff --git a/app/cli/cmd/repl.go b/app/cli/cmd/repl.goindex 6ae65c8c..ff05f60d 100644--- a/app/cli/cmd/repl.go+++ b/app/cli/cmd/repl.go@@ -2,7 +2,6 @@ package cmdimport ("fmt"- "log""os""path/filepath""plandex-cli/api"@@ -70,16 +69,12 @@ func setReplConfig() {func runRepl(cmd *cobra.Command, args []string) {sessionId = uuid.New().String()- log.Println("sessionId", sessionId)term.SetIsRepl(true)+auth.MustResolveAuthWithOrg()lib.MustResolveOrCreateProject()- if !auth.Current.IntegratedModelsMode {- lib.MustVerifyApiKeys()- }-term.StartSpinner("")lib.LoadState()@@ -106,6 +101,7 @@ func runRepl(cmd *cobra.Command, args []string) {}afterNew := false+if lib.CurrentPlanId == "" {os.Setenv("PLANDEX_DISABLE_SUGGESTIONS", "1")args := []string{}@@ -137,6 +133,10 @@ func runRepl(cmd *cobra.Command, args []string) {afterNew = true}+ if !auth.Current.IntegratedModelsMode {+ lib.MustVerifyApiKeys()+ }+projectPaths, err = fs.GetProjectPaths(fs.Cwd)if err != nil {color.New(term.ColorHiRed).Printf("Error getting project paths: %v\n", err)