fix(cli): defensive _slash_confirm_state access + AUTHOR_MAP

- getattr(self, '_slash_confirm_state', None) at the two read sites that
  trip object.__new__(HermesCLI) test fixtures (test_cli_external_editor,
  test_cli_skin_integration)
- _build_tui_layout_children: make slash_confirm_widget keyword-only with
  default None to avoid breaking subclassing extension hook for wrapper
  CLIs (test_cli_extension_hooks)
- AUTHOR_MAP entry for zhengyn0001

Follow-up to the salvaged commit ca1d4375a.
This commit is contained in:
Teknium1 2026-05-11 09:58:39 -07:00 committed by Teknium
parent 054f568578
commit cc9e788c14
2 changed files with 4 additions and 3 deletions

6
cli.py
View file

@ -3717,7 +3717,7 @@ class HermesCLI:
if self._command_running:
_cprint(f"{_DIM}Wait for the current command to finish before opening the editor.{_RST}")
return False
if self._sudo_state or self._secret_state or self._approval_state or self._slash_confirm_state or self._clarify_state:
if self._sudo_state or self._secret_state or self._approval_state or getattr(self, "_slash_confirm_state", None) or self._clarify_state:
_cprint(f"{_DIM}Finish the active prompt before opening the editor.{_RST}")
return False
target_buffer = buffer or getattr(app, "current_buffer", None)
@ -10774,7 +10774,7 @@ class HermesCLI:
return _state_fragment("class:sudo-prompt", "🔑")
if self._approval_state:
return _state_fragment("class:prompt-working", "")
if self._slash_confirm_state:
if getattr(self, "_slash_confirm_state", None):
return _state_fragment("class:prompt-working", "")
if self._clarify_freetext:
return _state_fragment("class:clarify-selected", "")
@ -10842,7 +10842,7 @@ class HermesCLI:
sudo_widget,
secret_widget,
approval_widget,
slash_confirm_widget,
slash_confirm_widget=None,
clarify_widget,
model_picker_widget=None,
spinner_widget=None,

View file

@ -51,6 +51,7 @@ AUTHOR_MAP = {
"teknium@nousresearch.com": "teknium1",
"piyushvp1@gmail.com": "thelumiereguy",
"harish.kukreja@gmail.com": "counterposition",
"1046611633@qq.com": "zhengyn0001",
"cleo@edaphic.xyz": "curiouscleo",
"hirokazu.ogawa@kwansei.ac.jp": "hrkzogw",
"datapod.k@gmail.com": "dandacompany",