style: 完成所有文件的lint

This commit is contained in:
claude-code-best
2026-05-01 21:39:30 +08:00
parent d136872cc9
commit 6182015005
1333 changed files with 68255 additions and 77882 deletions

View File

@@ -1,32 +1,26 @@
import figures from 'figures'
import React, { useState } from 'react'
import { Box, Text } from '@anthropic/ink'
import { useKeybinding } from '../keybindings/useKeybinding.js'
import TextInput from './TextInput.js'
import figures from 'figures';
import React, { useState } from 'react';
import { Box, Text } from '@anthropic/ink';
import { useKeybinding } from '../keybindings/useKeybinding.js';
import TextInput from './TextInput.js';
type Props = {
initialLanguage: string | undefined
onComplete: (language: string | undefined) => void
onCancel: () => void
}
initialLanguage: string | undefined;
onComplete: (language: string | undefined) => void;
onCancel: () => void;
};
export function LanguagePicker({
initialLanguage,
onComplete,
onCancel,
}: Props): React.ReactNode {
const [language, setLanguage] = useState(initialLanguage)
const [cursorOffset, setCursorOffset] = useState(
(initialLanguage ?? '').length,
)
export function LanguagePicker({ initialLanguage, onComplete, onCancel }: Props): React.ReactNode {
const [language, setLanguage] = useState(initialLanguage);
const [cursorOffset, setCursorOffset] = useState((initialLanguage ?? '').length);
// Use configurable keybinding for ESC to cancel
// Use Settings context so 'n' key doesn't trigger cancel (allows typing 'n' in input)
useKeybinding('confirm:no', onCancel, { context: 'Settings' })
useKeybinding('confirm:no', onCancel, { context: 'Settings' });
function handleSubmit(): void {
const trimmed = language?.trim()
onComplete(trimmed || undefined)
const trimmed = language?.trim();
onComplete(trimmed || undefined);
}
return (
@@ -48,5 +42,5 @@ export function LanguagePicker({
</Box>
<Text dimColor>Leave empty for default (English)</Text>
</Box>
)
);
}