Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

track apply debug/user debug messages

Dane Schneidera7e23aa8c52f
diff --git a/app/server/model/plan/tell_load.go b/app/server/model/plan/tell_load.go
index 2a863635..2715005d 100644
--- a/app/server/model/plan/tell_load.go
+++ b/app/server/model/plan/tell_load.go
@@ -182,6 +182,11 @@ func (state *activeTellStreamState) loadTellPlan() error {
Tokens: promptTokens,
Num: num,
Message: req.Prompt,
+ Flags: shared.ConvoMessageFlags{
+ IsApplyDebug: req.IsApplyDebug,
+ IsUserDebug: req.IsUserDebug,
+ IsChat: req.IsChatOnly,
+ },
}
_, err = db.StoreConvoMessage(promptMsg, auth.User.Id, branch, true)
diff --git a/app/server/model/plan/tell_stage.go b/app/server/model/plan/tell_stage.go
index 98b34c07..2ac3b0dc 100644
--- a/app/server/model/plan/tell_stage.go
+++ b/app/server/model/plan/tell_stage.go
@@ -36,10 +36,12 @@ func (state *activeTellStreamState) resolveCurrentStage() (activatedPaths map[st
}
isUserPrompt := false
+ // isApplyDebug := false
if !isContinueFromAssistantMsg {
isUserPrompt = lastConvoMsg == nil || lastConvoMsg.Role == openai.ChatMessageRoleUser
log.Printf("[resolveCurrentStage] isUserPrompt: %v", isUserPrompt)
+ // isApplyDebug = isUserPrompt && ((lastConvoMsg != nil && lastConvoMsg.Flags.IsApplyDebug) || (req.IsApplyDebug))
}
var tellStage shared.TellStage
@@ -74,10 +76,10 @@ func (state *activeTellStreamState) resolveCurrentStage() (activatedPaths map[st
}
if tellStage == shared.TellStagePlanning {
- if req.AutoContext && hasContextMap && !contextMapEmpty && !wasContextStage && !req.IsApplyDebug {
+ if req.AutoContext && hasContextMap && !contextMapEmpty && !wasContextStage {
planningPhase = shared.PlanningPhaseContext
- log.Printf("[resolveCurrentStage] Set planningPhase to Context - AutoContext: %v, hasContextMap: %v, contextMapEmpty: %v, wasContextStage: %v, IsApplyDebug: %v",
- req.AutoContext, hasContextMap, contextMapEmpty, wasContextStage, req.IsApplyDebug)
+ log.Printf("[resolveCurrentStage] Set planningPhase to Context - AutoContext: %v, hasContextMap: %v, contextMapEmpty: %v, wasContextStage: %v",
+ req.AutoContext, hasContextMap, contextMapEmpty, wasContextStage)
} else {
planningPhase = shared.PlanningPhasePlanning
log.Printf("[resolveCurrentStage] Set planningPhase to Planning - AutoContext: %v, hasContextMap: %v, contextMapEmpty: %v, wasContextStage: %v",
diff --git a/app/shared/data_models.go b/app/shared/data_models.go
index 223fb070..131c28bf 100644
--- a/app/shared/data_models.go
+++ b/app/shared/data_models.go
@@ -145,6 +145,8 @@ type ConvoMessageFlags struct {
DidCompleteTask bool `json:"didCompleteTask"`
DidCompletePlan bool `json:"didCompletePlan"`
HasUnfinishedSubtasks bool `json:"hasUnfinishedSubtasks"`
+ IsApplyDebug bool `json:"isApplyDebug"`
+ IsUserDebug bool `json:"isUserDebug"`
}
type Subtask struct {