feat(codex): add synced model and reasoning defaults

This commit is contained in:
shenlvkang-collab committed 2026-10-07 17:34:25 +08:00
1 parent ac94f339ac
commit 16e44aa1d1
9 files changed
+182 -6

No files matched your search

+5
View File
@@ -45,6 +45,11 @@
// Exact English-source translations. Technical names, command examples, model
// names, keyboard chords, and user-authored content intentionally stay unchanged.
const ZH_CN = Object.freeze({
'Default Codex model': 'Codex 默认模型',
'Default Codex reasoning effort': 'Codex 默认思考强度',
'Use Codex configuration': '使用 Codex 配置',
'Model ID for new Codex sessions. Leave empty to use Codex configuration.': '新 Codex 会话使用的模型 ID。留空时使用 Codex 配置。',
'Applies to new sessions; supported levels depend on the model and Codex version. Custom endpoints keep their own settings.': '应用于新会话;可用强度取决于模型和 Codex 版本。自定义端点保留自己的设置。',
'Skip to terminal': '跳转到终端',
'Go to main page': '返回主页',
'Session tabs': '会话标签页',
+24
View File
@@ -2527,6 +2527,30 @@
<div class="set-group" id="appSettingsCodexGroup">
<div class="set-group-head"><h4>Codex</h4><span class="set-scope">synced</span></div>
<div class="set-group-body">
<div class="set-row" data-search="codex default model">
<div class="set-row-text">
<span class="set-row-label">Default Codex model</span>
<span class="set-row-desc">Model ID for new Codex sessions. Leave empty to use Codex configuration.</span>
</div>
<input id="appSettingsCodexModel" class="set-input" type="text" maxlength="100" aria-label="Default Codex model" placeholder="Use Codex configuration" autocomplete="off" spellcheck="false">
</div>
<div class="set-row" data-search="codex default reasoning effort thinking">
<div class="set-row-text">
<span class="set-row-label">Default Codex reasoning effort</span>
<span class="set-row-desc">Applies to new sessions; supported levels depend on the model and Codex version. Custom endpoints keep their own settings.</span>
</div>
<select id="appSettingsCodexReasoningEffort" class="set-select" aria-label="Default Codex reasoning effort">
<option value="">Use Codex configuration</option>
<option value="none">none</option>
<option value="minimal">minimal</option>
<option value="low">low</option>
<option value="medium">medium</option>
<option value="high">high</option>
<option value="xhigh">xhigh</option>
<option value="max">max</option>
<option value="ultra">ultra</option>
</select>
</div>
<div class="set-row" data-search="codex bypass approvals sandbox">
<div class="set-row-text">
<span class="set-row-label">Bypass approvals and sandbox</span>
+4
View File
@@ -526,6 +526,8 @@ Object.assign(CodemanApp.prototype, {
settings.codexDangerouslyBypassApprovals ?? false;
document.getElementById('appSettingsCodexAnimations').checked =
settings.codexAnimationsEnabled ?? false;
document.getElementById('appSettingsCodexModel').value = settings.codexModel ?? '';
document.getElementById('appSettingsCodexReasoningEffort').value = settings.codexReasoningEffort ?? '';
this._applyCodexSettingsVisibility();
// Claude Permissions settings
document.getElementById('appSettingsAgentTeams').checked = settings.agentTeamsEnabled ?? false;
@@ -2534,6 +2536,8 @@ Object.assign(CodemanApp.prototype, {
claudeMode: document.getElementById('appSettingsClaudeMode').value,
allowedTools: document.getElementById('appSettingsAllowedTools').value.trim(),
// Codex CLI settings
codexModel: document.getElementById('appSettingsCodexModel').value.trim(),
codexReasoningEffort: document.getElementById('appSettingsCodexReasoningEffort').value,
codexDangerouslyBypassApprovals: document.getElementById('appSettingsCodexDangerouslyBypassApprovals').checked,
codexAnimationsEnabled: document.getElementById('appSettingsCodexAnimations').checked,
// Claude Permissions settings