Name loop_claude's modules and words by what each holds, explain the reload, and tie each exit-1 clause of --help to its Stop

This commit is contained in:
2026-10-02 08:42:29 +02:00
parent dc844030fa
commit 211524196b
27 changed files with 212 additions and 165 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ class Effects:
stream_claude: typing.Callable[[list[str], str], Streaming]
class Popened:
class StreamingClaude:
def __init__(self, args: list[str], cwd: str) -> None:
self.proc = subprocess.Popen(["claude", *args], cwd=cwd, encoding="utf-8", errors="replace", stdin=subprocess.DEVNULL, stdout=subprocess.PIPE)
@@ -49,5 +49,5 @@ def system_effects() -> Effects:
on_terminal=lambda: sys.stdin.isatty() and sys.stdout.isatty(),
python=lambda args: subprocess.run([sys.executable, *args], capture_output=True, text=True),
sleep=time.sleep,
stream_claude=Popened,
stream_claude=StreamingClaude,
)