refactor(codex): remove configuration wizard and unify provider setup experience

- Remove CodexQuickWizardModal component (~300 lines)
- Add "Custom (Blank Template)" preset with annotated TOML template
- Unify configuration experience across Claude/Codex/Gemini
- Remove wizard-related i18n keys, keep apiUrlLabel for CodexFormFields
- Simplify component integration by removing wizard state management

This change reduces code complexity by ~250 lines while providing better
user education through commented configuration templates in Chinese.

Users can now:
1. Select "Custom (Blank Template)" preset
2. See annotated TOML template with inline documentation
3. Follow step-by-step comments to configure custom providers

BREAKING CHANGE: Configuration wizard UI removed, replaced with template-based approach
This commit is contained in:
Jason
2025-11-16 12:29:18 +08:00
parent 031ea3a58f
commit 6a6980c82c
7 changed files with 49 additions and 419 deletions

View File

@@ -220,9 +220,6 @@ export function ProviderForm({
[originalHandleCodexConfigChange, debouncedValidate],
);
const [isCodexTemplateModalOpen, setIsCodexTemplateModalOpen] =
useState(false);
useEffect(() => {
form.reset(defaultValues);
}, [defaultValues, form]);
@@ -615,11 +612,6 @@ export function ProviderForm({
onPresetChange={handlePresetChange}
category={category}
appId={appId}
onOpenWizard={
appId === "codex"
? () => setIsCodexTemplateModalOpen(true)
: undefined
}
/>
)}
@@ -739,10 +731,6 @@ export function ProviderForm({
commonConfigError={codexCommonConfigError}
authError={codexAuthError}
configError={codexConfigError}
onWebsiteUrlChange={(url) => form.setValue("websiteUrl", url)}
onNameChange={(name) => form.setValue("name", name)}
isTemplateModalOpen={isCodexTemplateModalOpen}
setIsTemplateModalOpen={setIsCodexTemplateModalOpen}
/>
{/* 配置验证错误显示 */}
<FormField