mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-14 08:01:02 -07:00
27 lines
659 B
TypeScript
27 lines
659 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { useState } from 'react';
|
|
import { terminalCapabilityManager } from '../utils/terminalCapabilityManager.js';
|
|
|
|
export interface KittyProtocolStatus {
|
|
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>({
|
|
enabled: terminalCapabilityManager.isKittyProtocolEnabled(),
|
|
checking: false,
|
|
});
|
|
|
|
return status;
|
|
}
|