#12755: feat(feishu): render post rich text as markdown
channel: feishu
stale
Cluster:
Feishu Streaming Enhancements
## Summary\n- Parse Feishu inbound msg_type=post into Markdown (preserve styles/links/mentions, insert image placeholders).\n- Support locale-wrapped post payloads.\n- Add unit tests for post parsing.\n\n## Testing\n- corepack pnpm vitest --config vitest.extensions.config.ts --run
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR refactors Feishu inbound `msg_type=post` handling by moving rich-text post parsing into a dedicated `parsePostContent()` helper (`extensions/feishu/src/post.ts`) that renders post payloads to Markdown (styles, links, mentions, image placeholders) and supports locale-wrapped payload shapes. `extensions/feishu/src/bot.ts` is updated to use that parser both for extracting message text and for collecting embedded image keys for media downloads, and `extensions/feishu/src/post.test.ts` adds unit coverage for the markdown rendering and wrapper formats.
<h3>Confidence Score: 3/5</h3>
- This PR is close to mergeable but has a couple of correctness issues that can break parsing/rendering in real messages.
- Most changes are isolated to Feishu post parsing with tests, but (1) `post` message parsing can now throw on malformed JSON and break inbound handling, and (2) markdown link rendering will mis-handle valid URLs containing `)` because the href is inserted unescaped into the link destination.
- extensions/feishu/src/bot.ts and extensions/feishu/src/post.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#21786: feat(feishu): extract embedded video/media from post (rich text) me...
by laopuhuluwa · 2026-02-20
80.3%
#13917: fix(feishu): card rendering for tables, blockquotes, images, and ou...
by yaoting · 2026-02-11
80.2%
#10675: feat(feishu): add audio message support and fix file upload
by YumoeZhung · 2026-02-06
77.0%
#14402: fix(feishu): chunk large documents for write/append to avoid API 40...
by lml2468 · 2026-02-12
76.1%
#16123: Feishu card default
by QiuYi111 · 2026-02-14
75.4%
#16592: feat(feishu): add write mode import for markdown documents
by ciberponk · 2026-02-14
73.4%
#13669: feat(feishu): add audio message support
by AGI-XiaoBai-No1 · 2026-02-10
73.4%
#15351: feat(feishu): Add native audio message support (voice bubble)
by lovejing0306 · 2026-02-13
73.0%
#21781: feat(feishu): resolve merge_forward, enrich quoted message parsing,...
by laopuhuluwa · 2026-02-20
72.7%
#14674: feat(feishu): add feishu_chat tool for chat info/member queries
by liuweifly · 2026-02-12
72.3%