android gateway: raise MAX_MESSAGE_LENGTH to 1M so long replies (and complete HTML artifacts) aren't chunked across fence-reopened messages — the stream consumer defaults to 4096 when the adapter sets no cap, and WS has no message-size limit

This commit is contained in:
ARIA committed 2026-08-21 00:43:42 +02:00
1 parent a8c4418aff
commit 0951ebbbce
1 file changed
+7
+7
View File
@@ -869,6 +869,13 @@ class AndroidAdapter(BasePlatformAdapter):
``MessageEvent``s for ``handle_message()``. ``MessageEvent``s for ``handle_message()``.
""" """
# WS has no message-size limit. The stream consumer resolves its per-chat
# chunking budget via ``max_message_length_for_chat`` -> this attribute
# (defaulting to 4096 when unset), which would split long replies — and
# complete HTML artifacts — across multiple fence-reopened messages. A
# large cap disables that chunking so a reply arrives as a single message.
MAX_MESSAGE_LENGTH = 1_000_000
def __init__(self, config, **kwargs): def __init__(self, config, **kwargs):
platform = Platform("android") platform = Platform("android")
super().__init__(config=config, platform=platform) super().__init__(config=config, platform=platform)