INNER CODE UNIT · Python
interruptible_confirm
Dicklesworthstone/claude_code_agent_farm · claude_code_agent_farm.py:49
def interruptible_confirm(message: str, default: bool = False) -> bool:
"""Confirmation prompt that returns default on KeyboardInterrupt"""
try:
return Confirm.ask(message, default=default)
except KeyboardInterrupt:
console.print("\n[yellow]Interrupted - using default response[/yellow]")
return default
# ─────────────────────────────── Constants ────────────────────────────────── #
MONITOR_STATE_FILE = ".claude_agent_farm_state.json"
# ─────────────────────────────── Helper Functions ─────────────────────────── #