-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
The current Telegram draft streaming (channels.telegram.streamMode) only works in private chats with topics enabled (forum topic mode), which requires message_thread_id in incoming messages. This is a Telegram Bot API constraint.
However, the primary way users interact with Clawdbot via Telegram is regular 1:1 DMs, which don't support topics. This makes the draft streaming feature effectively unusable for the main use case.
Proposal
Implement edit-based streaming as an alternative streaming mode for Telegram:
- Send an initial message with partial content (e.g., "▌" or first chunk)
- Edit the message repeatedly as more tokens arrive
- Final edit removes any cursor indicator
Suggested config
{
channels: {
telegram: {
streamMode: "edit" // new mode alongside "partial" | "block" | "off"
}
}
}Or a separate setting to decouple from draft streaming:
{
channels: {
telegram: {
editStreaming: {
enabled: true,
minChars: 50, // don't edit until buffer >= N chars
intervalMs: 500, // minimum time between edits (rate limit protection)
showCursor: true // append ▌ while generating
}
}
}
}Considerations
- Rate limits: Telegram Bot API limits
editMessageTextcalls. Need throttling (e.g., max 1 edit per 500ms or adaptive based on 429 responses). - UX: Edited messages don't trigger notifications, so this is clean for the user.
- Fallback: If edit fails (e.g., message too old, rate limited), fall back to sending final message normally.
- Compatibility: Should work in both DMs and groups.
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request