
7418andClaude Opus 4.6
38e7c96daa
feat: Telegram Bridge 出站消息 Markdown 渲染
新增三层 Markdown → Telegram HTML 渲染管线:
markdown/ir.ts — markdown-it 解析 Markdown 为中间表示 (MarkdownIR)
- 支持 bold/italic/strikethrough/code/code_block/blockquote/links/lists/headings/tables/hr
- 表格使用 code-block 模式渲染为 ASCII 表格(<pre> 保留对齐)
- HTML 内联 <br> 标签转换为换行符
markdown/render.ts — 通用标记渲染器
- boundary tracking + LIFO stack 处理嵌套样式
markdown/telegram.ts — Telegram 专用渲染器
- 样式映射到 Telegram HTML 标签 (b/i/s/code/pre+code/blockquote/a)
- 文件引用保护:README.md/main.go 等不被误识别为 URL
- render-first 分片:按渲染后 HTML 长度分片,超限时按比例重分割
delivery-layer.ts — 新增 deliverRendered() 接收预渲染 chunks
- HTML + plain text 双通道,解析失败自动降级纯文本
- sendWithRetry 支持 plainFallback 参数
bridge-manager.ts — Claude 回复改用 markdownToTelegramChunks + deliverRendered
- 命令响应和错误消息保持 escapeHtml + deliver
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:38:12 +08:00
..
2026-03-02 14:38:12 +08:00
2026-03-01 09:41:14 +08:00
2026-03-01 22:59:00 +08:00
2026-02-07 11:35:51 +08:00
2026-02-06 21:04:05 +08:00
2026-02-27 21:43:46 +08:00