Skip to content

feat(gateway): /stream cosmetic tool progress for Pi - #184

Open
AuYahyire wants to merge 4 commits into
owainlewis:mainfrom
AuYahyire:feat/stream-progress
Open

feat(gateway): /stream cosmetic tool progress for Pi#184
AuYahyire wants to merge 4 commits into
owainlewis:mainfrom
AuYahyire:feat/stream-progress

Conversation

@AuYahyire

@AuYahyire AuYahyire commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Adds /stream / /stream on|off to show cosmetic Pi tool progress in Telegram (typing stays; progress is not stored in canonical history).
  • Progress uses one editable message with Shell-style code fences for copyable commands.
  • Accepts Telegram menu forms like /stream@BotName.
  • Default is off; prefs are in-memory only (reset on Push restart).

Why

Long Pi tool loops look idle in Telegram if only typing is shown. Operators want optional live breadcrumbs without putting tool noise into durable history or changing LLM prompts.

Test plan

  • cargo fmt --all --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo build --locked
  • cargo test --locked
  • cargo test stream_prefs
  • /stream on, send a prompt that uses bash → one editable progress message, then final reply
  • Restart Push → stream is off again until /stream on
  • Progress bubbles do not appear in later rehydrated history after /new

Risks

  • Extra Telegram API traffic (send + edits) under busy tool loops; mitigated by editing one message on an interval instead of sending many.
  • In-memory prefs mean stream state is lost on restart (intentional; avoids new durable config surface).
  • send_plain stays independent of message_id parsing so ordinary delivery does not break when the API body is only ok: true.

Related issue

None

github-actions Bot and others added 4 commits August 2, 2026 19:47
Toggle per conversation sends Hermes-style tool breadcrumbs from Pi's
JSONL events without recording them in canonical history or changing LLM prompts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Menu taps send /stream@BotName; normalize before matching so commands still work.

Co-authored-by: Cursor <cursoragent@cursor.com>
…nces

Accumulate tool progress into a single editable bubble (Shell + code fence)
to avoid rate-limit stalls from many sends, and keep final replies unblocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
Progress edits need message ids; ordinary delivery must keep working with
API mocks and responses that only return ok=true.

Co-authored-by: Cursor <cursoragent@cursor.com>
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