Skip to content

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

in plans command, don't show directories that have a .plandex but no plans for parent/child dirs

Dane Schneidere962ed16ac25
diff --git a/app/cli/cmd/plans.go b/app/cli/cmd/plans.go
index 95564b88..4c6698a5 100644
--- a/app/cli/cmd/plans.go
+++ b/app/cli/cmd/plans.go
@@ -150,6 +150,23 @@ func listActive() {
}
}
+ // remove paths with no plans from parentProjectIdsWithPaths and childProjectIdsWithPaths
+ var parentProjectIdsWithPathsFiltered [][2]string
+ for _, p := range parentProjectIdsWithPaths {
+ if len(plansByProjectId[p[1]]) > 0 {
+ parentProjectIdsWithPathsFiltered = append(parentProjectIdsWithPathsFiltered, p)
+ }
+ }
+ parentProjectIdsWithPaths = parentProjectIdsWithPathsFiltered
+
+ var childProjectIdsWithPathsFiltered [][2]string
+ for _, p := range childProjectIdsWithPaths {
+ if len(plansByProjectId[p[1]]) > 0 {
+ childProjectIdsWithPathsFiltered = append(childProjectIdsWithPathsFiltered, p)
+ }
+ }
+ childProjectIdsWithPaths = childProjectIdsWithPathsFiltered
+
if len(currentProjectPlanIds) > 0 {
currentBranchNamesByPlanId, err := lib.GetCurrentBranchNamesByPlanId(currentProjectPlanIds)