mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
Auto-route Agent replies to Feishu Interactive Card (schema 2.0) when the content carries structure — JSON object / array, Markdown with code blocks or headings, or long-form prose — and keep the original text path for short plain replies. - FeishuCardFormatter: package-private detect() + render() helper - JSON object → two-column summary card - JSON array (≤4 fields) → table component; (>4 fields) → div per item - Markdown → lark_md card with 'AI 助手' header - Long text (>300 chars with paragraph breaks) → plain_text card - JSON embedded in Markdown code blocks is recognised across all fences - FeishuChannelAdapter - sendMessage() honours channel config 'card_format' (auto | always | never) - sendCard() POSTs interactive messages; ou_-prefixed targets use open_id - updateCard() PATCHes an existing message (streaming-update hook) - Tests: 32 unit cases covering every detect path and render branch Closes #141 |
||
|---|---|---|
| .. | ||
| src | ||
| Dockerfile | ||
| pom.xml | ||
| settings.xml | ||