promptAgentSelection shows a multi-select for agent configs.
()
| 251 | |
| 252 | // promptAgentSelection shows a multi-select for agent configs. |
| 253 | func promptAgentSelection() { |
| 254 | options := []huh.Option[string]{ |
| 255 | huh.NewOption("Claude Code", "claude").Selected(true), |
| 256 | huh.NewOption("Gemini", "gemini"), |
| 257 | huh.NewOption("Codex", "codex"), |
| 258 | } |
| 259 | |
| 260 | var selected []string |
| 261 | err := huh.NewMultiSelect[string](). |
| 262 | Title("Which AI assistants do you use?"). |
| 263 | Options(options...). |
| 264 | Value(&selected). |
| 265 | Run() |
| 266 | if err != nil || len(selected) == 0 { |
| 267 | // Cancelled or nothing selected: default to Claude |
| 268 | projectInitClaude = true |
| 269 | return |
| 270 | } |
| 271 | |
| 272 | for _, s := range selected { |
| 273 | switch s { |
| 274 | case "claude": |
| 275 | projectInitClaude = true |
| 276 | case "gemini": |
| 277 | projectInitGemini = true |
| 278 | case "codex": |
| 279 | projectInitCodex = true |
| 280 | } |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | // resolveInitTemplates sets projectInitNoTemplates via prompt if not explicitly set. |
| 285 | func resolveInitTemplates(isTTY bool) { |