mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(matrix): skip cursor-only stream placeholder messages
This commit is contained in:
parent
b27eaaa4db
commit
0ffb6f2dae
2 changed files with 23 additions and 0 deletions
|
|
@ -139,6 +139,22 @@ class TestSendOrEditMediaStripping:
|
|||
|
||||
adapter.send.assert_not_called()
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_cursor_only_update_skips_send(self):
|
||||
"""A bare streaming cursor should not be sent as its own message."""
|
||||
adapter = MagicMock()
|
||||
adapter.send = AsyncMock()
|
||||
adapter.MAX_MESSAGE_LENGTH = 4096
|
||||
|
||||
consumer = GatewayStreamConsumer(
|
||||
adapter,
|
||||
"chat_123",
|
||||
StreamConsumerConfig(cursor=" ▉"),
|
||||
)
|
||||
await consumer._send_or_edit(" ▉")
|
||||
|
||||
adapter.send.assert_not_called()
|
||||
|
||||
|
||||
# ── Integration: full stream run ─────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue