fix(feishu): use JSON 2.0 interactive cards for markdown messages (fixes table rendering) - #45907
Closed
whutlichao wants to merge 1 commit into
Closed
fix(feishu): use JSON 2.0 interactive cards for markdown messages (fixes table rendering)#45907whutlichao wants to merge 1 commit into
whutlichao wants to merge 1 commit into
Conversation
…xes table rendering) Feishu post-type 'md' elements do not render markdown tables. When table content was detected, the code fell back to plain text mode (msg_type=text), losing all formatting entirely. Switch to Feishu interactive cards (msg_type=interactive) with JSON 2.0 structure so the card's "tag": "markdown" element properly renders tables, code blocks, lists, headings and all other markdown. Key changes: - Add _build_markdown_card_payload() — builds JSON 2.0 card - _build_outbound_payload() — returns interactive for markdown content - _feishu_send_with_retry() — expanded short-circuit to interactive type - send() / edit_message() — expanded fallback logic to interactive type Feishu docs: tables in markdown elements require JSON 2.0: https://open.feishu.cn/document/feishu-cards/card-json-v2-components/content-components/rich-text
Collaborator
AIalliAI
added a commit
to AIalliAI/Hermes
that referenced
this pull request
Jun 14, 2026
AIalliAI
added a commit
to AIalliAI/Hermes
that referenced
this pull request
Jun 14, 2026
3 tasks
This was referenced Jun 15, 2026
Contributor
|
Thanks for addressing a real Feishu formatting gap: current main still sends detected GFM tables as plain text at Problems
Suggested changes
Automated hermes-sweeper review. |
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.
Summary
Feishu post-type
mdelements do not render markdown tables. When table content was detected, the code fell back tomsg_type=text(plain text), losing all formatting entirely.This PR switches markdown content to Feishu interactive cards (
msg_type=interactive) using JSON 2.0 structure so the card's"tag": "markdown"element properly renders tables, code blocks, lists, headings, and all other markdown formatting.Key changes:
_build_markdown_card_payload()— builds JSON 2.0 card with a markdown element_build_outbound_payload()— returnsinteractivetype for markdown content (including tables)_feishu_send_with_retry()— expanded short-circuit tointeractivetypesend()/edit_message()— expanded fallback logic tointeractivetypeBackground
Feishu card markdown elements support tables only in JSON 2.0 structure (with
"schema": "2.0"and elements underbody.elements). See: https://open.feishu.cn/document/feishu-cards/card-json-v2-components/content-components/rich-textTesting
All 205 existing Feishu tests pass.