-
-
Notifications
You must be signed in to change notification settings - Fork 69.1k
[Bug]: Feishu streaming card content shows duplicate/appending text during streaming #33751
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
When streaming mode is enabled for Feishu channel with renderMode: "card", the streaming card content shows duplicate/appending text during streaming instead of replacing content smoothly.
Steps to reproduce
- Configure Feishu channel with
renderMode: "card"andstreaming: true - Send a message to the bot that triggers a reply
- Observe the streaming card content in Feishu client
Expected behavior
The streaming card content should be replaced smoothly with each update, showing a clean typewriter effect. Each content update should replace the previous content entirely.
Actual behavior
During streaming, the card content appears to append or show duplicate text. For example, when streaming "第1条 - 08:39:19", the card shows text like "第第1第1条第1条第1条 -第1条 - 08..." with visible duplication/appending of characters and words. The final message after streaming completes is correct, but the intermediate display is confusing.
OpenClaw version
2026.3.2
Operating system
macOS 15.3
Install method
npm global
Logs, screenshots, and evidence
Impact and severity
Affected: Feishu channel users with streaming enabled
Severity: Low-Medium (visual annoyance, doesn't block functionality)
Frequency: 100% repro with streaming card mode
Consequence: Confusing user experience during streaming, though final message is correct
Additional information
Looking at the code in streaming-card.ts, the streaming config uses:
streaming_config: { print_frequency_ms: { default: 50 }, print_step: { default: 2 } }
The print_step: 2 parameter might be causing the Feishu client to render content in a typewriter/append mode rather than replace mode.
According to Feishu CardKit documentation, the PUT API to update card content should replace content entirely. The current implementation in streaming-card.ts does use PUT correctly, but the client-side rendering behavior with print_step parameter may be causing the visual duplication effect.
Question: Is this expected behavior from Feishu's streaming card implementation, or should the streaming_config parameters be adjusted? Would setting print_step: 1 or removing it help achieve a cleaner replace effect?