Skip to content

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

don't autoload context in chat mode if not in context stage

Dane Schneider680b944dc330
diff --git a/app/server/model/plan/tell_context.go b/app/server/model/plan/tell_context.go
index d445c467..871ba45c 100644
--- a/app/server/model/plan/tell_context.go
+++ b/app/server/model/plan/tell_context.go
@@ -215,6 +215,11 @@ func (state *activeTellStreamState) checkAutoLoadContext() checkAutoLoadContextR
return checkAutoLoadContextResult{}
}
+ // for chat responses, only auto load context if we're in the context phase
+ if req.IsChatOnly && currentStage.PlanningPhase != shared.PlanningPhaseContext {
+ return checkAutoLoadContextResult{}
+ }
+
log.Printf("%d existing contexts by path\n", len(contextsByPath))
// pick out all potential file paths within backticks