DM the human on Mattermost for each question, release ready to cut and exit 1 of loop-claude
CI / tests (pull_request) Successful in 2m32s
CI / tests (pull_request) Successful in 2m32s
This commit is contained in:
@@ -13,6 +13,8 @@ import time
|
||||
import typing
|
||||
import uuid
|
||||
|
||||
from mattermost_dm.dm import dm
|
||||
from failure import Failure
|
||||
from git_cli import git_repo
|
||||
from machine_load.memory import Memory, read_memory
|
||||
|
||||
@@ -44,6 +46,8 @@ class Effects:
|
||||
claude_on_terminal: typing.Callable[[list[str], str, dict[str, str]], int]
|
||||
# Drops what was typed on the terminal and not yet read.
|
||||
discard_typed: typing.Callable[[], None]
|
||||
# Sends the human a direct message on Mattermost, as `mattermost-dm` does; a Failure where it could not.
|
||||
dm: typing.Callable[[str], Failure | None]
|
||||
execv: typing.Callable[[str, list[str]], None]
|
||||
git: git_repo.Git
|
||||
input: typing.Callable[[str], str]
|
||||
@@ -80,6 +84,7 @@ def system_effects() -> Effects:
|
||||
claude=lambda args, cwd, stdin: subprocess.run(["claude", *args], capture_output=True, cwd=cwd, input=stdin, text=True),
|
||||
claude_on_terminal=claude_on_terminal,
|
||||
discard_typed=lambda: termios.tcflush(sys.stdin, termios.TCIFLUSH),
|
||||
dm=dm,
|
||||
execv=os.execv,
|
||||
git=git_repo.git,
|
||||
input=input,
|
||||
|
||||
Reference in New Issue
Block a user