From dd1032bd99ab0f8fd58c8d9352c344a6b3916bb2 Mon Sep 17 00:00:00 2001 From: leohenon <77656081+lhenon999@users.noreply.github.com> Date: Sun, 26 Apr 2026 12:29:32 +0800 Subject: [PATCH] fix: keep vim indicator visible while busy --- .../cli/cmd/tui/component/prompt/index.tsx | 70 +++++++++---------- 1 file changed, 33 insertions(+), 37 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 9d635a2ceb1e..6b200147cdc1 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -1434,6 +1434,37 @@ export function Prompt(props: PromptProps) { } }) + function isInsertIndicator(indicator: string) { + return indicator === "-- INSERT --" + } + + function isVisualIndicator(indicator: string) { + return ["-- VISUAL --", "-- VISUAL LINE --", "-- V-COPY --", "-- VL-COPY --"].includes(indicator) + } + + function VimIndicator() { + return ( + + {(indicator) => ( + + {indicator()} + + )} + + ) + } + return ( <> - - {(indicator) => ( - - {indicator()} - - )} - + {props.hint ?? } } @@ -1878,6 +1873,7 @@ export function Prompt(props: PromptProps) { justifyContent={status().type === "retry" ? "space-between" : "flex-start"} > + [⋯]}>