From 136c9084c4575881c45dc1bc4b2c5e0196c5611d Mon Sep 17 00:00:00 2001 From: fjia Date: Tue, 23 Jun 2026 18:00:30 +0800 Subject: [PATCH] fix(tui): add missing space between icon and children in GenericTool 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: #1233 --- packages/opencode/src/cli/cmd/tui/routes/session/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index b8d4e14f..2e654d1e 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1790,7 +1790,7 @@ function PlanExit(props: ToolProps) { return ( <> - plan_exit + {" "}plan_exit @@ -1819,7 +1819,7 @@ function GenericTool(props: ToolProps) { when={props.output && ctx.showGenericToolOutput()} fallback={ - {props.tool} {input(props.input)} + {" "}{props.tool} {input(props.input)} } >