feat(ui): hide cursor when terminal is unfocused (#4012)

This commit is contained in:
Keith Lyons
2025-07-17 20:45:42 -04:00
committed by GitHub
parent 584a50a342
commit 8ade3e7ee2
4 changed files with 171 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ import {
useSessionStats,
} from './contexts/SessionContext.js';
import { useGitBranchName } from './hooks/useGitBranchName.js';
import { useFocus } from './hooks/useFocus.js';
import { useBracketedPaste } from './hooks/useBracketedPaste.js';
import { useTextBuffer } from './components/shared/text-buffer.js';
import * as fs from 'fs';
@@ -98,6 +99,7 @@ export const AppWrapper = (props: AppProps) => (
);
const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
const isFocused = useFocus();
useBracketedPaste();
const [updateMessage, setUpdateMessage] = useState<string | null>(null);
const { stdout } = useStdout();
@@ -927,6 +929,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
commandContext={commandContext}
shellModeActive={shellModeActive}
setShellModeActive={setShellModeActive}
focus={isFocused}
/>
)}
</>