12 lines
301 B
Python
12 lines
301 B
Python
from loop_claude.outcome import Stop
|
|
|
|
|
|
def stop(to, but) -> Stop:
|
|
return Stop(2, f"the human is needed to {to}, but {but}")
|
|
|
|
|
|
def off_terminal(to, on_terminal: bool) -> Stop | None:
|
|
if on_terminal:
|
|
return None
|
|
return stop(to, "stdin or stdout is not a terminal; rerun loop-claude on a terminal")
|