Skip to content

telegram-bridge: forward reply context to workers - #2

Open
bermudas wants to merge 1 commit into
mainfrom
feat/telegram-reply-context
Open

telegram-bridge: forward reply context to workers#2
bermudas wants to merge 1 commit into
mainfrom
feat/telegram-reply-context

Conversation

@bermudas

Copy link
Copy Markdown
Owner

Summary

  • When a user replies to a worker's Telegram bubble, prepend the quoted text to the prompt sent to the worker pane: [User via Telegram] (reply to: "<quoted>"): <new text>.
  • Same treatment for file attachments with a caption.
  • The [role-name] badge prefix is stripped from the quoted text before forwarding so the worker doesn't see noise.

Upstream behavior used the badge in the reply only to resolve routing (which role the user wanted to reach) and then discarded the quoted content. The worker therefore got [User via Telegram]: rerun please with no idea what "rerun" referred to. This change preserves the context.

Ported from ChildrenHomeWork/octobots.

Test plan

  • Reply to a worker's message in Telegram with a short follow-up ("yes", "rerun") and confirm the worker pane receives (reply to: "...") context.
  • Reply with a file attachment + caption and confirm the same context appears in the attachment prompt.
  • Plain @role <message> (no reply) still uses the unchanged [User via Telegram]: prefix.

When a user replies to a worker's Telegram message, include the quoted
text in the prompt sent to the worker pane so it can resolve
pronoun-style replies ("yes", "rerun", "do the other one") instead of
guessing from session memory.

Upstream uses the [role] badge in the quoted text only to resolve
routing and then discards the content. This change strips the badge
and prepends `(reply to: "...")` to the forwarded prompt for both text
messages and file attachments.
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