Skip to content

fix(tui): add missing space between icon and children in GenericTool and PlanExit#1245

Open
0xSkybreaker wants to merge 1 commit into
XiaomiMiMo:mainfrom
0xSkybreaker:fix/issue-1233-generic-tool-plan-exit-missing-space
Open

fix(tui): add missing space between icon and children in GenericTool and PlanExit#1245
0xSkybreaker wants to merge 1 commit into
XiaomiMiMo:mainfrom
0xSkybreaker:fix/issue-1233-generic-tool-plan-exit-missing-space

Conversation

@0xSkybreaker

Copy link
Copy Markdown

Problem

TUI 中 GenericToolPlanExit 组件渲染时,icon(⚙)和 children 之间缺少空格。

  • GenericTool: ⚙memory [operation=search, ...] → 应为 ⚙ memory [operation=search, ...]
  • PlanExit: ⚙plan_exit → 应为 ⚙ plan_exit

Root Cause

opentui 的 JSX 实现没有保留表达式之间的空白字符。其他 InlineTool 组件(如 SkillGlobGrep 等)不受影响,因为它们的 children 本身包含前导文本(如 "Skill ""Glob ")。而 GenericToolPlanExit 的 children 以 JSX 表达式开头,导致空格丢失。

Fix

在两个组件的 children 前添加 {" "} 表达式,确保空格始终被渲染。

Closes: #1233

…and PlanExit

opentui JSX does not preserve whitespace between expressions, causing the
icon and children to render without a space separator in GenericTool
and PlanExit components.

Other InlineTool components (Skill, Glob, Grep, etc.) are unaffected because
their children start with literal text (e.g. "Skill ", "Glob "), which
provides the leading space. GenericTool and PlanExit children start with
JSX expressions, losing the whitespace.

Fix: prefix children with a leading space to ensure the gap is always
rendered.

Closes: XiaomiMiMo#1233
@0xSkybreaker 0xSkybreaker force-pushed the fix/issue-1233-generic-tool-plan-exit-missing-space branch from 98bac76 to 136c908 Compare June 23, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(tui): GenericTool icon and children missing space

1 participant