Skip to content

[Feature Request] Feishu: Support Card rendering for non-streaming + fix streaming truncation #13267

@cheqianyi

Description

@cheqianyi

Summary

Two related feature requests for the Feishu plugin:

  1. Support Card rendering in non-streaming mode - Allow rich formatting (tables, code blocks) without requiring streaming
  2. Fix streaming mode truncation - Handle long content gracefully in streaming mode

Current Behavior

Mode Message Type Formatting Long Content
Streaming Interactive Card (白底) ✅ Rich (Markdown, tables, code) ❌ Truncated (~30KB limit)
Non-streaming Plain Text (灰底) ❌ No formatting ✅ Auto-chunked

Users must choose between good formatting OR complete content, but cannot have both.

Problem Details

1. Non-streaming lacks Card support

  • sendMessageFeishu() uses msg_type: "text"
  • No option to use msg_type: "interactive" for Card rendering
  • Tables and code blocks display poorly as plain text

2. Streaming truncates long content

  • Streaming uses Feishu CardKit API with ~30KB size limit
  • Content beyond the limit is silently truncated
  • No automatic chunking or continuation to new cards

Proposed Solutions

Solution 1: Add renderMode config

{
  "channels": {
    "feishu": {
      "renderMode": "auto" | "raw" | "card"
    }
  }
}
  • auto (default): Card for messages with code/tables, text otherwise
  • raw: Always plain text
  • card: Always interactive card

Solution 2: Handle streaming overflow

When streaming content approaches the size limit:

  • Close current card gracefully
  • Create a new card to continue
  • Or fall back to chunked text messages

Environment

  • OpenClaw version: 2026.2.2-3
  • Feishu plugin: @openclaw/feishu (official)

Related

Third-party plugin @noah-claw/feishu already supports renderMode, showing this is technically feasible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions