From cc9e788c14188bb9691237472d1c8c5bcf929eeb Mon Sep 17 00:00:00 2001 From: Teknium1 <127238744+teknium1@users.noreply.github.com> Date: Mon, 11 May 2026 09:58:39 -0700 Subject: [PATCH] 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. --- cli.py | 6 +++--- scripts/release.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cli.py b/cli.py index 79bde920a23..10eb5212d01 100644 --- a/cli.py +++ b/cli.py @@ -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, diff --git a/scripts/release.py b/scripts/release.py index 3a21aac025f..706fb48385a 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -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",