Skip to content

Update Telegram reply rendering to use Telegram-safe formatting#115

Draft
punitarani wants to merge 9 commits intomainfrom
feat/update-telegram-formatting
Draft

Update Telegram reply rendering to use Telegram-safe formatting#115
punitarani wants to merge 9 commits intomainfrom
feat/update-telegram-formatting

Conversation

@punitarani
Copy link
Copy Markdown
Owner

Summary

  • add a Telegram markdown renderer that converts assistant output into Telegram-safe HTML formatting
  • route outbound Telegram replies through the new renderer so bold, italics, links, code blocks, lists, and tables display correctly
  • update channel/runtime docs and supporting channel exports for the new rendering path
  • refresh lockfile and channel package deps for the markdown rendering pipeline

Testing

  • bun test packages/channels/src/posthog.test.ts packages/channels/src/telegram/*.test.ts
  • bun run --filter @amby/channels typecheck

- Introduce a new module for conversation session logic, including debounce handling and message correction detection.
- Implement functions for computing debounce deadlines and migrating buffer entries.
- Add comprehensive unit tests for the new logic, covering correction message detection and debounce calculations.
- Update the conversation session to utilize the new logic for improved message handling and state management.
- Enhance documentation to reflect changes in the conversation session workflow and message processing behavior.
- Add `debounce_started_at` attribute to conversation session state for improved tracking.
- Set an alarm in the conversation session to manage execution timing.
- Include `workflow_started_at` timestamp in agent execution workflow for better monitoring.
- Update error handling in the conversation engine to reflect cancellation outcomes more accurately.
- Delete Telegram queue consumer logic and associated message types from the codebase.
- Update worker and environment configurations to eliminate references to the Telegram queue.
- Refactor imports and type definitions to ensure clean integration without Telegram queue dependencies.
- Update the agent execution workflow to enhance response delivery logic.
- Remove streaming-related variables and functionality, simplifying the message handling process.
- Adjust the conversation runtime and related types to eliminate streaming references.
- Ensure the codebase is cleaner and more maintainable by focusing on direct message delivery.
- Update filtering conditions to include instances with null externalInstanceId.
- Refactor the logic to use an OR condition for improved clarity and functionality.
- Ensure that the updated logic maintains the intended behavior for instance status checks.
- Introduce `migrateBufferEntries` function to handle legacy message formats and ensure compatibility with new structures.
- Update unit tests for `isCorrectionMessage` and add tests for `migrateBufferEntries` to validate migration logic.
- Refactor `scheduleDebounce` method to be asynchronous, ensuring proper handling of debounce alarms.
- Update documentation for Telegram message handling to reflect changes in response delivery and attachment processing.
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