diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-06 10:16:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-06 10:16:14 +0300 |
| commit | 05bddac137607102f12c1c464db34a1e10707af6 (patch) | |
| tree | 4b7b74102f78e146b17c1e73370bb0bf4c42a11a /internal/gui | |
| parent | 51a8eaf8b759d6ef93c93b3e5430954959ea2aad (diff) | |
refactor: decompose Processor god object into focused files (SRP)
Extract audio coordination (voice selection, config assembly, attribution
writing) into audio_coordinator.go, card directory management into
card_store.go, and image downloading/searcher construction into
image_downloader.go. processor.go shrinks from ~1119 to ~575 lines,
each file now has a single clear responsibility. Also apply go fmt to
all touched files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/gui')
| -rw-r--r-- | internal/gui/app.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/gui/app.go b/internal/gui/app.go index 13b3136..b66d66e 100644 --- a/internal/gui/app.go +++ b/internal/gui/app.go @@ -107,9 +107,9 @@ type Application struct { activeOpMu sync.Mutex // Mutex for activeOperations map // Injectable factory functions — replaced in tests to avoid real API calls. - newOpenAIImageClient func(*image.OpenAIConfig) promptAwareImageClient + newOpenAIImageClient func(*image.OpenAIConfig) promptAwareImageClient newNanoBananaImageClient func(*image.NanoBananaConfig) promptAwareImageClient - newAudioProvider func(*audio.Config) (audio.Provider, error) + newAudioProvider func(*audio.Config) (audio.Provider, error) } // Config holds GUI application configuration @@ -225,9 +225,9 @@ func New(config *Config) *Application { autoPlayEnabled: config.AutoPlay, // Use config setting // Production defaults for factory functions; replaced in tests. - newOpenAIImageClient: func(c *image.OpenAIConfig) promptAwareImageClient { return image.NewOpenAIClient(c) }, + newOpenAIImageClient: func(c *image.OpenAIConfig) promptAwareImageClient { return image.NewOpenAIClient(c) }, newNanoBananaImageClient: func(c *image.NanoBananaConfig) promptAwareImageClient { return image.NewNanoBananaClient(c) }, - newAudioProvider: audio.NewProvider, + newAudioProvider: audio.NewProvider, } // Initialize the word processing queue |
