Skip to content

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

fix recursive context load

Dane Schneider75c94b3a29f6
diff --git a/cli/lib/context_load.go b/cli/lib/context_load.go
index 885fe149..37177c2e 100644
--- a/cli/lib/context_load.go
+++ b/cli/lib/context_load.go
@@ -108,6 +108,7 @@ func MustLoadContext(resources []string, params *types.LoadContextParams) {
onErr(fmt.Errorf("failed to parse input paths: %v", err))
}
+ inputFilePaths = flattenedPaths
for _, path := range flattenedPaths {
go func(path string) {
@@ -184,7 +185,7 @@ func MustLoadContext(resources []string, params *types.LoadContextParams) {
if res.MaxTokensExceeded {
overage := res.TotalTokens - shared.MaxContextTokens
- fmt.Printf("🚨 Update would add %d πŸͺ™ and exceed token limit (%d) by %d πŸͺ™", res.TokensAdded, shared.MaxContextTokens, overage)
+ fmt.Printf("🚨 Update would add %d πŸͺ™ and exceed token limit (%d) by %d πŸͺ™\n", res.TokensAdded, shared.MaxContextTokens, overage)
os.Exit(1)
}