The open source coding agent.
TypeScript
tui: improve autocomplete component styling and update test command
Dax Raadaae0ce99219a
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsxindex 233c534f829..a386aea3325 100644--- a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx@@ -334,8 +334,8 @@ export function Autocomplete(props: {if (e.name === "up") move(-1)if (e.name === "down") move(1)if (e.name === "escape") hide()- if (e.name === "return") select()- if (["up", "down", "return", "escape"].includes(e.name)) e.preventDefault()+ if (e.name === "return" || e.name === "tab") select()+ if (["up", "down", "return", "tab", "escape"].includes(e.name)) e.preventDefault()}if (!store.visible) {if (e.name === "@") {@@ -391,11 +391,14 @@ export function Autocomplete(props: {backgroundColor={index() === store.selected ? theme.primary : undefined}flexDirection="row">- <text fg={index() === store.selected ? theme.background : theme.text}>+ <text fg={index() === store.selected ? theme.background : theme.text} flexShrink={0}>{option.display}</text><Show when={option.description}>- <text fg={index() === store.selected ? theme.background : theme.textMuted}>+ <text+ fg={index() === store.selected ? theme.background : theme.textMuted}+ wrapMode="none"+ >{option.description}</text></Show>