Skip to content

The agent that grows with you

fix(buzz): pass edit content as argument

KoNit-Ke2062866eb78
diff --git a/plugins/platforms/buzz/adapter.py b/plugins/platforms/buzz/adapter.py
index 2eb5c21087d..386810b86be 100644
--- a/plugins/platforms/buzz/adapter.py
+++ b/plugins/platforms/buzz/adapter.py
@@ -864,8 +864,8 @@ class BuzzAdapter(BasePlatformAdapter):
return SendResult(success=False, error="Buzz edit needs a message id")
if not content:
return SendResult(success=False, error="Empty message")
- args = ["messages", "edit", "--event", str(message_id), "--content", "-"]
- code, out, err = await self._run_cli(args, input_text=content)
+ args = ["messages", "edit", "--event", str(message_id), "--content", content]
+ code, out, err = await self._run_cli(args)
if code != 0:
return SendResult(success=False, error=_cli_error_message(err, code), retryable=code == 2)
data = _json_or(out, {})
diff --git a/tests/gateway/test_buzz_adapter.py b/tests/gateway/test_buzz_adapter.py
index 0c732f3ba19..9d1455cbf36 100644
--- a/tests/gateway/test_buzz_adapter.py
+++ b/tests/gateway/test_buzz_adapter.py
@@ -3513,7 +3513,7 @@ class TestStandaloneSend:
class TestBuzzAdapterEdit:
@pytest.mark.asyncio
- async def test_edit_targets_the_original_event_and_uses_stdin(self):
+ async def test_edit_targets_the_original_event_and_passes_replacement_text(self):
adapter = _make_adapter()
adapter._channel_state[CHANNEL] = {"chat_type": "group", "last_ts": 0, "seen": {}}
cli = _ScriptedCli()
@@ -3526,9 +3526,9 @@ class TestBuzzAdapterEdit:
args, stdin_text = cli.calls[0]
assert args[:2] == ["messages", "edit"]
assert args[args.index("--event") + 1] == "orig1"
- # Content travels via stdin (--content -), never argv, same as send
- assert args[args.index("--content") + 1] == "-"
- assert stdin_text == "partial answer"
+ # Unlike ``messages send``, ``messages edit`` treats ``-`` literally.
+ assert args[args.index("--content") + 1] == "partial answer"
+ assert stdin_text is None
@pytest.mark.asyncio
async def test_edit_returns_the_original_id_not_the_cli_event_id(self):