Skip to content

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

some more sectionization cleanup

Dane Schneider3dc6e06100b0
diff --git a/cli/lib/fs.go b/cli/lib/fs.go
index dbc7ac82..06d207a1 100644
--- a/cli/lib/fs.go
+++ b/cli/lib/fs.go
@@ -20,7 +20,6 @@ var CurrentPlanName string
var CurrentPlanRootDir string
var PlanSubdir string
var PlanFilesDir string
-var PlanSectionsDir string
var ConversationSubdir string
var ContextSubdir string
@@ -94,7 +93,6 @@ func LoadCurrentPlan() error {
CurrentPlanRootDir = filepath.Join(PlandexDir, CurrentPlanName)
PlanSubdir = filepath.Join(CurrentPlanRootDir, "plan")
PlanFilesDir = filepath.Join(PlanSubdir, "files")
- PlanSectionsDir = filepath.Join(PlanSubdir, "sections")
ConversationSubdir = filepath.Join(CurrentPlanRootDir, "conversation")
ContextSubdir = filepath.Join(CurrentPlanRootDir, "context")
diff --git a/cli/lib/plan_files.go b/cli/lib/plan_files.go
index 1ba8ee5b..08534241 100644
--- a/cli/lib/plan_files.go
+++ b/cli/lib/plan_files.go
@@ -48,12 +48,9 @@ func getCurrentPlanFiles() (shared.CurrentPlanFiles, error) {
_, err := os.Stat(PlanFilesDir)
filesDirExists := !os.IsNotExist(err)
- _, err = os.Stat(PlanSectionsDir)
- sectionsDirExists := !os.IsNotExist(err)
-
numFiles := 0
- if filesDirExists || sectionsDirExists {
+ if filesDirExists {
doneCh := make(chan error)
if filesDirExists {
@@ -71,21 +68,6 @@ func getCurrentPlanFiles() (shared.CurrentPlanFiles, error) {
})
}
- if sectionsDirExists {
- // Enumerate all paths in [planDir]/sections
- err = filepath.Walk(PlanSectionsDir, func(srcPath string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
- if info.IsDir() {
- return nil
- }
- numFiles++
- go worker(PlanSectionsDir, srcPath, info, err, doneCh)
- return nil
- })
- }
-
numFinished := 0
for numFinished < numFiles {
select {
@@ -106,9 +88,6 @@ func getCurrentPlanFilePaths() ([]string, error) {
_, err := os.Stat(PlanFilesDir)
filesDirExists := !os.IsNotExist(err)
- _, err = os.Stat(PlanSectionsDir)
- sectionsDirExists := !os.IsNotExist(err)
-
filePaths := make([]string, 0)
if filesDirExists {
@@ -132,27 +111,6 @@ func getCurrentPlanFilePaths() ([]string, error) {
}
}
- if sectionsDirExists {
- // Enumerate all paths in [planDir]/sections
- err = filepath.Walk(PlanSectionsDir, func(srcPath string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- if info.IsDir() {
- return nil
- }
-
- filePaths = append(filePaths, srcPath)
- return nil
- })
-
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error listing files: %v", err)
- return []string{}, err
- }
- }
-
return filePaths, nil
}