Skip to content

The agent that grows with you

fix(photon): mark adapter as not supporting message editing to suppress streaming cursor

liuhao102421264c43432a
diff --git a/plugins/platforms/photon/adapter.py b/plugins/platforms/photon/adapter.py
index 245aab8b2a8..808727b80c5 100644
--- a/plugins/platforms/photon/adapter.py
+++ b/plugins/platforms/photon/adapter.py
@@ -280,6 +280,10 @@ class PhotonAdapter(BasePlatformAdapter):
"""
MAX_MESSAGE_LENGTH = _MAX_MESSAGE_LENGTH
+ # Photon (iMessage) has no real edit API for already-sent messages.
+ # Mark it explicitly so streaming suppresses the visible cursor instead
+ # of leaving a stale tofu square (▉) behind when edit attempts fail.
+ SUPPORTS_MESSAGE_EDITING = False
def __init__(self, config: PlatformConfig):
super().__init__(config, Platform("photon"))
diff --git a/tests/plugins/platforms/photon/test_streaming.py b/tests/plugins/platforms/photon/test_streaming.py
new file mode 100644
index 00000000000..e27069c12e9
--- /dev/null
+++ b/tests/plugins/platforms/photon/test_streaming.py
@@ -0,0 +1,12 @@
+"""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