Spaces:
Running
Running
File size: 422 Bytes
31add3b |
1 2 3 4 5 6 7 8 9 10 |
# Utility functions for InsightFlow AI state management
from typing import Dict, Any
def toggle_direct_mode(state: Dict[str, Any]) -> None:
"""Toggles the 'direct_mode' boolean in the given state dictionary."""
if 'direct_mode' not in state:
state['direct_mode'] = True # Initialize if not present, defaulting to True after first toggle
else:
state['direct_mode'] = not state['direct_mode'] |