diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b61942 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +docs/.bak/ diff --git a/__init__.py b/__init__.py index df27bb4..97a540a 100644 --- a/__init__.py +++ b/__init__.py @@ -171,8 +171,9 @@ def _ensure_default_config() -> None: # Used by /sl slash command. Survives `hermes update`. columns: - - {field: last_active, width: 10, label: Active} - - {field: title, width: 42, label: Title} + - {field: last_active, width: 7, label: Active} + - {field: title, width: 28, label: Title} + - {field: model, width: 14, label: Model} - {field: message_count, width: 4, label: Msgs} - {field: cache_read_tokens, width: 6, label: Hit} - {field: input_tokens, width: 6, label: Miss} @@ -191,14 +192,18 @@ columns: def _handle_sl(raw_args: str) -> Optional[str]: """Handle /sl [limit] — show recent sessions with custom columns.""" - import yaml + try: + from hermes_yaml import safe_load as yaml_safe_load + except ImportError: + import yaml + yaml_safe_load = yaml.safe_load config_path = _hermes_home() / "session_list_config.yaml" # Load column config try: if config_path.exists(): - cfg = yaml.safe_load(config_path.read_text(encoding="utf-8")) + cfg = yaml_safe_load(config_path.read_text(encoding="utf-8")) columns = cfg.get("columns", []) else: columns = []