mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-16 16:21:27 -07:00
16 lines
453 B
TypeScript
16 lines
453 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { Command } from '../key/keyMatchers.js';
|
|
import type { Key } from '../hooks/useKeypress.js';
|
|
import { useKeyMatchers } from '../hooks/useKeyMatchers.js';
|
|
|
|
export function useIsHelpDismissKey(): (key: Key) => boolean {
|
|
const keyMatchers = useKeyMatchers();
|
|
return (key: Key) =>
|
|
Object.values(Command).some((command) => keyMatchers[command](key));
|
|
}
|