This commit is contained in:
Sijie Wang
2025-07-25 15:36:42 -07:00
committed by GitHub
parent aa71438684
commit fbdc8d5ab3
21 changed files with 5324 additions and 191 deletions

View File

@@ -39,6 +39,7 @@ export interface InputPromptProps {
suggestionsWidth: number;
shellModeActive: boolean;
setShellModeActive: (value: boolean) => void;
vimHandleInput?: (key: Key) => boolean;
}
export const InputPrompt: React.FC<InputPromptProps> = ({
@@ -55,6 +56,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
suggestionsWidth,
shellModeActive,
setShellModeActive,
vimHandleInput,
}) => {
const [justNavigatedHistory, setJustNavigatedHistory] = useState(false);
@@ -169,6 +171,10 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
return;
}
if (vimHandleInput && vimHandleInput(key)) {
return;
}
if (
key.sequence === '!' &&
buffer.text === '' &&
@@ -347,6 +353,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
shellHistory,
handleClipboardImage,
resetCompletionState,
vimHandleInput,
],
);