mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
Photon (iMessage) has no real edit API for already-sent messages. When streaming completes, the gateway attempts to edit the message to remove the streaming cursor (▉). Without edit support, this cursor gets stuck in the final message, corrupting Unicode characters. This change sets SUPPORTS_MESSAGE_EDITING=False on PhotonAdapter, which causes the gateway to suppress the streaming cursor entirely for this platform (via _effective_cursor in gateway/run.py). This prevents the stale tofu square (▉) from appearing in streamed iMessage responses. Fixes #49253
12 lines
543 B
Python
12 lines
543 B
Python
"""Regression tests for Photon adapter streaming behavior."""
|
|
from plugins.platforms.photon.adapter import PhotonAdapter
|
|
|
|
|
|
def test_photon_adapter_does_not_support_message_editing() -> None:
|
|
"""PhotonAdapter.SUPPORTS_MESSAGE_EDITING must be False.
|
|
|
|
Photon (iMessage) has no real edit API for already-sent messages.
|
|
This attribute signals the gateway to suppress the streaming cursor
|
|
instead of leaving a stale tofu square (▉) behind when edit attempts fail.
|
|
"""
|
|
assert PhotonAdapter.SUPPORTS_MESSAGE_EDITING is False
|