fix(tui): add missing space between icon and children in GenericTool and PlanExit#1245
Open
0xSkybreaker wants to merge 1 commit into
Open
Conversation
…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
98bac76 to
136c908
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
TUI 中
GenericTool和PlanExit组件渲染时,icon(⚙)和 children 之间缺少空格。⚙memory [operation=search, ...]→ 应为⚙ memory [operation=search, ...]⚙plan_exit→ 应为⚙ plan_exitRoot Cause
opentui 的 JSX 实现没有保留表达式之间的空白字符。其他
InlineTool组件(如Skill、Glob、Grep等)不受影响,因为它们的 children 本身包含前导文本(如"Skill "、"Glob ")。而GenericTool和PlanExit的 children 以 JSX 表达式开头,导致空格丢失。Fix
在两个组件的 children 前添加
{" "}表达式,确保空格始终被渲染。Closes: #1233