style: format codebase with Prettier\n\n- Apply Prettier across src to ensure consistent styling\n- No functional changes; whitespace and ordering only\n- Unblocks format:check for release pipeline
This commit is contained in:
@@ -34,10 +34,7 @@ const ApiKeyInput: React.FC<ApiKeyInputProps> = ({
|
||||
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<label
|
||||
htmlFor={id}
|
||||
className="block text-sm font-medium text-gray-900"
|
||||
>
|
||||
<label htmlFor={id} className="block text-sm font-medium text-gray-900">
|
||||
{label} {required && "*"}
|
||||
</label>
|
||||
<div className="relative">
|
||||
|
||||
@@ -36,9 +36,7 @@ const CodexConfigEditor: React.FC<CodexConfigEditorProps> = ({
|
||||
required
|
||||
className="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-colors resize-y min-h-[8rem]"
|
||||
/>
|
||||
<p className="text-xs text-gray-500">
|
||||
Codex auth.json 配置内容
|
||||
</p>
|
||||
<p className="text-xs text-gray-500">Codex auth.json 配置内容</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
@@ -56,9 +54,7 @@ const CodexConfigEditor: React.FC<CodexConfigEditorProps> = ({
|
||||
rows={8}
|
||||
className="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-colors resize-y min-h-[10rem]"
|
||||
/>
|
||||
<p className="text-xs text-gray-500">
|
||||
Codex config.toml 配置内容
|
||||
</p>
|
||||
<p className="text-xs text-gray-500">Codex config.toml 配置内容</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -98,9 +98,7 @@ const KimiModelSelector: React.FC<KimiModelSelectorProps> = ({
|
||||
onChange: (value: string) => void;
|
||||
}> = ({ label, value, onChange }) => (
|
||||
<div className="space-y-2">
|
||||
<label className="block text-sm font-medium text-gray-900">
|
||||
{label}
|
||||
</label>
|
||||
<label className="block text-sm font-medium text-gray-900">{label}</label>
|
||||
<div className="relative">
|
||||
<select
|
||||
value={value}
|
||||
@@ -132,9 +130,7 @@ const KimiModelSelector: React.FC<KimiModelSelectorProps> = ({
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<h3 className="text-sm font-medium text-gray-900">
|
||||
模型配置
|
||||
</h3>
|
||||
<h3 className="text-sm font-medium text-gray-900">模型配置</h3>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => debouncedKey && fetchModelsWithKey(debouncedKey)}
|
||||
@@ -148,10 +144,7 @@ const KimiModelSelector: React.FC<KimiModelSelectorProps> = ({
|
||||
|
||||
{error && (
|
||||
<div className="flex items-center gap-2 p-3 bg-red-100 border border-red-500/20 rounded-lg">
|
||||
<AlertCircle
|
||||
size={16}
|
||||
className="text-red-500 flex-shrink-0"
|
||||
/>
|
||||
<AlertCircle size={16} className="text-red-500 flex-shrink-0" />
|
||||
<p className="text-red-500 text-xs">{error}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -25,7 +25,11 @@ const PresetSelector: React.FC<PresetSelectorProps> = ({
|
||||
onCustomClick,
|
||||
customLabel = "自定义",
|
||||
}) => {
|
||||
const getButtonClass = (index: number, isOfficial?: boolean, category?: ProviderCategory) => {
|
||||
const getButtonClass = (
|
||||
index: number,
|
||||
isOfficial?: boolean,
|
||||
category?: ProviderCategory,
|
||||
) => {
|
||||
const isSelected = selectedIndex === index;
|
||||
const baseClass =
|
||||
"inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors";
|
||||
@@ -63,7 +67,7 @@ const PresetSelector: React.FC<PresetSelectorProps> = ({
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className={`${getButtonClass(-1)} ${selectedIndex === -1 ? '' : ''}`}
|
||||
className={`${getButtonClass(-1)} ${selectedIndex === -1 ? "" : ""}`}
|
||||
onClick={onCustomClick}
|
||||
>
|
||||
{customLabel}
|
||||
@@ -72,19 +76,23 @@ const PresetSelector: React.FC<PresetSelectorProps> = ({
|
||||
<button
|
||||
key={index}
|
||||
type="button"
|
||||
className={getButtonClass(index, preset.isOfficial, preset.category)}
|
||||
className={getButtonClass(
|
||||
index,
|
||||
preset.isOfficial,
|
||||
preset.category,
|
||||
)}
|
||||
onClick={() => onSelectPreset(index)}
|
||||
>
|
||||
{(preset.isOfficial || preset.category === "official") && <Zap size={14} />}
|
||||
{(preset.isOfficial || preset.category === "official") && (
|
||||
<Zap size={14} />
|
||||
)}
|
||||
{preset.name}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
{getDescription() && (
|
||||
<p className="text-sm text-gray-500">
|
||||
{getDescription()}
|
||||
</p>
|
||||
<p className="text-sm text-gray-500">{getDescription()}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user