refactor(hermes_cli): join short wrapped statements; drop unused Optional import

This commit is contained in:
Teknium
2026-09-02 20:24:29 -07:00
parent 031bfc53e2
commit d719716cb8
3 changed files with 4 additions and 12 deletions
+1 -4
View File
@@ -102,10 +102,7 @@ def summarize_compress_preview(
f"({len(tail)} message(s)) verbatim."
)
elif partial:
lines.append(
"Boundary: 'here' split would keep everything — "
"falling back to full compression."
)
lines.append("Boundary: 'here' split would keep everything — falling back to full compression.")
if focus_topic:
lines.append(f'Focus topic: "{focus_topic}"')
lines.append("Run the command again without --preview to apply.")
+1 -3
View File
@@ -101,9 +101,7 @@ def resolve_personality(value: Any, cfg: Optional[Dict[str, Any]] = None) -> Tup
personalities = available_personalities(cfg)
if name not in personalities:
names = ", ".join(f"`{n}`" for n in sorted(personalities))
raise ValueError(
f"Unknown personality: `{str(value).strip()}`.\n\nAvailable: `none`, {names}"
)
raise ValueError(f"Unknown personality: `{str(value).strip()}`.\n\nAvailable: `none`, {names}")
return name, render_personality_prompt(personalities[name])
+2 -5
View File
@@ -7,7 +7,7 @@ Every verb returns a structured result dict — ``{"ok": True, ...}`` on success
from __future__ import annotations
import logging
from typing import Any, Dict, Optional
from typing import Any, Dict
logger = logging.getLogger(__name__)
@@ -90,10 +90,7 @@ class PlatformActions:
return plugin_capability_granted(self._plugin_id, CAPABILITY_ID)
except Exception:
# Ground rule: failure to read consent state = not granted.
logger.debug(
"platform_actions capability check failed for %s",
self._plugin_id, exc_info=True,
)
logger.debug("platform_actions capability check failed for %s", self._plugin_id, exc_info=True)
return False
def _resolve_adapter(self, platform: str):