From ed708f9dc297b17f61edac0deed07693b9d5e415 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 14:45:09 -0400 Subject: [PATCH] fix(tui): keep shell commands full width (#42339) Co-authored-by: James Long <17031+jlongster@users.noreply.github.com> --- packages/tui/src/routes/session/index.tsx | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index f9c1eeb180..5f5df94e77 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -2872,16 +2872,8 @@ function Shell(props: ToolProps) { }) const maxLines = 10 const maxChars = createMemo(() => maxLines * Math.max(20, ctx.width - 6)) - const prompt = createMemo(() => (workdir() && workdir() !== "." ? `${workdir()}$` : "$")) - const input = createMemo(() => { - const cmd = command() - if (!cmd) return "" - // While running, the workdir prompt shares the spinner's text column; when - // settled, the prompt renders as its own column so wrapped command lines - // keep a stable hanging indent instead of jumping to the card inset. - if (isRunning() && prompt() !== "$") return `${prompt()} ${cmd}` - return cmd - }) + const prefix = createMemo(() => (workdir() && workdir() !== "." ? `cd ${workdir()} && ` : "")) + const input = createMemo(() => (command() ? `${isRunning() ? "" : "$ "}${prefix()}${command()}` : "")) const content = createMemo(() => [input(), output()].filter(Boolean).join("\n\n")) const collapsed = createMemo(() => collapseToolOutput(content(), maxLines, maxChars())) const limited = createMemo(() => { @@ -2910,15 +2902,7 @@ function Shell(props: ToolProps) { ) } > - - {prompt()} - {limitedInput()} - - } - > + {limitedInput()}}> {limitedInput()}