-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Telegram: Agent messages lack paragraph breaks and CJK table misalignment #59562
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
问题描述
Telegram 接收到的 Agent 消息存在两个格式问题:
问题 1:段落未分段(Wall of Text)
现象:Agent 回复的长文本全部挤在一起,没有段落间距,看起来像一面墙。
原因:Markdown 规范要求用
\n\n分隔段落,但 LLM 生成的内容使用单个\n,Telegram 将其视为同一段落渲染。示例:
复现方式:让 Agent 生成任何超过 3 段的回复,都能观察到。
问题 2:表格与 CJK 字符对齐问题
现象:包含中文的表格在 Telegram 中显示错位。
原因:Telegram 使用
<pre>块渲染 Markdown 表格,String.length计算字符宽度,而 CJK 字符(如中文、日文)占 2 个显示列但只计为 1 个长度,导致对齐偏移。OpenClaw 相关 Issue:#55512(已确认)
当前 Workaround:配置
channels.telegram.markdown.tables: "code"将表格渲染为代码块,但无法根本解决对齐问题。上游 PR:#55596(DRAFT)— 使用
string-width包修复,但尚未合并。环境信息
期望行为
可能的解决方案
问题 1:
\n\n分隔段落)\n转换为\n\n问题 2:
string-width计算显示宽度)参考资料