mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-06 19:31:15 -07:00
fix(cli): replace hardcoded keybinding strings with dynamic formatters (#21159)
This commit is contained in:
committed by
GitHub
parent
f20e45175e
commit
1c3c7a343f
@@ -37,6 +37,7 @@ import {
|
||||
import type { Key } from '../hooks/useKeypress.js';
|
||||
import { useKeypress } from '../hooks/useKeypress.js';
|
||||
import { keyMatchers, Command } from '../keyMatchers.js';
|
||||
import { formatCommand } from '../utils/keybindingUtils.js';
|
||||
import type { CommandContext, SlashCommand } from '../commands/types.js';
|
||||
import type { Config } from '@google/gemini-cli-core';
|
||||
import { ApprovalMode, coreEvents, debugLogger } from '@google/gemini-cli-core';
|
||||
@@ -494,7 +495,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
||||
buffer.insert(textToInsert, { paste: true });
|
||||
if (isLargePaste(textToInsert)) {
|
||||
appEvents.emit(AppEvent.TransientMessage, {
|
||||
message: 'Press Ctrl+O to expand pasted text',
|
||||
message: `Press ${formatCommand(Command.EXPAND_PASTE)} to expand pasted text`,
|
||||
type: TransientMessageType.Hint,
|
||||
});
|
||||
}
|
||||
@@ -730,7 +731,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
||||
buffer.handleInput(key);
|
||||
if (key.sequence && isLargePaste(key.sequence)) {
|
||||
appEvents.emit(AppEvent.TransientMessage, {
|
||||
message: 'Press Ctrl+O to expand pasted text',
|
||||
message: `Press ${formatCommand(Command.EXPAND_PASTE)} to expand pasted text`,
|
||||
type: TransientMessageType.Hint,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user