"""Runtime AI control state."""

from __future__ import annotations


AI_STATE = {
    "enabled": True,
    "thinking": False,
    "reasoning": "medium",
    "contextual": True,
}


def toggle(key: str) -> bool:
    AI_STATE[key] = not AI_STATE[key]
    return AI_STATE[key]


def set_reasoning(level: str) -> None:
    AI_STATE["reasoning"] = level
