mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Including a test harness for it, and making sure the cursor is always at the end.
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user