fix(gateway/feishu): migrate markdown rendering to CardKit 2.0 interactive cards#23494
Open
hyhy111 wants to merge 1 commit into
Open
fix(gateway/feishu): migrate markdown rendering to CardKit 2.0 interactive cards#23494hyhy111 wants to merge 1 commit into
hyhy111 wants to merge 1 commit into
Conversation
…ctive cards Feishu recently stopped rendering markdown markup inside the legacy post message type's md tag. This caused all markdown content (tables, bold, code blocks, etc.) to be displayed as raw source text unless the user tapped to open a detail view. This commit replaces the post path with CardKit 2.0's interactive message type using the tag: markdown component, which natively supports standard GFM syntax and renders correctly on both desktop and mobile Feishu clients. Changes: - _build_outbound_payload: route markdown content to _build_cardkit_markdown_payload returning interactive type - _build_cardkit_markdown_payload: split content into sections and build a CardKit 2.0 card with markdown elements (max 10) - Update fallback logic in _feishu_send_with_retry to handle both post and interactive failures, falling back to plain text Fixes: markdown tables appearing blank; general markdown not rendering. Related: PR NousResearch#7085 (closed, unmerged).
This was referenced May 15, 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.
Problem
Feishu recently stopped rendering markdown markup inside the legacy post message type's md tag. This caused all markdown content (tables, bold, code blocks, etc.) to be displayed as raw source text unless the user tapped to open a detail view.
Solution
Replace the post path with CardKit 2.0's interactive message type using the tag: "markdown" component, which natively supports standard GFM syntax and renders correctly on both desktop and mobile Feishu clients.
Changes
Fixes
Related: PR #7085 (closed, unmerged)
Testing