44 "fmt"
55 "os"
66
7+ "github.com/DoPlan-dev/CLI/internal/commands"
78 "github.com/DoPlan-dev/CLI/internal/context"
89 "github.com/DoPlan-dev/CLI/internal/tui"
910 "github.com/DoPlan-dev/CLI/internal/wizard"
@@ -54,14 +55,14 @@ func executeRoot(cmd *cobra.Command, args []string) error {
5455 case context .StateOldDoPlanStructure :
5556 return launchMigrationWizard ()
5657 case context .StateNewDoPlanStructure :
57- return tui .Run () // Open dashboard
58+ return tui .RunWithExecutor ( commands . NewTUICommandExecutor ()) // Open dashboard with command executor
5859 case context .StateInsideFeature :
5960 return showFeatureView (detector )
6061 case context .StateInsidePhase :
6162 return showPhaseView (detector )
6263 default :
6364 // Fallback to dashboard
64- return tui .Run ( )
65+ return tui .RunWithExecutor ( commands . NewTUICommandExecutor () )
6566 }
6667}
6768
@@ -84,12 +85,12 @@ func launchMigrationWizard() error {
8485func showFeatureView (detector * context.Detector ) error {
8586 // Feature view functionality - fallback to main dashboard for now
8687 // TODO: Implement feature-specific view
87- return tui .Run ( )
88+ return tui .RunWithExecutor ( commands . NewTUICommandExecutor () )
8889}
8990
9091// showPhaseView shows the phase-specific view
9192func showPhaseView (detector * context.Detector ) error {
9293 // Phase view functionality - fallback to main dashboard for now
9394 // TODO: Implement phase-specific view
94- return tui .Run ( )
95+ return tui .RunWithExecutor ( commands . NewTUICommandExecutor () )
9596}
0 commit comments