Skip to content

Commit d76d909

Browse files
committed
setup TUI for task and agent
1 parent eb7fb26 commit d76d909

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

cmd/agent.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var agentCmd = &cobra.Command{
2424
2525
You can view, edit, and reset configurations for each agent.
2626
27-
Use --tui flag for interactive mode.`,
27+
TUI mode is enabled by default. Use --no-tui to disable.`,
2828
}
2929

3030
var agentListCmd = &cobra.Command{
@@ -197,12 +197,12 @@ Example:
197197
}
198198

199199
func init() {
200-
agentCmd.PersistentFlags().BoolVar(&agentUseTUI, "tui", false, "Enable interactive TUI mode")
200+
agentCmd.PersistentFlags().BoolVar(&agentUseTUI, "tui", true, "Disable TUI mode")
201201

202202
agentCmd.AddCommand(agentListCmd)
203203
agentCmd.AddCommand(agentViewCmd)
204204
agentCmd.AddCommand(agentEditCmd)
205205
agentCmd.AddCommand(agentResetCmd)
206206

207207
// rootCmd.AddCommand(agentCmd)
208-
}
208+
}

cmd/task.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ var taskCmd = &cobra.Command{
2222
Short: "Task management commands",
2323
Long: `Manage tasks: dispatch tasks to new directories and sync back changes.
2424
25-
Use --tui flag to enable interactive terminal UI mode with:
25+
TUI mode is enabled by default. Use --no-tui to disable.
26+
Features in TUI mode:
2627
- Task selection list (arrow keys to navigate)
2728
- Confirmation dialogs
2829
- Progress spinners`,
@@ -38,7 +39,7 @@ In TUI mode, you can interactively select the task to dispatch.
3839
3940
Example:
4041
spark task dispatch my-task --dest ./workspace/my-task
41-
spark task dispatch --tui`,
42+
spark task dispatch`,
4243
Args: cobra.MaximumNArgs(1),
4344
RunE: func(cmd *cobra.Command, args []string) error {
4445
if taskDir == "" {
@@ -69,7 +70,7 @@ In TUI mode, you can interactively select the task to sync.
6970
7071
Example:
7172
spark task sync my-task --work-path ./workspace/my-task
72-
spark task sync --tui`,
73+
spark task sync`,
7374
Args: cobra.MaximumNArgs(1),
7475
RunE: func(cmd *cobra.Command, args []string) error {
7576
if taskDir == "" {
@@ -97,7 +98,7 @@ var taskListCmd = &cobra.Command{
9798
taskDir = "."
9899
}
99100

100-
mgr := task.NewManager(taskDir, githubOwner, workDir, false)
101+
mgr := task.NewManager(taskDir, githubOwner, workDir, useTUI)
101102

102103
// List task directories
103104
tasks, err := mgr.ListTasks()
@@ -319,8 +320,7 @@ Requirements:
319320
- github-task-workflow must be configured
320321
321322
Example:
322-
spark task impl my-feature
323-
spark task impl my-feature --tui`,
323+
spark task impl my-feature`,
324324
Args: cobra.ExactArgs(1),
325325
RunE: func(cmd *cobra.Command, args []string) error {
326326
if taskDir == "" {
@@ -338,7 +338,7 @@ func init() {
338338
taskCmd.PersistentFlags().StringVar(&taskDir, "task-dir", "", "Task directory containing all tasks")
339339
taskCmd.PersistentFlags().StringVar(&githubOwner, "owner", "", "GitHub owner for creating repositories")
340340
taskCmd.PersistentFlags().StringVar(&workDir, "work-dir", ".", "Working directory for dispatched tasks")
341-
taskCmd.PersistentFlags().BoolVar(&useTUI, "tui", false, "Enable interactive TUI mode")
341+
taskCmd.PersistentFlags().BoolVar(&useTUI, "tui", true, "Disable TUI mode")
342342

343343
viper.BindPFlag("task_dir", taskCmd.PersistentFlags().Lookup("task-dir"))
344344
viper.BindPFlag("github_owner", taskCmd.PersistentFlags().Lookup("owner"))

0 commit comments

Comments
 (0)