Download projects/gemini-cli/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts from LevelUp2x/adaptai: direct link, hf CLI and curl.
- Browser
- Download file 722 Bytes
-
https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
- Command line
-
hf download hf://datasets/LevelUp2x/adaptai@2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
-
curl -L -o useKittyKeyboardProtocol.ts https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
722 Bytes
| /** | |
| * @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; | |
| } | |