From 0de5f1ff3616409d1c0ef9175ac264c3e2408a2f Mon Sep 17 00:00:00 2001 From: Braxton Schafer Date: Mon, 25 May 2026 09:24:19 -0500 Subject: [PATCH] feat(tui): make prompt size responsive and configurable (#28255) --- .../src/cli/cmd/tui/component/prompt/index.tsx | 10 ++++++++-- .../opencode/src/cli/cmd/tui/config/tui-schema.ts | 10 ++++++++++ packages/opencode/src/cli/cmd/tui/routes/home.tsx | 13 +++++++++++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 0566e07b34..e8affacda7 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -1464,11 +1464,15 @@ export function Prompt(props: PromptProps) { }), } }) + const maxHeight = createMemo( + () => tuiConfig.prompt?.max_height ?? Math.max(6, Math.floor(dimensions().height / 3)), + ) return ( <> - (anchor = r)} visible={props.visible !== false}> + (anchor = r)} visible={props.visible !== false} width="100%">