fix(photon): mark adapter as not supporting message editing to suppress streaming cursor - #62172
Closed
liuhao1024 wants to merge 1 commit into
Closed
fix(photon): mark adapter as not supporting message editing to suppress streaming cursor#62172liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
…ss streaming cursor 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 NousResearch#49253
Collaborator
Related: #49815 (open PR adding Photon to the gateway |
Contributor
|
Thanks for the focused Photon capability fix. I found no blocking issue.
Automated hermes-sweeper review. |
Contributor
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
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.
For example, "Dateien & Code — Lesen, schreiben, patchen, Git" becomes "Date ▉ ien & Code — Lesen, schreiben, patchen, Git" because the "▉" cursor character is embedded in the middle of multi-byte UTF-8 sequences.
This change sets
SUPPORTS_MESSAGE_EDITING=Falseon PhotonAdapter, which causes the gateway to suppress the streaming cursor entirely for this platform (via_effective_cursorin gateway/run.py:16695). This prevents the stale tofu square (▉) from appearing in streamed iMessage responses.The fix follows the same pattern used by Signal, BlueBubbles, WeChat, and WeCom adapters—platforms without edit support mark themselves explicitly so the gateway knows to avoid cursor-dependent streaming behavior.
Related Issue
Fixes #49253
Type of Change
Changes Made
plugins/platforms/photon/adapter.py: AddedSUPPORTS_MESSAGE_EDITING = Falseclass attribute with explanatory commenttests/plugins/platforms/photon/test_streaming.py: Added regression test to ensure the attribute remainsFalseHow to Test
pytest tests/plugins/platforms/photon/test_streaming.py -v— should pass_effective_cursor = ""for non-editing platforms)hermes photon setup— connect Photon iMessageObserved result: With this fix, streaming responses on Photon iMessage no longer leave a stale ▉ cursor in the final message.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/plugins/platforms/photon/test_streaming.py -vand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/A (no user-facing docs needed for internal attribute)cli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A