Version line
v2 — Go rewrite (1.x), main-v2 (active development)
Exact version
v1.7.0
What happened?
问题描述
使用微信 Bot 时,Reasonix 的回复被拆分为多条微信消息发送,且拆分位置在句子中间,阅读体验很差。
例如:
消息1: "我是 "
消息2: "Reasonix,一个专注于执行代码任务的 AI 编程助手。\n\n我的核心能力:\n- 读取和修改代码 — 擅长分析项目结构、修改代码、解决 Bug\n-"
消息3: "文件操作 — 创建、编辑、搜索文件\n- Shell 命令 — 在 PowerShell 环境下执行构建、测试、Git 等操作\n- 代码理解 — 通过 codegraph 工具进行符号级别的代码分析\n- 技能系统 — 可调用项目预置"
消息4: "的 playbook(如代码评审、探索、研究等)…"
根因分析
问题出在 internal/bot/render.go 的 maybeFlush() 方法:
func (s *renderSink) maybeFlush() {
if time.Since(s.lastFlush) > 500*time.Millisecond {
s.flush()
}
}
### Steps to reproduce
1、send messages
### OS / platform
WeChat/微信
### Relevant logs or output
```shell
Version line
v2 — Go rewrite (1.x), main-v2 (active development)
Exact version
v1.7.0
What happened?
问题描述
使用微信 Bot 时,Reasonix 的回复被拆分为多条微信消息发送,且拆分位置在句子中间,阅读体验很差。
例如:
根因分析
问题出在
internal/bot/render.go的maybeFlush()方法: