Skip to content

fix(send_message): 钉钉 standalone Markdown + 飞书表格渲染 / DingTalk markdown + Feishu tables#39510

Open
WenhuaXia wants to merge 3 commits into
NousResearch:mainfrom
WenhuaXia:fix/dingtalk-markdown-webhook-v2
Open

fix(send_message): 钉钉 standalone Markdown + 飞书表格渲染 / DingTalk markdown + Feishu tables#39510
WenhuaXia wants to merge 3 commits into
NousResearch:mainfrom
WenhuaXia:fix/dingtalk-markdown-webhook-v2

Conversation

@WenhuaXia

Copy link
Copy Markdown

Summary

钉钉 / DingTalk

  • standalone delivery 从 msgtype: text 改为 msgtype: markdown
  • 被 API 拒绝时 fallback 到纯文本
  • 与 live DingTalk adapter 行为对齐,表格等 markdown 可正常渲染

飞书 / Feishu

  • 移除 _MARKDOWN_TABLE_RE workaround(历史代码强制表格降级为纯文本)
  • _MARKDOWN_HINT_RE 中添加 (^\\s*\\|) 表格检测,使表格路由到 post markdown 管道
  • 飞书已原生支持 post markdown 中的表格,该 workaround 已无需保留

Root Cause

Platform Problem Fix
DingTalk standalone delivery used msgtype: text, tables rendered as raw pipes Switch to msgtype: markdown with text fallback
Feishu _MARKDOWN_TABLE_RE forced tables to plain text as historical workaround Remove workaround; Feishu now natively supports tables in post markdown

References

Changes

  • tools/send_message_tool.py: markdown msgtype for DingTalk standalone delivery (+fallback)
  • gateway/platforms/feishu.py: remove table force-text workaround, add table detection to markdown hint regex

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery platform/dingtalk DingTalk adapter platform/feishu Feishu / Lark adapter labels Jun 5, 2026
@WenhuaXia WenhuaXia force-pushed the fix/dingtalk-markdown-webhook-v2 branch from dd41896 to c0b8f1d Compare June 6, 2026 14:31
WenhuaXia added 3 commits June 6, 2026 22:54
- 钉钉: send_message_tool standalone delivery 从 text 改为 markdown,
  被拒绝时 fallback 到纯文本, 与 live adapter 对齐
- 飞书: 移除 _MARKDOWN_TABLE_RE workaround, 表格走 post markdown 管道
  (飞书已原生支持表格). 修复 fallback 路径保留原始 markdown
  而非 _strip_markdown_to_plain_text

Refs: NousResearch#37345 (dingtalk PR), NousResearch#27922 (feishu PR)
The previous (\|.*\|) pattern was too broad - it would match any line
containing pipes, causing false positives. The correct pattern from PR
NousResearch#27922 is (^\s*\|) which only matches lines starting with | (table cells).

Refs: NousResearch#27922
The patch tool had introduced double-escaped backslashes (\\ instead of \),
causing FutureWarning on Python 3.12+. Corrected to single backslashes
matching the original file encoding.

Refs: NousResearch#39510
@WenhuaXia WenhuaXia force-pushed the fix/dingtalk-markdown-webhook-v2 branch from c0b8f1d to f6e24a1 Compare June 6, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/dingtalk DingTalk adapter platform/feishu Feishu / Lark adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants