OfflynAI
3a371a32e2
fix: filter telegram binary caption text ( #66663 ) (thanks @joelnishanth)
...
* Telegram: filter binary content from msg.caption to prevent token explosion (#66647 )
When a user sends a binary document (e.g. .mobi, .epub) via Telegram, raw
binary bytes can leak into msg.caption. getTelegramTextParts() passes this
through to the LLM prompt, causing catastrophic token explosion (~460K tokens).
Add isBinaryContent() that detects non-printable control characters (0x00-0x08,
0x0E-0x1F) and use it to sanitize the text in getTelegramTextParts() before it
reaches the prompt pipeline. When binary content is detected, the text and
entities are both replaced with empty values so the message is still processed
(media placeholder still works) but the binary junk is dropped.
Made-with: Cursor
* fix: distill telegram binary caption filtering
* fix: filter telegram binary caption text (#66663 ) (thanks @joelnishanth)
---------
Co-authored-by: Ayaan Zaidi <hi@obviy.us >
2026-04-14 22:14:50 +05:30
..
2026-04-12 10:37:18 -07:00
2026-04-13 16:05:43 -05:00
2026-04-12 10:37:18 -07:00
2026-04-14 16:37:29 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 16:37:29 +01:00
2026-04-14 16:37:29 +01:00
2026-04-14 16:34:09 +01:00
2026-04-13 11:03:47 -07:00
2026-04-12 10:37:18 -07:00
2026-04-14 16:30:43 +08:00
2026-04-14 14:59:01 +01:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-13 19:22:09 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-10 19:46:23 -05:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-14 11:05:24 +01:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-13 20:49:39 -07:00
2026-04-12 10:37:18 -07:00
2026-04-14 16:34:09 +01:00
2026-04-14 09:58:19 +01:00
2026-04-14 17:13:31 +01:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-14 17:20:46 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 17:13:31 +01:00
2026-04-14 16:16:34 +01:00
2026-04-13 16:05:50 +01:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-13 17:45:06 +08:00
2026-04-13 20:38:46 +02:00
2026-04-14 17:41:32 +01:00
2026-04-13 17:47:29 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 09:58:27 -06:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-14 17:13:31 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 17:13:31 +01:00
2026-04-13 23:52:30 +05:30
2026-04-13 20:49:39 -07:00
2026-04-13 18:07:23 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 16:34:09 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 21:52:16 +05:30
2026-04-14 16:48:02 +01:00
2026-04-14 16:48:02 +01:00
2026-04-14 17:13:31 +01:00
2026-04-13 00:20:51 +01:00
2026-04-12 10:37:18 -07:00
2026-04-10 21:55:28 +01:00
2026-04-12 19:45:46 -07:00
2026-04-14 13:42:02 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 15:38:10 +10:00
2026-04-12 10:37:18 -07:00
2026-04-14 15:14:26 +01:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-03 16:39:47 +01:00
2026-04-12 10:37:18 -07:00
2026-04-13 20:38:11 -06:00
2026-04-12 19:41:13 -03:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-10 20:14:49 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 22:14:50 +05:30
2026-04-11 01:37:23 +01:00
2026-04-13 16:45:58 +01:00
2026-04-14 14:59:01 +01:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-12 10:37:18 -07:00
2026-04-13 16:51:16 -06:00
2026-04-12 10:37:18 -07:00
2026-04-14 14:59:01 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 17:27:07 +01:00
2026-04-14 16:34:09 +01:00
2026-04-12 10:37:18 -07:00
2026-04-14 17:13:31 +01:00
2026-04-13 15:36:35 +01:00
2026-04-14 17:20:46 +01:00
2026-04-12 09:09:50 +01:00
2026-03-28 20:22:03 -04:00
2026-04-06 19:15:31 +01:00
2026-04-06 15:38:04 +01:00
2026-04-09 23:59:00 +01:00
2026-04-14 14:59:01 +01:00