mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-23 05:31:23 +00:00
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:
parent
054f568578
commit
cc9e788c14
2 changed files with 4 additions and 3 deletions
6
cli.py
6
cli.py
|
|
@ -3717,7 +3717,7 @@ class HermesCLI:
|
||||||
if self._command_running:
|
if self._command_running:
|
||||||
_cprint(f"{_DIM}Wait for the current command to finish before opening the editor.{_RST}")
|
_cprint(f"{_DIM}Wait for the current command to finish before opening the editor.{_RST}")
|
||||||
return False
|
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}")
|
_cprint(f"{_DIM}Finish the active prompt before opening the editor.{_RST}")
|
||||||
return False
|
return False
|
||||||
target_buffer = buffer or getattr(app, "current_buffer", None)
|
target_buffer = buffer or getattr(app, "current_buffer", None)
|
||||||
|
|
@ -10774,7 +10774,7 @@ class HermesCLI:
|
||||||
return _state_fragment("class:sudo-prompt", "🔑")
|
return _state_fragment("class:sudo-prompt", "🔑")
|
||||||
if self._approval_state:
|
if self._approval_state:
|
||||||
return _state_fragment("class:prompt-working", "⚠")
|
return _state_fragment("class:prompt-working", "⚠")
|
||||||
if self._slash_confirm_state:
|
if getattr(self, "_slash_confirm_state", None):
|
||||||
return _state_fragment("class:prompt-working", "⚠")
|
return _state_fragment("class:prompt-working", "⚠")
|
||||||
if self._clarify_freetext:
|
if self._clarify_freetext:
|
||||||
return _state_fragment("class:clarify-selected", "✎")
|
return _state_fragment("class:clarify-selected", "✎")
|
||||||
|
|
@ -10842,7 +10842,7 @@ class HermesCLI:
|
||||||
sudo_widget,
|
sudo_widget,
|
||||||
secret_widget,
|
secret_widget,
|
||||||
approval_widget,
|
approval_widget,
|
||||||
slash_confirm_widget,
|
slash_confirm_widget=None,
|
||||||
clarify_widget,
|
clarify_widget,
|
||||||
model_picker_widget=None,
|
model_picker_widget=None,
|
||||||
spinner_widget=None,
|
spinner_widget=None,
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ AUTHOR_MAP = {
|
||||||
"teknium@nousresearch.com": "teknium1",
|
"teknium@nousresearch.com": "teknium1",
|
||||||
"piyushvp1@gmail.com": "thelumiereguy",
|
"piyushvp1@gmail.com": "thelumiereguy",
|
||||||
"harish.kukreja@gmail.com": "counterposition",
|
"harish.kukreja@gmail.com": "counterposition",
|
||||||
|
"1046611633@qq.com": "zhengyn0001",
|
||||||
"cleo@edaphic.xyz": "curiouscleo",
|
"cleo@edaphic.xyz": "curiouscleo",
|
||||||
"hirokazu.ogawa@kwansei.ac.jp": "hrkzogw",
|
"hirokazu.ogawa@kwansei.ac.jp": "hrkzogw",
|
||||||
"datapod.k@gmail.com": "dandacompany",
|
"datapod.k@gmail.com": "dandacompany",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue