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
- batch stream messages to fix UI flickering issue - prompt tweaks for placeholder comments
Dane Schneider8b5120c69320
diff --git a/app/server/model/plan/tell_exec.go b/app/server/model/plan/tell_exec.goindex 67bebaed..8a99cbce 100644--- a/app/server/model/plan/tell_exec.go+++ b/app/server/model/plan/tell_exec.go@@ -37,6 +37,7 @@ func Tell(clients map[string]*openai.Client, plan *db.Plan, branch string, auth"",req.BuildMode == shared.BuildModeAuto,"",+ 0,)log.Printf("Tell: Tell operation completed successfully for plan ID %s on branch %s\n", plan.Id, branch)@@ -53,6 +54,7 @@ func execTellPlan(missingFileResponse shared.RespondMissingFileChoice,shouldBuildPending bool,autoContinueNextTask string,+ numErrorRetry int,) {log.Printf("execTellPlan: Called for plan ID %s on branch %s, iteration %d\n", plan.Id, branch, iteration)currentUserId := auth.User.Id@@ -98,15 +100,16 @@ func execTellPlan(}state := &activeTellStreamState{- clients: clients,- req: req,- auth: auth,- currentOrgId: currentOrgId,- currentUserId: currentUserId,- plan: plan,- branch: branch,- iteration: iteration,- missingFileResponse: missingFileResponse,+ clients: clients,+ req: req,+ auth: auth,+ currentOrgId: currentOrgId,+ currentUserId: currentUserId,+ plan: plan,+ branch: branch,+ iteration: iteration,+ missingFileResponse: missingFileResponse,+ currentReplyNumRetries: numErrorRetry,}err = state.loadTellPlan()diff --git a/app/server/model/plan/tell_state.go b/app/server/model/plan/tell_state.goindex 434b49de..bc404ad9 100644--- a/app/server/model/plan/tell_state.go+++ b/app/server/model/plan/tell_state.go@@ -9,26 +9,27 @@ import ()type activeTellStreamState struct {- clients map[string]*openai.Client- req *shared.TellPlanRequest- auth *types.ServerAuth- currentOrgId string- currentUserId string- plan *db.Plan- branch string- iteration int- replyId string- modelContext []*db.Context- convo []*db.ConvoMessage- missingFileResponse shared.RespondMissingFileChoice- summaries []*db.ConvoSummary- summarizedToMessageId string- latestSummaryTokens int- userPrompt string- promptMessage *openai.ChatCompletionMessage- replyParser *types.ReplyParser- replyNumTokens int- messages []openai.ChatCompletionMessage- tokensBeforeConvo int- settings *shared.PlanSettings+ clients map[string]*openai.Client+ req *shared.TellPlanRequest+ auth *types.ServerAuth+ currentOrgId string+ currentUserId string+ plan *db.Plan+ branch string+ iteration int+ replyId string+ modelContext []*db.Context+ convo []*db.ConvoMessage+ missingFileResponse shared.RespondMissingFileChoice+ summaries []*db.ConvoSummary+ summarizedToMessageId string+ latestSummaryTokens int+ userPrompt string+ promptMessage *openai.ChatCompletionMessage+ replyParser *types.ReplyParser+ replyNumTokens int+ messages []openai.ChatCompletionMessage+ tokensBeforeConvo int+ settings *shared.PlanSettings+ currentReplyNumRetries int}diff --git a/app/server/model/plan/tell_stream.go b/app/server/model/plan/tell_stream.goindex 4cd1234c..4f3c0e1d 100644--- a/app/server/model/plan/tell_stream.go+++ b/app/server/model/plan/tell_stream.go@@ -292,7 +292,7 @@ func (state *activeTellStreamState) listenStream(stream *openai.ChatCompletionStif req.AutoContinue && shouldContinue && iteration < MaxAutoContinueIterations {log.Println("Auto continue plan")// continue plan- execTellPlan(clients, plan, branch, auth, req, iteration+1, "", false, nextTask)+ execTellPlan(clients, plan, branch, auth, req, iteration+1, "", false, nextTask, 0)} else {var buildFinished boolUpdateActivePlan(planId, branch, func(ap *types.ActivePlan) {@@ -448,6 +448,7 @@ func (state *activeTellStreamState) listenStream(stream *openai.ChatCompletionStuserChoice,false,"",+ 0,)return}