Name human_needed.py for the exit-2 stops it holds
This commit was merged in pull request #126.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import sys
|
||||
|
||||
from loop_claude.outcome import Stop
|
||||
|
||||
|
||||
def stop(to, but):
|
||||
return Stop(2, f"the human is needed to {to}, but {but}")
|
||||
|
||||
|
||||
def off_terminal(to):
|
||||
if sys.stdin.isatty() and sys.stdout.isatty():
|
||||
return None
|
||||
return stop(to, "stdin or stdout is not a terminal; rerun loop-claude on a terminal")
|
||||
Reference in New Issue
Block a user