← Back to PRs

#9505: fix: Refactor Feishu streaming to prevent truncation and simplify state

by zhangyi-extra open 2026-02-05 08:54 View on GitHub →
channel: feishu stale
<!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR refactors Feishu streaming-card updates to avoid truncation by tracking committed vs in-flight text, adds a dedup/queueing strategy for ordered updates, and tweaks message handling to commit completed blocks and close streaming without passing final text. It also adjusts Feishu media download to map audio/video to the Feishu message-resource API’s supported `type` values. <h3>Confidence Score: 4/5</h3> - Safe to merge after fixing the identified correctness issue in streaming card summaries. - Core logic changes are localized and generally consistent, but the summary calculation in `FeishuStreamingSession.close()` can now diverge from the actual final card text in the exact truncation scenario this PR targets. - src/feishu/streaming-card.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs