mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Merge InputPrompt and multiline-editor and move autocomplete logic directly into InputPrompt (#453)
This commit is contained in:
@@ -21,15 +21,12 @@ interface ThemeDialogProps {
|
||||
onHighlight: (themeName: string | undefined) => void;
|
||||
/** The settings object */
|
||||
settings: LoadedSettings;
|
||||
/** Callback to set the query */
|
||||
setQuery: (query: string) => void;
|
||||
}
|
||||
|
||||
export function ThemeDialog({
|
||||
onSelect,
|
||||
onHighlight,
|
||||
settings,
|
||||
setQuery,
|
||||
}: ThemeDialogProps): React.JSX.Element {
|
||||
const [selectedScope, setSelectedScope] = useState<SettingScope>(
|
||||
SettingScope.User,
|
||||
@@ -59,7 +56,6 @@ export function ThemeDialog({
|
||||
];
|
||||
|
||||
const handleThemeSelect = (themeName: string) => {
|
||||
setQuery(''); // Clear the query when user selects a theme
|
||||
onSelect(themeName, selectedScope);
|
||||
};
|
||||
|
||||
@@ -82,7 +78,6 @@ export function ThemeDialog({
|
||||
setFocusedSection((prev) => (prev === 'theme' ? 'scope' : 'theme'));
|
||||
}
|
||||
if (key.escape) {
|
||||
setQuery(''); // Clear the query when user hits escape
|
||||
onSelect(undefined, selectedScope);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user