diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-02 22:18:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-02 22:18:09 +0300 |
| commit | 373a10660bdd1faf27d22073380e5e897870ab12 (patch) | |
| tree | 3d1e8a8b375aa509c0b4b2b540058cc3a4b3e200 /internal/processor/processor_test.go | |
| parent | bd23c3f3e53bced44b5ecf0b0c6a74a3cc2f9875 (diff) | |
task zy: move GUI application launch out of Processor into cmd/main.go [SoC]
Replace Processor.RunGUIMode() with a standalone runGUIMode() function in
the composition root (cmd/main.go) that calls proc.GUIConfig() to get the
GUI settings and then owns the gui.New()/Run() lifecycle. The processor
package still imports gui for the gui.Config return type; complete removal
of that import is deferred to task 000 (god-object decomposition) where
the Processor itself will be split up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/processor/processor_test.go')
| -rw-r--r-- | internal/processor/processor_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/processor/processor_test.go b/internal/processor/processor_test.go index db03266..cfa4545 100644 --- a/internal/processor/processor_test.go +++ b/internal/processor/processor_test.go @@ -274,7 +274,7 @@ func TestGUIConfigForRunModeUsesNanoBananaDefaultWhenImageAPIIsNotSpecified(t *t flags.ImageAPISpecified = false p := NewProcessor(flags) - guiConfig := p.guiConfigForRunMode() + guiConfig := p.GUIConfig() if guiConfig.ImageProvider != gui.DefaultConfig().ImageProvider { t.Fatalf("guiConfig.ImageProvider = %q, want GUI default %q", guiConfig.ImageProvider, gui.DefaultConfig().ImageProvider) } @@ -314,7 +314,7 @@ func TestGUIConfigForRunModeHonorsExplicitImageAPI(t *testing.T) { flags.ImageAPISpecified = true p := NewProcessor(flags) - guiConfig := p.guiConfigForRunMode() + guiConfig := p.GUIConfig() if guiConfig.ImageProvider != "openai" { t.Fatalf("guiConfig.ImageProvider = %q, want %q", guiConfig.ImageProvider, "openai") } @@ -348,7 +348,7 @@ func TestGUIConfigForRunModeHonorsExplicitNanoBananaModelFlags(t *testing.T) { flags.NanoBananaTextModelSpecified = true p := NewProcessor(flags) - guiConfig := p.guiConfigForRunMode() + guiConfig := p.GUIConfig() if guiConfig.NanoBananaModel != "flag-image-model" { t.Fatalf("guiConfig.NanoBananaModel = %q, want %q", guiConfig.NanoBananaModel, "flag-image-model") } @@ -1218,7 +1218,7 @@ func TestDownloadImagesWithTranslationUsesNanoBananaConfigAndSavesPrompt(t *test originalConstructor := newNanoBananaImageClient stubSearcher := &stubImageSearcher{} capturedConfig := new(image.NanoBananaConfig) - newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageSearcher { + newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageClient { *capturedConfig = *config return stubSearcher } @@ -1274,7 +1274,7 @@ func TestDownloadImagesWithTranslationPersistsPromptWhenDownloadFails(t *testing originalConstructor := newNanoBananaImageClient stubSearcher := &stubImageSearcher{downloadErr: errors.New("download failed")} - newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageSearcher { + newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageClient { return stubSearcher } t.Cleanup(func() { @@ -1323,7 +1323,7 @@ func TestDownloadImagesWithTranslationUsesConfiguredNanoBananaWhenImageAPINotSpe originalConstructor := newNanoBananaImageClient stubSearcher := &stubImageSearcher{} capturedConfig := new(image.NanoBananaConfig) - newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageSearcher { + newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageClient { *capturedConfig = *config return stubSearcher } @@ -1429,7 +1429,7 @@ func TestNewNanoBananaImageSearcherExplicitDefaultWinsOverConfig(t *testing.T) { originalConstructor := newNanoBananaImageClient capturedConfig := new(image.NanoBananaConfig) - newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageSearcher { + newNanoBananaImageClient = func(config *image.NanoBananaConfig) image.ImageClient { *capturedConfig = *config return &stubImageSearcher{} } |
