Name human_needed.py for the exit-2 stops it holds
This commit was merged in pull request #126.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from loop_claude import human
|
||||
from loop_claude import human_needed
|
||||
from loop_claude.claude_code.transcript import human_turns, read
|
||||
from loop_claude.claude_code.trust import trust
|
||||
from loop_claude.outcome import Failure, Stop
|
||||
@@ -12,7 +12,7 @@ TO = "answer the question above"
|
||||
|
||||
def interrupt(root, session_id, model, path, question, paths):
|
||||
print(f"\n{question}", file=sys.stderr)
|
||||
if stop := human.off_terminal(TO):
|
||||
if stop := human_needed.off_terminal(TO):
|
||||
return stop
|
||||
trust(paths.claude_json, checkouts(root))
|
||||
entries = read(path)
|
||||
@@ -27,5 +27,5 @@ def interrupt(root, session_id, model, path, question, paths):
|
||||
if isinstance(entries, Failure):
|
||||
return Stop(1, f"could not tell whether you typed anything: {entries.reason}")
|
||||
if human_turns(entries) <= before:
|
||||
return human.needed(TO, "the interrupt ended with nothing typed")
|
||||
return human_needed.stop(TO, "the interrupt ended with nothing typed")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user