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:
parent
c881209b92
commit
088d65605a
1 changed files with 4 additions and 4 deletions
|
|
@ -1360,12 +1360,12 @@ def setup_model_provider(config: dict):
|
||||||
if existing_key:
|
if existing_key:
|
||||||
print_info(f"Current: {existing_key[:8]}... (configured)")
|
print_info(f"Current: {existing_key[:8]}... (configured)")
|
||||||
if prompt_yes_no("Update API key?", False):
|
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:
|
if api_key:
|
||||||
save_env_value("OPENCODE_ZEN_API_KEY", api_key)
|
save_env_value("OPENCODE_ZEN_API_KEY", api_key)
|
||||||
print_success("OpenCode Zen API key updated")
|
print_success("OpenCode Zen API key updated")
|
||||||
else:
|
else:
|
||||||
api_key = prompt_text("OpenCode Zen API key", password=True)
|
api_key = prompt(" OpenCode Zen API key", password=True)
|
||||||
if api_key:
|
if api_key:
|
||||||
save_env_value("OPENCODE_ZEN_API_KEY", api_key)
|
save_env_value("OPENCODE_ZEN_API_KEY", api_key)
|
||||||
print_success("OpenCode Zen API key saved")
|
print_success("OpenCode Zen API key saved")
|
||||||
|
|
@ -1393,12 +1393,12 @@ def setup_model_provider(config: dict):
|
||||||
if existing_key:
|
if existing_key:
|
||||||
print_info(f"Current: {existing_key[:8]}... (configured)")
|
print_info(f"Current: {existing_key[:8]}... (configured)")
|
||||||
if prompt_yes_no("Update API key?", False):
|
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:
|
if api_key:
|
||||||
save_env_value("OPENCODE_GO_API_KEY", api_key)
|
save_env_value("OPENCODE_GO_API_KEY", api_key)
|
||||||
print_success("OpenCode Go API key updated")
|
print_success("OpenCode Go API key updated")
|
||||||
else:
|
else:
|
||||||
api_key = prompt_text("OpenCode Go API key", password=True)
|
api_key = prompt(" OpenCode Go API key", password=True)
|
||||||
if api_key:
|
if api_key:
|
||||||
save_env_value("OPENCODE_GO_API_KEY", api_key)
|
save_env_value("OPENCODE_GO_API_KEY", api_key)
|
||||||
print_success("OpenCode Go API key saved")
|
print_success("OpenCode Go API key saved")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue