← Back to PRs

#20589: Auto-reply: preserve Telegram DM newlines

by detecti1 open 2026-02-19 03:49 View on GitHub →
size: S
## Summary - Fix newline loss in user input before prompt delivery to embedded LLM. - Preserve existing `/status` stripping behavior only when `/status` is actually present. - Add e2e regression coverage for Telegram direct-message multiline input. ### Why - User multiline DM content was flattened into a single line in normal conversation paths. - Flattening removed user-intended line boundaries and harmed downstream LLM interpretation. ## Root Cause - `stripInlineStatus()` normalized whitespace via `replace(/\s+/g, " ")` even when no `/status` existed. - That behavior converted user `\n` line breaks into spaces. ## Change Type (select all) - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Docs - [ ] Security hardening - [ ] Chore/infra ## Scope (select all touched areas) - [x] Gateway / orchestration - [ ] Skills / tool execution - [ ] Auth / tokens - [ ] Memory / storage - [ ] Integrations - [ ] API / contracts - [ ] UI / DX - [ ] CI/CD / infra - New permissions/capabilities? `NO` - Secrets/tokens handling changed? `NO` - New/changed network calls? `NO` - Command/tool execution surface changed? `NO` - Data access scope changed? `NO` ## Human Verification (required) Author understanding: I reviewed and understand the implemented changes and their runtime behavior. ### Testing - Degree: fully tested. - Commands run: - `pnpm build` - `pnpm check` - `pnpm test` - Result: all passed. ### Deployment Validation - Deployed to personal production environment. - Runtime behavior validated as normal after deployment. ## Compatibility / Migration - Backward compatible? (`Yes`) - Config/env changes? (`No`) - Migration needed? (`No`) ## Failure Recovery (if this breaks) ## Risks and Mitigations None

Most Similar PRs