From 3ab50d7ddb480b606aeb552186fbfa25ef589d59 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 2 Sep 2026 22:43:12 -0700 Subject: [PATCH 1/2] =?UTF-8?q?refactor(hermes=5Fcli):=20commands=5Fcomple?= =?UTF-8?q?tion=20=E2=80=94=20drop=20unreferenced=20staticmethod=20re-expo?= =?UTF-8?q?rts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hermes_cli/commands_completion.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hermes_cli/commands_completion.py b/hermes_cli/commands_completion.py index 55420dceff..a68116fd20 100644 --- a/hermes_cli/commands_completion.py +++ b/hermes_cli/commands_completion.py @@ -294,14 +294,9 @@ class SlashCommandCompleter(Completer): # Module-level helpers exposed as staticmethods for existing callers/tests. _extract_path_word = staticmethod(_extract_path_word) - _dir_completions = staticmethod(_dir_completions) _path_completions = staticmethod(_path_completions) - _score_path = staticmethod(_score_path) - _skin_completions = staticmethod(_skin_completions) _personality_completions = staticmethod(_personality_completions) _tools_completions = staticmethod(_tools_completions) - _handoff_completions = staticmethod(_handoff_completions) - _DYNAMIC_COMPLETIONS = _DYNAMIC_COMPLETIONS def __init__( self, From e1a22b7845fe03e71e5abcea38200153b60f6f11 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 2 Sep 2026 22:52:11 -0700 Subject: [PATCH 2/2] =?UTF-8?q?refactor(hermes=5Fcli):=20group=20C=20?= =?UTF-8?q?=E2=80=94=20pack=20short=20keyword-argument=20lists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hermes_cli/commands_completion.py | 13 ++++--------- hermes_cli/console_engine.py | 8 ++------ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/hermes_cli/commands_completion.py b/hermes_cli/commands_completion.py index a68116fd20..3bd19dff05 100644 --- a/hermes_cli/commands_completion.py +++ b/hermes_cli/commands_completion.py @@ -233,9 +233,7 @@ def _dir_completions( break suffix = "/" if is_dir else "" yield Completion( - text_for(full_path) + suffix, - start_position=-len(word), - display=entry + suffix, + text_for(full_path) + suffix, start_position=-len(word), display=entry + suffix, display_meta="dir" if is_dir else _file_size_label(full_path)) count += 1 @@ -398,8 +396,7 @@ class SlashCommandCompleter(Completer): expanded = "./" # `@folder:` = dirs only, `@file:` = files only (else `@folder:` lists dotfiles). yield from _dir_completions( - expanded, word, limit, - lambda fp: f"{prefix}{os.path.relpath(fp)}", + expanded, word, limit, lambda fp: f"{prefix}{os.path.relpath(fp)}", want_dir=(prefix == "@folder:")) return @@ -489,10 +486,8 @@ class SlashCommandCompleter(Completer): def _cmd_completion(cmd_name: str, meta: str): return Completion( - self._completion_text(cmd_name, word), - start_position=-len(word), - display=f"/{cmd_name}", - display_meta=meta) + self._completion_text(cmd_name, word), start_position=-len(word), + display=f"/{cmd_name}", display_meta=meta) for cmd, desc in COMMANDS.items(): if self._command_allowed(cmd) and cmd[1:].startswith(word): diff --git a/hermes_cli/console_engine.py b/hermes_cli/console_engine.py index 13fb29a6a8..448045e832 100644 --- a/hermes_cli/console_engine.py +++ b/hermes_cli/console_engine.py @@ -352,12 +352,8 @@ def _register_command_family( return _dispatch(surface, root, fixed, args, namespace_update) engine.register( - full_path, - usage, - summaries.get(full_path) or f"Run `hermes {usage}`.", - handler, - mutating=mutating, - confirmation=f"Run `hermes {usage}`?") + full_path, usage, summaries.get(full_path) or f"Run `hermes {usage}`.", handler, + mutating=mutating, confirmation=f"Run `hermes {usage}`?") _BLOCKED_TOP = frozenset(