MCPcopy Create free account
hub / github.com/driangle/taskmd / promptInput

Function promptInput

apps/cli/internal/cli/importcmd.go:407–423  ·  view source on GitHub ↗
(title, description, placeholder string, value *string)

Source from the content-addressed store, hash-verified

405}
406
407func promptInput(title, description, placeholder string, value *string) error {
408 input := huh.NewInput().Title(title).Value(value)
409 if description != "" {
410 input = input.Description(description)
411 }
412 if placeholder != "" {
413 input = input.Placeholder(placeholder)
414 }
415 if err := input.Run(); err != nil {
416 return fmt.Errorf("wizard cancelled: %w", err)
417 }
418 // Apply placeholder as default when user submits empty input
419 if *value == "" && placeholder != "" {
420 *value = placeholder
421 }
422 return nil
423}
424
425func projectHint(source string) string {
426 switch source {

Callers 4

wizardSourceConfigFunction · 0.85
wizardGitHubConfigFunction · 0.85
wizardGitHubFiltersFunction · 0.85
wizardOutputDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected