Including a test harness for it, and making sure the cursor is always at the end.

This commit is contained in:
Evan Senter
2025-04-18 18:14:45 +01:00
parent 3829ac6353
commit 97db77997f
12 changed files with 3269 additions and 67 deletions

View File

@@ -8,12 +8,14 @@ interface InputPromptProps {
setQuery: (value: string) => void;
onSubmit: (value: string) => void;
isActive: boolean;
forceKey: number;
}
const InputPrompt: React.FC<InputPromptProps> = ({
query,
setQuery,
onSubmit,
forceKey,
}) => {
const model = getModel();
@@ -22,6 +24,7 @@ const InputPrompt: React.FC<InputPromptProps> = ({
<Text color={'white'}>&gt; </Text>
<Box flexGrow={1}>
<TextInput
key={forceKey}
value={query}
onChange={setQuery}
onSubmit={onSubmit}