fix: NameError in OpenCode provider setup (prompt_text -> prompt) (#1779)

The OpenCode Zen and OpenCode Go setup sections used prompt_text()
which is undefined. All other providers correctly use the local
prompt() function defined in setup.py. Fixes crash during
'hermes setup' when selecting either OpenCode provider.
This commit is contained in:
Teknium
2026-03-17 10:30:16 -07:00
committed by GitHub
parent c881209b92
commit 088d65605a

View File

@@ -1360,12 +1360,12 @@ def setup_model_provider(config: dict):
if existing_key:
print_info(f"Current: {existing_key[:8]}... (configured)")
if prompt_yes_no("Update API key?", False):
api_key = prompt_text("OpenCode Zen API key", password=True)
api_key = prompt(" OpenCode Zen API key", password=True)
if api_key:
save_env_value("OPENCODE_ZEN_API_KEY", api_key)
print_success("OpenCode Zen API key updated")
else:
api_key = prompt_text("OpenCode Zen API key", password=True)
api_key = prompt(" OpenCode Zen API key", password=True)
if api_key:
save_env_value("OPENCODE_ZEN_API_KEY", api_key)
print_success("OpenCode Zen API key saved")
@@ -1393,12 +1393,12 @@ def setup_model_provider(config: dict):
if existing_key:
print_info(f"Current: {existing_key[:8]}... (configured)")
if prompt_yes_no("Update API key?", False):
api_key = prompt_text("OpenCode Go API key", password=True)
api_key = prompt(" OpenCode Go API key", password=True)
if api_key:
save_env_value("OPENCODE_GO_API_KEY", api_key)
print_success("OpenCode Go API key updated")
else:
api_key = prompt_text("OpenCode Go API key", password=True)
api_key = prompt(" OpenCode Go API key", password=True)
if api_key:
save_env_value("OPENCODE_GO_API_KEY", api_key)
print_success("OpenCode Go API key saved")