Add terminal setup command for Shift+Enter and Ctrl+Enter support (#3289)

Co-authored-by: jacob314 <jacob314@gmail.com>
This commit is contained in:
Deepankar Sharma
2025-08-13 13:32:54 -04:00
committed by GitHub
parent 74a13fb535
commit 9c7fb870c1
19 changed files with 989 additions and 18 deletions

View File

@@ -80,6 +80,7 @@ import { useTextBuffer } from './components/shared/text-buffer.js';
import { useVimMode, VimModeProvider } from './contexts/VimModeContext.js';
import { useVim } from './hooks/vim.js';
import { useKeypress, Key } from './hooks/useKeypress.js';
import { useKittyKeyboardProtocol } from './hooks/useKittyKeyboardProtocol.js';
import { keyMatchers, Command } from './keyMatchers.js';
import * as fs from 'fs';
import { UpdateNotification } from './components/UpdateNotification.js';
@@ -605,6 +606,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
const { elapsedTime, currentLoadingPhrase } =
useLoadingIndicator(streamingState);
const showAutoAcceptIndicator = useAutoAcceptIndicator({ config });
const kittyProtocolStatus = useKittyKeyboardProtocol();
const handleExit = useCallback(
(
@@ -697,7 +699,11 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
],
);
useKeypress(handleGlobalKeypress, { isActive: true });
useKeypress(handleGlobalKeypress, {
isActive: true,
kittyProtocolEnabled: kittyProtocolStatus.enabled,
config,
});
useEffect(() => {
if (config) {