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

@@ -0,0 +1,31 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { useState } from 'react';
import {
isKittyProtocolEnabled,
isKittyProtocolSupported,
} from '../utils/kittyProtocolDetector.js';
export interface KittyProtocolStatus {
supported: boolean;
enabled: boolean;
checking: boolean;
}
/**
* Hook that returns the cached Kitty keyboard protocol status.
* Detection is done once at app startup to avoid repeated queries.
*/
export function useKittyKeyboardProtocol(): KittyProtocolStatus {
const [status] = useState<KittyProtocolStatus>({
supported: isKittyProtocolSupported(),
enabled: isKittyProtocolEnabled(),
checking: false,
});
return status;
}