fix(feishu): render markdown tables via Schema 2.0 interactive cards - #33800
fix(feishu): render markdown tables via Schema 2.0 interactive cards#33800chengoak wants to merge 1 commit into
Conversation
|
This fix is now verified working! Feishu v1.0.39+ supports markdown tables in post+md format. Please merge this PR to fix the table rendering issue for all users. 👍 |
Feishu post-type 'md' elements do not render GFM tables, causing table content to be downgraded to plain text (raw '|' and '---'). Route table-bearing messages through a Schema 2.0 interactive card with a 'markdown' element, which natively renders tables, code blocks, and blockquotes. Also disable streaming output for Feishu so that the final interactive card is delivered as a single message rather than being edited/rendered incrementally. Fixes NousResearch#56430, related to NousResearch#9549
teknium1
left a comment
There was a problem hiding this comment.
Thanks for pursuing the Feishu table-rendering path. The current adapter still routes detected tables to plain text (plugins/platforms/feishu/adapter.py:4494), and existing interactive-card sends show that this is a compatible outbound message type (plugins/platforms/feishu/adapter.py:2029-2034).
Problems
gateway/run.py:15578in this PR assigns_streaming_enabled = Falsewithout a platform check. This is inside the proxy agent path, which derives configuration from the arbitrarysource.platform(gateway/run.py:16725-16735on current main), so it would disable streaming for every proxy-backed platform rather than just Feishu.- No tests cover the new table-to-interactive route or the platform-specific streaming behavior. Existing outbound markdown tests cover post payloads at
tests/gateway/test_feishu.py:2693-2994.
Suggested changes
- Add
if source.platform == Platform.FEISHU:around the first streaming override, matching the second hunk. - Add regression tests for the interactive Schema 2.0 payload and for preserving non-Feishu streaming.
Automated hermes-sweeper review.
| if _plat_streaming is None | ||
| else bool(_plat_streaming) | ||
| ) | ||
| # Force-disable streaming for Feishu to ensure single final message |
There was a problem hiding this comment.
This assignment is unconditional in _run_agent_via_proxy, whose source can be any gateway platform. Please guard it with if source.platform == Platform.FEISHU: as in the second streaming setup; otherwise proxy streaming is disabled globally.
Problem
Feishu post-type 'md' elements do not render GFM tables. When a reply contains a markdown table, Hermes currently falls back to msg_type text, so users see raw markdown (|, ---) instead of a rendered table.
This is the same root cause described in #9549 and reported in #56430.
Solution
Changes
Verification
Tested locally: after restarting the gateway, a Feishu message containing a markdown table is rendered as a visual table instead of raw markdown text.
Related issues