From eec8cf912e787ac7221289037b5f46e231e37b27 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sat, 3 Oct 2026 21:33:13 -0700 Subject: [PATCH] refactor(tui): remove unused Prompt hint, right, and showPlaceholder props (#52993) --- packages/tui/src/component/prompt/index.tsx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/tui/src/component/prompt/index.tsx b/packages/tui/src/component/prompt/index.tsx index ad21de04cfd..73f61f329ce 100644 --- a/packages/tui/src/component/prompt/index.tsx +++ b/packages/tui/src/component/prompt/index.tsx @@ -38,7 +38,7 @@ import { expandPastedTextPlaceholders, expandTrackedPastedText } from "../../pro import { usePromptStash } from "../../prompt/stash" import { DialogStash } from "../dialog-stash" import { type AutocompleteOption, type AutocompleteRef, Autocomplete } from "./autocomplete" -import { useRenderer, useTerminalDimensions, type JSX } from "@opentui/solid" +import { useRenderer, useTerminalDimensions } from "@opentui/solid" import { Locale } from "../../util/locale" import { errorMessage } from "../../util/error" import { createColors, createFrames } from "../../ui/spinner" @@ -79,9 +79,6 @@ export type PromptProps = { onSubmit?: () => void onEmptySubmit?: () => boolean | Promise ref?: (ref: PromptRef | undefined) => void - hint?: JSX.Element - right?: JSX.Element - showPlaceholder?: boolean placeholders?: { normal?: string[] shell?: string[] @@ -315,7 +312,6 @@ export function Prompt(props: PromptProps) { })) const [cursorVersion, setCursorVersion] = createSignal(0) const connected = useConnected() - const hasRightContent = createMemo(() => Boolean(props.right)) function promptModelWarning() { toast.show({ @@ -1594,7 +1590,6 @@ export function Prompt(props: PromptProps) { }) const placeholderText = createMemo(() => { - if (props.showPlaceholder === false) return undefined const value = (() => { if (store.mode === "shell") { if (!shell().length) return undefined @@ -1848,11 +1843,6 @@ export function Prompt(props: PromptProps) { modelAlpha={modelMetaAlpha()} variantAlpha={variantMetaAlpha()} /> - - - {props.right} - - @@ -1930,7 +1920,7 @@ export function Prompt(props: PromptProps) { - }> + }> {(location) => (