feat(codex): add remote compaction toggle for third-party providers

Write model_providers name as "OpenAI" to let Codex attempt remote
compaction through compatible endpoints. Hidden for official providers.
This commit is contained in:
Jason
2026-05-28 11:57:54 +08:00
parent a2ac21d0a6
commit af60c7ed2c
9 changed files with 215 additions and 0 deletions
@@ -7,6 +7,10 @@ interface CodexConfigEditorProps {
configValue: string;
providerName?: string;
showRemoteCompaction?: boolean;
onAuthChange: (value: string) => void;
onConfigChange: (value: string) => void;
@@ -37,6 +41,8 @@ interface CodexConfigEditorProps {
const CodexConfigEditor: React.FC<CodexConfigEditorProps> = ({
authValue,
configValue,
providerName,
showRemoteCompaction,
onAuthChange,
onConfigChange,
onAuthBlur,
@@ -72,6 +78,8 @@ const CodexConfigEditor: React.FC<CodexConfigEditorProps> = ({
<CodexConfigSection
value={configValue}
onChange={onConfigChange}
providerName={providerName}
showRemoteCompaction={showRemoteCompaction}
useCommonConfig={useCommonConfig}
onCommonConfigToggle={onCommonConfigToggle}
onEditCommonConfig={() => setIsCommonConfigModalOpen(true)}