Skip to content

feat: streaming draft responses via sendMessageDraft#146

Open
Fr4nzz wants to merge 1 commit intoRichardAtCT:mainfrom
Fr4nzz:feat/streaming-draft-responses
Open

feat: streaming draft responses via sendMessageDraft#146
Fr4nzz wants to merge 1 commit intoRichardAtCT:mainfrom
Fr4nzz:feat/streaming-draft-responses

Conversation

@Fr4nzz
Copy link

@Fr4nzz Fr4nzz commented Mar 15, 2026

Summary

  • Rewrite DraftStreamer to support both sendMessageDraft (private chats) and editMessageText (group chat fallback)
  • Add cursor during streaming for visual typing feedback (like OpenClaw)
  • Minimum 20 chars before first draft send (avoids triggering push notifications with fragments)
  • Anti-regressive updates: skip edits where text got shorter
  • Smart error classification: distinguish draft-unavailable, message-not-modified, message-deleted
  • Self-disabling after 3 consecutive errors
  • Add ENABLE_STREAM_DRAFTS and STREAM_DRAFT_INTERVAL config options
  • Support verbose level 3 (full command output)

Test plan

  • Enable ENABLE_STREAM_DRAFTS=true and send a text prompt
  • Verify response text streams token-by-token with cursor ▌
  • Verify cursor disappears when response is finalized
  • Test in group chat: should fall back to editMessageText
  • Verify no draft sent before 20 characters accumulated

🤖 Generated with Claude Code

- Rewrite DraftStreamer with group chat fallback (editMessageText)
- Add cursor ▌ during streaming for visual feedback
- Min initial chars gate (20 chars before first send)
- Anti-regressive updates (skip if text got shorter)
- Smart error classification (draft unavailable → edit fallback)
- Support verbose level 3 (full tool output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant