MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _read_current_advisor_enabled

Function _read_current_advisor_enabled

src/command_system/builtins.py:643–656  ·  view source on GitHub ↗

Resolve the advisor master switch (reactive store preferred, settings fallback). Mirrors ``_read_current_advisor_client_mode``.

(context: CommandContext)

Source from the content-addressed store, hash-verified

641
642
643def _read_current_advisor_enabled(context: CommandContext) -> bool:
644 """Resolve the advisor master switch (reactive store preferred, settings
645 fallback). Mirrors ``_read_current_advisor_client_mode``."""
646 store = getattr(context, "app_state_store", None)
647 if store is not None:
648 try:
649 return bool(getattr(store.get_state(), "advisor_enabled", False))
650 except Exception:
651 pass
652 try:
653 from ..settings.settings import get_settings
654 return bool(getattr(get_settings(), "advisor_enabled", False))
655 except Exception:
656 return False
657
658
659def _write_advisor_enabled(context: CommandContext, value: bool) -> None:

Callers 1

advisor_command_callFunction · 0.85

Calls 2

get_settingsFunction · 0.85
get_stateMethod · 0.45

Tested by

no test coverage detected