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
fix for stage/auto-continue rules
Dane Schneidera64c57e14968
diff --git a/app/server/model/plan/tell_exec.go b/app/server/model/plan/tell_exec.goindex 9c69baae..e09b9c6d 100644--- a/app/server/model/plan/tell_exec.go+++ b/app/server/model/plan/tell_exec.go@@ -204,7 +204,7 @@ func execTellPlan(params execTellPlanParams) {wasImplementationStage := lastConvoMsg != nil && lastConvoMsg.Flags.IsImplementationStageisTrueUserContinue := iteration == 0 && req.IsUserContinue && lastConvoMsg != nil && lastConvoMsg.Role == openai.ChatMessageRoleAssistant- isUserPrompt := iteration == 0 && !isTrueUserContinue+ isUserPrompt := iteration == 0 && (!req.IsChatOnly || !isTrueUserContinue)hasSubtasks := len(state.subtasks) > 0@@ -220,7 +220,7 @@ func execTellPlan(params execTellPlanParams) {isImplementationStage := !req.IsChatOnly && !isPlanningStage- isContextStage := autoContextEnabled && isPlanningStage && !isFollowUp && !state.contextMapEmpty && (isUserPrompt || !wasContextStage)+ isContextStage := autoContextEnabled && isPlanningStage && !isFollowUp && !state.contextMapEmpty && !wasContextStage && (isUserPrompt || shouldLoadFollowUpContext)log.Printf("isPlanningStage: %t, isImplementationStage: %t, isContextStage: %t, isFollowUp: %t\n", isPlanningStage, isImplementationStage, isContextStage, isFollowUp)diff --git a/app/server/model/plan/tell_stream_finish.go b/app/server/model/plan/tell_stream_finish.goindex 086e8921..26d99ab7 100644--- a/app/server/model/plan/tell_stream_finish.go+++ b/app/server/model/plan/tell_stream_finish.go@@ -182,7 +182,8 @@ func (state *activeTellStreamState) handleStreamFinished() handleStreamFinishedRlog.Printf("allSubtasksFinished: %v\n", allSubtasksFinished)log.Printf("followUpNeedsContextStage: %v\n", followUpNeedsContextStage)- if followUpNeedsContextStage ||+ if state.isContextStage ||+ followUpNeedsContextStage ||(len(autoLoadContextFiles) > 0 && !hasNewSubtasks) ||(len(autoLoadContextFiles) > 0 && req.IsChatOnly) ||(req.AutoContinue && shouldContinue && iteration < MaxAutoContinueIterations &&