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

Function _current_mode

src/server/agent_server.py:1754–1758  ·  view source on GitHub ↗
(tool_context: Any, default: str)

Source from the content-addressed store, hash-verified

1752
1753
1754def _current_mode(tool_context: Any, default: str) -> str:
1755 if tool_context is None:
1756 return default
1757 pc = getattr(tool_context, "permission_context", None)
1758 return getattr(pc, "mode", default) if pc is not None else default
1759
1760
1761def _set_mode(tool_context: Any, mode: str) -> None:

Callers 2

emit_initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected