diff --git a/main.go b/main.go index b3f3d7a..3714346 100644 --- a/main.go +++ b/main.go @@ -2673,10 +2673,45 @@ func (s *appState) showBenchmarkHistory() { s.setContent(view) } +func (s *appState) showMissingDependenciesDialog(moduleID string) { + missing, _ := getModuleDependencyStatus(moduleID) + + if len(missing) == 0 { + return // No missing dependencies + } + + // Build message with missing dependencies and install commands + var message strings.Builder + message.WriteString("This module requires the following dependencies:\n\n") + + for _, depName := range missing { + if dep, ok := allDependencies[depName]; ok { + message.WriteString(fmt.Sprintf("• %s\n", dep.Name)) + if dep.InstallCmd != "" { + message.WriteString(fmt.Sprintf(" Install: %s\n\n", dep.InstallCmd)) + } + } + } + + // Create dialog + dialog.ShowInformation( + "Missing Dependencies", + message.String(), + s.window, + ) +} + func (s *appState) showModule(id string) { if id != "queue" { s.stopQueueAutoRefresh() } + + // Check if module has missing dependencies + if !isModuleAvailable(id) && id != "settings" { + s.showMissingDependenciesDialog(id) + return + } + // Track navigation history s.pushNavigationHistory(id)