mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-01 15:34:29 -07:00
refactor: migrate to useKeyMatchers hook (#21753)
This commit is contained in:
committed by
GitHub
parent
e406dcc249
commit
ab64b15d51
@@ -11,7 +11,8 @@ import {
|
||||
getAdminErrorMessage,
|
||||
} from '@google/gemini-cli-core';
|
||||
import { useKeypress } from './useKeypress.js';
|
||||
import { keyMatchers, Command } from '../keyMatchers.js';
|
||||
import { Command } from '../keyMatchers.js';
|
||||
import { useKeyMatchers } from './useKeyMatchers.js';
|
||||
import type { HistoryItemWithoutId } from '../types.js';
|
||||
import { MessageType } from '../types.js';
|
||||
|
||||
@@ -30,6 +31,7 @@ export function useApprovalModeIndicator({
|
||||
isActive = true,
|
||||
allowPlanMode = false,
|
||||
}: UseApprovalModeIndicatorArgs): ApprovalMode {
|
||||
const keyMatchers = useKeyMatchers();
|
||||
const currentConfigValue = config.getApprovalMode();
|
||||
const [showApprovalMode, setApprovalMode] = useState(currentConfigValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user