feat: add interactive wizard, contextual errors, and code improvements

- Add interactive configuration wizard with auto-detection and multi-format export
- Implement contextual error system with 14 error codes and actionable suggestions
- Add centralized progress indicators with consistent theming
- Fix all cyclomatic complexity issues (8 functions refactored)
- Eliminate code duplication with centralized utilities and error handling
- Add comprehensive test coverage for all new components
- Update TODO.md with completed tasks and accurate completion dates
This commit is contained in:
2025-08-04 23:33:28 +03:00
parent 7a8dc8d2ba
commit f9823eef3e
17 changed files with 4104 additions and 82 deletions

View File

@@ -359,25 +359,14 @@ func (g *Generator) ValidateFiles(paths []string) error {
// createProgressBar creates a progress bar with the specified description.
func (g *Generator) createProgressBar(description string, paths []string) *progressbar.ProgressBar {
if len(paths) <= 1 || g.Config.Quiet {
return nil
}
return progressbar.NewOptions(len(paths),
progressbar.OptionSetDescription(description),
progressbar.OptionSetWidth(50),
progressbar.OptionShowCount(),
progressbar.OptionShowIts(),
progressbar.OptionSetTheme(progressbar.Theme{
Saucer: "=",
SaucerHead: ">",
SaucerPadding: " ",
BarStart: "[",
BarEnd: "]",
}))
progressMgr := NewProgressBarManager(g.Config.Quiet)
return progressMgr.CreateProgressBarForFiles(description, paths)
}
// finishProgressBar completes the progress bar display.
func (g *Generator) finishProgressBar(bar *progressbar.ProgressBar) {
progressMgr := NewProgressBarManager(g.Config.Quiet)
progressMgr.FinishProgressBar(bar)
if bar != nil {
fmt.Println()
}