feat(feishu): render native tables using Interactive Card JSON 2.0 - #30928
Open
haojibb-beep wants to merge 1 commit into
Open
feat(feishu): render native tables using Interactive Card JSON 2.0#30928haojibb-beep wants to merge 1 commit into
haojibb-beep wants to merge 1 commit into
Conversation
- Parse markdown tables from outbound messages. - Convert to Feishu Interactive Card (JSON 2.0) with 'table' component. - Supports native rendering with grey headers, rounded corners, and auto-width. - Fallback to standard post/text if parsing fails.
Collaborator
14 tasks
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for pursuing native Feishu table rendering; current main still falls back to raw text for detected tables in plugins/platforms/feishu/adapter.py:4524-4534.
Problems
- The PR targets
gateway/platforms/feishu.py, but current main relocated the live adapter toplugins/platforms/feishu/adapter.pyin560010547. A salvage must port the change to that plugin surface. - The multi-table branch drops prose between tables.
_parse_markdown_tablesrecords each table'spre_text(gateway/platforms/feishu.py:173-194), but the builder emits onlytables[0]before looping atgateway/platforms/feishu.py:272-275. - The PR contains no tests despite changing outbound message construction.
Suggested changes
- Port the implementation to the current plugin adapter and model output as ordered text/table segments.
- Emit each table's preceding text segment, then add regression tests for single, mixed, and multi-table content.
Automated hermes-sweeper review.
| first_pre = tables[0]["pre_text"].strip() | ||
| if first_pre: | ||
| elements.append({"tag": "markdown", "content": first_pre}) | ||
| for t in tables: |
Contributor
There was a problem hiding this comment.
_parse_markdown_tables() stores pre_text for every table, but this branch emits only tables[0] before this loop. Any prose between table 1 and table 2 is therefore lost; emit each non-empty t["pre_text"] before its corresponding table.
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.
Improve Feishu table rendering using Interactive Card JSON 2.0 component.