mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(honcho): hide session banner when not explicitly configured
Add explicitly_configured field to HonchoClientConfig — set when the config has a hosts.hermes block or explicit enabled flag, vs auto-enabled from a stray HONCHO_API_KEY env var. Banner only shows when this is true. Based on #1960 by @erosika, reimplemented without duplicating config parsing.
This commit is contained in:
parent
488a30e879
commit
f4a74d3ac7
2 changed files with 15 additions and 5 deletions
12
cli.py
12
cli.py
|
|
@ -165,10 +165,10 @@ def load_cli_config() -> Dict[str, Any]:
|
|||
"cwd": ".", # "." is resolved to os.getcwd() at runtime
|
||||
"timeout": 60,
|
||||
"lifetime_seconds": 300,
|
||||
"docker_image": "python:3.11",
|
||||
"docker_image": "nikolaik/python-nodejs:python3.11-nodejs20",
|
||||
"docker_forward_env": [],
|
||||
"singularity_image": "docker://python:3.11",
|
||||
"modal_image": "python:3.11",
|
||||
"singularity_image": "docker://nikolaik/python-nodejs:python3.11-nodejs20",
|
||||
"modal_image": "nikolaik/python-nodejs:python3.11-nodejs20",
|
||||
"daytona_image": "nikolaik/python-nodejs:python3.11-nodejs20",
|
||||
"docker_volumes": [], # host:container volume mounts for Docker backend
|
||||
"docker_mount_cwd_to_workspace": False, # explicit opt-in only; default off for sandbox isolation
|
||||
|
|
@ -5751,12 +5751,14 @@ class HermesCLI:
|
|||
"""Run the interactive CLI loop with persistent input at bottom."""
|
||||
self.show_banner()
|
||||
|
||||
# One-line Honcho session indicator (TTY-only, not captured by agent)
|
||||
# One-line Honcho session indicator (TTY-only, not captured by agent).
|
||||
# Only show when the user explicitly configured Honcho for Hermes
|
||||
# (not auto-enabled from a stray HONCHO_API_KEY env var).
|
||||
try:
|
||||
from honcho_integration.client import HonchoClientConfig
|
||||
from agent.display import honcho_session_line, write_tty
|
||||
hcfg = HonchoClientConfig.from_global_config()
|
||||
if hcfg.enabled and hcfg.api_key:
|
||||
if hcfg.enabled and hcfg.api_key and hcfg.explicitly_configured:
|
||||
sname = hcfg.resolve_session_name(session_id=self.session_id)
|
||||
if sname:
|
||||
write_tty(honcho_session_line(hcfg.workspace_id, sname) + "\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue