MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / LaunchConfigWizard

Function LaunchConfigWizard

internal/ui/components/config_wizard.go:764–783  ·  view source on GitHub ↗

LaunchConfigWizard launches the configuration wizard and returns the result.

(cfg *config.Config, configPath string, activeProfile string)

Source from the content-addressed store, hash-verified

762
763// LaunchConfigWizard launches the configuration wizard and returns the result.
764func LaunchConfigWizard(cfg *config.Config, configPath string, activeProfile string) WizardResult {
765 tviewApp := tview.NewApplication()
766 tviewApp.SetInputCapture(keys.NormalizeNavigationEvent)
767
768 // Apply theme configuration first, then apply to tview (same as main application)
769 theme.ApplyCustomTheme(&cfg.Theme)
770 theme.ApplyToTview()
771
772 resultChan := make(chan WizardResult, 1)
773 wizard := NewConfigWizardPage(tviewApp, cfg, configPath, func(c *config.Config) error {
774 // The form now handles profile updates directly
775 return SaveConfigToFile(c, configPath)
776 }, func() {
777 tviewApp.Stop()
778 }, resultChan, activeProfile)
779 tviewApp.SetRoot(wizard, true)
780 _ = tviewApp.Run()
781
782 return <-resultChan
783}

Callers 2

launchConfigWizardFunction · 0.92
HandleConfigWizardFunction · 0.92

Calls 6

ApplyCustomThemeFunction · 0.92
ApplyToTviewFunction · 0.92
NewConfigWizardPageFunction · 0.85
SaveConfigToFileFunction · 0.85
RunMethod · 0.80
StopMethod · 0.45

Tested by

no test coverage detected