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 token limit awareness to missing file prompt generation
Dane Schneider41385cd7a266
diff --git a/app/server/model/plan/tell_missing_file.go b/app/server/model/plan/tell_missing_file.goindex 1b270a11..d3b73bc8 100644--- a/app/server/model/plan/tell_missing_file.go+++ b/app/server/model/plan/tell_missing_file.go@@ -74,10 +74,11 @@ func (state *activeTellStreamState) handleMissingFileResponse(unfinishedSubtaskRparams := prompts.UserPromptParams{CreatePromptParams: prompts.CreatePromptParams{- ExecMode: req.ExecEnabled,- AutoContext: req.AutoContext,- IsUserDebug: req.IsUserDebug,- IsApplyDebug: req.IsApplyDebug,+ ExecMode: req.ExecEnabled,+ AutoContext: req.AutoContext,+ IsUserDebug: req.IsUserDebug,+ IsApplyDebug: req.IsApplyDebug,+ ContextTokenLimit: state.settings.GetPlannerEffectiveMaxTokens(),},Prompt: skipPrompt,OsDetails: req.OsDetails,@@ -102,10 +103,11 @@ func (state *activeTellStreamState) handleMissingFileResponse(unfinishedSubtaskRparams := prompts.UserPromptParams{CreatePromptParams: prompts.CreatePromptParams{- ExecMode: req.ExecEnabled,- AutoContext: req.AutoContext,- IsUserDebug: req.IsUserDebug,- IsApplyDebug: req.IsApplyDebug,+ ExecMode: req.ExecEnabled,+ AutoContext: req.AutoContext,+ IsUserDebug: req.IsUserDebug,+ IsApplyDebug: req.IsApplyDebug,+ ContextTokenLimit: state.settings.GetPlannerEffectiveMaxTokens(),},Prompt: missingPrompt,OsDetails: req.OsDetails,