vim mode display

This commit is contained in:
dal 2025-09-30 14:07:00 -06:00
parent de2f13e311
commit 3dcf90cb72
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 6 additions and 2 deletions

View File

@ -21,7 +21,7 @@ export function Main() {
const [input, setInput] = useState(''); const [input, setInput] = useState('');
const [history, setHistory] = useState<ChatHistoryEntry[]>([]); const [history, setHistory] = useState<ChatHistoryEntry[]>([]);
const historyCounter = useRef(0); const historyCounter = useRef(0);
const [vimEnabled] = useState(() => getSetting('vimMode')); const [vimEnabled, setVimEnabled] = useState(() => getSetting('vimMode'));
const [currentVimMode, setCurrentVimMode] = useState<VimMode>('insert'); const [currentVimMode, setCurrentVimMode] = useState<VimMode>('insert');
const [showSettings, setShowSettings] = useState(false); const [showSettings, setShowSettings] = useState(false);
const [isAutocompleteOpen, setIsAutocompleteOpen] = useState(false); const [isAutocompleteOpen, setIsAutocompleteOpen] = useState(false);
@ -79,7 +79,11 @@ export function Main() {
if (showSettings) { if (showSettings) {
return ( return (
<Box flexDirection="column" paddingX={4} paddingY={2}> <Box flexDirection="column" paddingX={4} paddingY={2}>
<SettingsForm onClose={() => setShowSettings(false)} /> <SettingsForm onClose={() => {
setShowSettings(false);
// Refresh vim enabled setting after settings close
setVimEnabled(getSetting('vimMode'));
}} />
</Box> </Box>
); );
} }