mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
Including a test harness for it, and making sure the cursor is always at the end.
This commit is contained in:
parent
3829ac6353
commit
97db77997f
12 changed files with 3269 additions and 67 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue