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
Add session ID to commit message and exec status functions
Dane Schneider10cba1a5f75e
diff --git a/app/server/model/plan/commit_msg.go b/app/server/model/plan/commit_msg.goindex c24f98e6..3f1e2403 100644--- a/app/server/model/plan/commit_msg.go+++ b/app/server/model/plan/commit_msg.go@@ -84,10 +84,11 @@ func (state *activeTellStreamState) genPlanDescription() (*db.ConvoMessageDescriAuth: auth,Plan: plan,ModelConfig: &config,- Purpose: "Plan description",+ Purpose: "Response summary",Messages: messages,ModelStreamId: state.modelStreamId,ConvoMessageId: state.replyId,+ SessionId: activePlan.SessionId,}if tools != nil {@@ -153,7 +154,7 @@ func (state *activeTellStreamState) genPlanDescription() (*db.ConvoMessageDescri}, nil}-func GenCommitMsgForPendingResults(auth *types.ServerAuth, plan *db.Plan, clients map[string]model.ClientInfo, settings *shared.PlanSettings, current *shared.CurrentPlanState, ctx context.Context) (string, error) {+func GenCommitMsgForPendingResults(auth *types.ServerAuth, plan *db.Plan, clients map[string]model.ClientInfo, settings *shared.PlanSettings, current *shared.CurrentPlanState, sessionId string, ctx context.Context) (string, error) {config := settings.ModelPack.CommitMsgs := ""@@ -198,8 +199,9 @@ func GenCommitMsgForPendingResults(auth *types.ServerAuth, plan *db.Plan, clientAuth: auth,Plan: plan,ModelConfig: &config,- Purpose: "Commit message for pending changes",+ Purpose: "Commit message",Messages: messages,+ SessionId: sessionId,})if err != nil {diff --git a/app/server/model/plan/exec_status.go b/app/server/model/plan/exec_status.goindex 49a0d864..e133a2fb 100644--- a/app/server/model/plan/exec_status.go+++ b/app/server/model/plan/exec_status.go@@ -26,7 +26,7 @@ type execStatusShouldContinueResult struct {subtaskFinished bool}-func (state *activeTellStreamState) execStatusShouldContinue(currentMessage string, ctx context.Context) (execStatusShouldContinueResult, *shared.ApiError) {+func (state *activeTellStreamState) execStatusShouldContinue(currentMessage string, sessionId string, ctx context.Context) (execStatusShouldContinueResult, *shared.ApiError) {auth := state.authplan := state.plansettings := state.settings@@ -139,10 +139,11 @@ func (state *activeTellStreamState) execStatusShouldContinue(currentMessage striAuth: auth,Plan: plan,ModelConfig: &config,- Purpose: "Check if task finished",+ Purpose: "Task completion check",Messages: messages,ModelStreamId: state.modelStreamId,ConvoMessageId: state.replyId,+ SessionId: sessionId,})if err != nil {