fix(tui): rebind extracted config handler to shared indicator constants

The salvaged commit renamed server.py's private _INDICATOR_STYLES/_INDICATOR_DEFAULT
to the shared hermes_constants imports, but methods_config.py (extracted after the
original PR was authored) still referenced the old private names through the
server-globals rebinding. Import the shared constants directly.
This commit is contained in:
Teknium 2026-07-31 22:19:25 -07:00
parent cc0146f2de
commit 484e451cb5
1 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,8 @@ are rebound onto server.py's globals at install time — see method_ctx.py.
from .method_ctx import HandlerRegistry
from hermes_constants import DEFAULT_INDICATOR_STYLE, INDICATOR_STYLES
_registry = HandlerRegistry()
method = _registry.method
_profile_scoped = _registry.profile_scoped
@ -198,13 +200,13 @@ def _(rid, params: dict) -> dict:
# Normalize so a hand-edited config.yaml with stray casing or
# an unknown value reads back the SAME value the TUI actually
# rendered (frontend's `normalizeIndicatorStyle` falls back to
# `_INDICATOR_DEFAULT` for the same inputs). Otherwise
# `DEFAULT_INDICATOR_STYLE` for the same inputs). Otherwise
# `/indicator` would print one thing while the UI shows another.
raw = (_load_cfg().get("display") or {}).get("tui_status_indicator", "")
norm = str(raw).strip().lower()
return _ok(
rid,
{"value": norm if norm in _INDICATOR_STYLES else _INDICATOR_DEFAULT},
{"value": norm if norm in INDICATOR_STYLES else DEFAULT_INDICATOR_STYLE},
)
if key == "personality":
return _ok(