fix: hermes memory status now reads actual config instead of hardcoded 'always active'

The 'Built-in: always active' label was a hardcoded string that never
reflected the user's actual configuration. It now shows three separate
indicators, each reading from the real source of truth:

  - Memory injection:  reads memory.memory_enabled from config.yaml
  - User profile:      reads memory.user_profile_enabled from config.yaml
  - Memory tool:       checks if 'memory' is in platform_toolsets.cli
                       (or defaults to enabled if no explicit list)

Before:
  Built-in:  always active

After:
  Built-in (MEMORY.md / USER.md):
    Memory injection:   disabled ✗
    User profile:       disabled ✗
    Memory tool:        disabled ✗
This commit is contained in:
Hua Jiang 2026-05-11 15:04:04 +08:00 committed by kshitij
parent 2841a9cbca
commit 4c99a44e6d

View file

@ -422,8 +422,28 @@ def cmd_status(args) -> None:
mem_config = config.get("memory", {})
provider_name = mem_config.get("provider", "")
memory_enabled = mem_config.get("memory_enabled", True)
user_profile_enabled = mem_config.get("user_profile_enabled", True)
mem_mark = "enabled ✓" if memory_enabled else "disabled ✗"
user_mark = "enabled ✓" if user_profile_enabled else "disabled ✗"
# Check if the memory toolset is enabled for the CLI platform
# platform_toolsets.cli is either None (default = all enabled) or
# an explicit list of enabled toolset names.
platform_toolsets = config.get("platform_toolsets", {}) or {}
cli_toolsets = platform_toolsets.get("cli")
memory_tool_enabled = (
cli_toolsets is None
or (isinstance(cli_toolsets, list) and "memory" in cli_toolsets)
)
tool_mark = "enabled ✓" if memory_tool_enabled else "disabled ✗"
print("\nMemory status\n" + "" * 40)
print(" Built-in: always active")
print(" Built-in (MEMORY.md / USER.md):")
print(f" Memory injection: {mem_mark}")
print(f" User profile: {user_mark}")
print(f" Memory tool: {tool_mark}")
print(f" Provider: {provider_name or '(none — built-in only)'}")
providers = _get_available_providers()