Skip to content

🐛 工具结果段超长行无自动换行 #235

Description

@yyz159756

提交前确认 / Preflight

  • 我已搜索过 issues,没有重复 / I searched existing issues and found no duplicate
  • 我用的是最新版本(或已说明所用版本) / I'm on the latest version (or stated my version below)

版本 / Version

0.2.106

安装方式 / Install method

直接下载 release 二进制手动运行 / downloaded release binary, ran directly

操作系统 / OS

Windows

环境细节 / Environment detail

No response

问题描述 / What happened

问题描述:

工具提示显示不自动换行:超长内容被视口截断(如 ✗ Bash 失败: warning: in the working copy of 'openspec/... 只显示到 tool-failu…)。

复现步骤 / Steps to reproduce

影响范围

所有通过工具结果区域(kindTools)展示的长文本都可能受影响,包括:

  • 工具失败提示
  • Bash 命令输出
  • 长路径/长参数
  • git diff / warning 信息
  • 其他工具产生的长单行输出

窄终端或较长路径场景下,关键信息可能不可见。

根因分析

tui/model.go:4362 kindTools 段渲染只做 colorizeDiffBlock(染色),不做 wordWrap——tools 段注释(4350)说明"跳过 glamour 保留 raw \n"是避免多 tool 行的单 \n 被 markdown 当 soft break 拼成一行,但跳过后没有补 wrap,导致超长行直接溢出截断。

报错信息 / 日志 / Error output / logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions