zeroclaw/src
Xiangjun Ma 118cd53922 feat(channel): stream LLM responses to Telegram via draft message edits
Wire the existing provider-layer streaming infrastructure through the
channel trait and agent loop so Telegram users see tokens arrive
progressively via editMessageText, instead of waiting for the full
response.

Changes:
- Add StreamMode enum (off/partial/block) and draft_update_interval_ms
  to TelegramConfig (backward-compatible defaults: off, 1000ms)
- Add supports_draft_updates/send_draft/update_draft/finalize_draft to
  Channel trait with no-op defaults (zero impact on existing channels)
- Implement draft methods on TelegramChannel using sendMessage +
  editMessageText with rate limiting and Markdown fallback
- Add on_delta mpsc::Sender<String> parameter to run_tool_call_loop
  (None preserves existing behavior)
- Wire streaming in process_channel_message: when channel supports
  drafts, send initial draft, spawn updater task, finalize on completion

Edge cases handled:
- 4096-char limit: finalize draft and fall back to chunked send
- Broken Markdown: use no parse_mode during streaming, apply on finalize
- Edit failures: fall back to sending complete response as new message
- Rate limiting: configurable draft_update_interval_ms (default 1s)
2026-02-18 16:33:33 +08:00
..
agent feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
approval refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
auth fix(auth): rebase PR #200 onto main and restore auth CLI flow 2026-02-18 12:57:44 +08:00
channels feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
config feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
cost refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
cron feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
daemon feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
doctor feat(doctor): harden provider and workspace diagnostics 2026-02-17 17:20:56 +08:00
gateway feat(auth): add subscription auth profiles and codex/claude flows 2026-02-18 12:57:44 +08:00
hardware fix(agent): parse tool-call alias tags in channel runtime 2026-02-18 00:28:08 +08:00
health refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
heartbeat test: deepen and complete project-wide test coverage (#297) 2026-02-16 05:58:24 -05:00
integrations feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
memory feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
observability readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
onboard feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
peripherals fix(agent): parse tool-call alias tags in channel runtime 2026-02-18 00:28:08 +08:00
providers readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
rag chore(lint): extend low-risk clippy cleanup batch 2026-02-17 16:40:58 +08:00
runtime test(runtime): stabilize docker root mount assertion 2026-02-18 14:42:39 +08:00
security fix(token): update token generation to use rand::rng() to resolve deprecation warnings 2026-02-18 02:11:51 -05:00
service fix(gateway): persist pairing tokens and honor docker config (#630) 2026-02-17 15:05:56 -05:00
skillforge fix(providers): use Bearer auth for Gemini CLI OAuth tokens 2026-02-15 14:32:33 -05:00
skills Merge remote-tracking branch 'origin/main' into feat/glm-provider 2026-02-17 13:27:58 -05:00
tools feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
tunnel test: deepen and complete project-wide test coverage (#297) 2026-02-16 05:58:24 -05:00
identity.rs fix(providers): use Bearer auth for Gemini CLI OAuth tokens 2026-02-15 14:32:33 -05:00
lib.rs fix(auth): rebase PR #200 onto main and restore auth CLI flow 2026-02-18 12:57:44 +08:00
main.rs fix(auth): rebase PR #200 onto main and restore auth CLI flow 2026-02-18 12:57:44 +08:00
migration.rs readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
util.rs fix(channels): check response status in send() for Telegram, Slack, and Discord 2026-02-15 09:48:58 -05:00