Commit c26b963
fix(feishu): improve interactive card text extraction for all card formats (closes #32023)
Extend parseInteractiveCardContent() to handle additional Feishu card formats
that previously returned "[Interactive Card]" placeholder text:
- Schema 2.0 cards (body.elements) in addition to 1.0 (elements)
- New element tags: plain_text, lark_md, header (title+subtitle), note, column_set
- Legacy rich-text content (array-of-arrays with text, a, at, code_block tags)
- Top-level card.title string (some legacy formats)
- DFS traversal bounded by CARD_MAX_NODES/CARD_MAX_OUTPUT_CHARS to prevent DoS
- Sanitize extracted text to strip ANSI escapes and control chars (CWE-117)
Add tests for all new element types: schema 2.0, header, lark_md, note,
column_set, legacy array-of-arrays, and empty card fallback.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 64e6df7 commit c26b963
4 files changed
Lines changed: 51989 additions & 27 deletions
File tree
- docs/.generated
- extensions/feishu/src
- src/context-engine
0 commit comments