Skip to content

Commit 59c95b7

Browse files
dmikushinclaude
andcommitted
fix: show embedder dialog in the correct interactive branch
The embedder selection dialog was inserted in dead code (the 'not is_interactive' branch, which is never reached when stdin is a TTY). The interactive provider select happens inside the 'if is_interactive:' block (lines 316/326), so embedder_name must be set there too — before _resolve_embedder() is called on line 349. Moving the dialog to both provider-select call-sites (full and advanced mode) ensures: - embedder_name is set before _resolve_embedder() sees it - _resolve_embedder() short-circuits on a non-None flag and ignores env vars - 'Embedder: gemini' no longer appears when GEMINI_API_KEY happens to be set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2572284 commit 59c95b7

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

packages/cli/src/repowise/cli/commands/init_cmd.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ def init_command(
314314
index_only = True
315315
elif mode == "advanced":
316316
provider_name, model = interactive_provider_select(console, model, repo_path=repo_path)
317+
if embedder_name is None:
318+
from repowise.cli.ui import interactive_embedder_select
319+
embedder_name = interactive_embedder_select(console, llm_provider=provider_name)
317320
adv = interactive_advanced_config(console)
318321
commit_limit = adv["commit_limit"]
319322
follow_renames = adv["follow_renames"]
@@ -324,6 +327,9 @@ def init_command(
324327
test_run = adv["test_run"]
325328
else:
326329
provider_name, model = interactive_provider_select(console, model, repo_path=repo_path)
330+
if embedder_name is None:
331+
from repowise.cli.ui import interactive_embedder_select
332+
embedder_name = interactive_embedder_select(console, llm_provider=provider_name)
327333

328334
# Merge exclude_patterns from config.yaml and --exclude/-x flags
329335
config = load_config(repo_path)
@@ -377,13 +383,8 @@ def init_command(
377383
)
378384
else:
379385
if not is_interactive and provider_name is None and sys.stdin.isatty():
380-
from repowise.cli.ui import interactive_embedder_select as _ies
381386
from repowise.cli.ui import interactive_provider_select as _ips
382-
383387
provider_name, model = _ips(console, model)
384-
# Show embedder dialog only when not explicitly set via --embedder flag
385-
if embedder_name is None:
386-
embedder_name_resolved = _ies(console, llm_provider=provider_name)
387388

388389
provider = resolve_provider(provider_name, model, repo_path)
389390
if not is_interactive:

0 commit comments

Comments
 (0)