diff options
| author | Evan Senter <[email protected]> | 2025-04-18 18:14:45 +0100 |
|---|---|---|
| committer | Evan Senter <[email protected]> | 2025-04-18 18:16:52 +0100 |
| commit | 97db77997fd6369031d2f1cf750051999fb0b5b5 (patch) | |
| tree | aed1947e1dd6b572b13bec5a5f48fb5b1690834a /packages/cli/src/ui/components/InputPrompt.tsx | |
| parent | 3829ac635307a77a1af0141c2db7f4135c74fcf6 (diff) | |
Including a test harness for it, and making sure the cursor is always at the end.
Diffstat (limited to 'packages/cli/src/ui/components/InputPrompt.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/InputPrompt.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index f79aeaa3..1119926f 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -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'}>> </Text> <Box flexGrow={1}> <TextInput + key={forceKey} value={query} onChange={setQuery} onSubmit={onSubmit} |
