mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-19 06:45:50 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,25 +1,22 @@
|
||||
import * as React from 'react'
|
||||
import type {
|
||||
KeybindingAction,
|
||||
KeybindingContextName,
|
||||
} from '../keybindings/types.js'
|
||||
import { useShortcutDisplay } from '../keybindings/useShortcutDisplay.js'
|
||||
import { KeyboardShortcutHint } from '@anthropic/ink'
|
||||
import * as React from 'react';
|
||||
import type { KeybindingAction, KeybindingContextName } from '../keybindings/types.js';
|
||||
import { useShortcutDisplay } from '../keybindings/useShortcutDisplay.js';
|
||||
import { KeyboardShortcutHint } from '@anthropic/ink';
|
||||
|
||||
type Props = {
|
||||
/** The keybinding action (e.g., 'app:toggleTranscript') */
|
||||
action: KeybindingAction
|
||||
action: KeybindingAction;
|
||||
/** The keybinding context (e.g., 'Global') */
|
||||
context: KeybindingContextName
|
||||
context: KeybindingContextName;
|
||||
/** Default shortcut if keybinding not configured */
|
||||
fallback: string
|
||||
fallback: string;
|
||||
/** The action description text (e.g., 'expand') */
|
||||
description: string
|
||||
description: string;
|
||||
/** Whether to wrap in parentheses */
|
||||
parens?: boolean
|
||||
parens?: boolean;
|
||||
/** Whether to show in bold */
|
||||
bold?: boolean
|
||||
}
|
||||
bold?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* KeyboardShortcutHint that displays the user-configured shortcut.
|
||||
@@ -41,13 +38,6 @@ export function ConfigurableShortcutHint({
|
||||
parens,
|
||||
bold,
|
||||
}: Props): React.ReactNode {
|
||||
const shortcut = useShortcutDisplay(action, context, fallback)
|
||||
return (
|
||||
<KeyboardShortcutHint
|
||||
shortcut={shortcut}
|
||||
action={description}
|
||||
parens={parens}
|
||||
bold={bold}
|
||||
/>
|
||||
)
|
||||
const shortcut = useShortcutDisplay(action, context, fallback);
|
||||
return <KeyboardShortcutHint shortcut={shortcut} action={description} parens={parens} bold={bold} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user