refactor: unify directory structure and extract shared components

- Migrate all form components from ProviderForm/ to providers/forms/
- Create shared components to eliminate code duplication:
  * ApiKeySection: unified API key input with "Get API Key" link
  * EndpointField: unified endpoint URL input with manage button
- Refactor ClaudeFormFields (-31% lines) and CodexFormFields (-33% lines)
- Update all import paths to use new locations
- Reduce code duplication from ~12% to ~7%

This change improves maintainability and makes the codebase more DRY.
This commit is contained in:
Jason
2025-10-17 14:31:34 +08:00
parent 54b0b3b139
commit c1f5ddf763
12 changed files with 201 additions and 148 deletions

View File

@@ -13,7 +13,7 @@ import {
type CodexProviderPreset,
} from "@/config/codexProviderPresets";
import { applyTemplateValues } from "@/utils/providerConfigUtils";
import CodexConfigEditor from "@/components/ProviderForm/CodexConfigEditor";
import CodexConfigEditor from "./CodexConfigEditor";
import { CommonConfigEditor } from "./CommonConfigEditor";
import { ProviderPresetSelector } from "./ProviderPresetSelector";
import { BasicFormFields } from "./BasicFormFields";