refactor: remove required constraints and empty API key fields
- Remove 'required' attribute from Codex auth.json textarea - Remove conditional 'required' logic from API key input field - Clean up Codex Official preset by removing null OPENAI_API_KEY entry - Allow more flexible form validation while maintaining backend checks
This commit is contained in:
@@ -35,7 +35,6 @@ export const CodexAuthSection: React.FC<CodexAuthSectionProps> = ({
|
||||
onBlur={onBlur}
|
||||
placeholder={t("codexConfig.authJsonPlaceholder")}
|
||||
rows={6}
|
||||
required
|
||||
className="w-full px-3 py-2 border border-border-default dark:bg-gray-800 dark:text-gray-100 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 transition-colors resize-y min-h-[8rem]"
|
||||
autoComplete="off"
|
||||
autoCorrect="off"
|
||||
|
||||
@@ -48,7 +48,6 @@ export function ApiKeySection({
|
||||
label={label}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
required={category !== "official"}
|
||||
placeholder={
|
||||
category === "official"
|
||||
? finalPlaceholder.official
|
||||
|
||||
@@ -62,9 +62,7 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
||||
websiteUrl: "https://chatgpt.com/codex",
|
||||
isOfficial: true,
|
||||
category: "official",
|
||||
auth: {
|
||||
OPENAI_API_KEY: null,
|
||||
},
|
||||
auth: {},
|
||||
config: ``,
|
||||
theme: {
|
||||
icon: "codex",
|
||||
|
||||
Reference in New Issue
Block a user