feat: enhance session UX and codex defaults
This commit is contained in:
@@ -6,6 +6,7 @@ function createAgentRuntime(deps) {
|
||||
MODEL_MAP,
|
||||
loadModelConfig,
|
||||
applyCustomTemplateToSettings,
|
||||
getDefaultCodexModel,
|
||||
loadCodexConfig,
|
||||
prepareCodexCustomRuntime,
|
||||
wsSend,
|
||||
@@ -96,13 +97,13 @@ function createAgentRuntime(deps) {
|
||||
break;
|
||||
}
|
||||
|
||||
const effectiveModel = session.model;
|
||||
const effectiveModel = session.model || getDefaultCodexModel();
|
||||
if (effectiveModel) {
|
||||
const raw = String(effectiveModel).trim();
|
||||
// cc-web UI supports "gpt-5.4(high)" style selection, but Codex CLI expects:
|
||||
// - model: "gpt-5.4"
|
||||
// - reasoning effort: config key `model_reasoning_effort = "high"`
|
||||
const m = raw.match(/^(.*)\((medium|high|xhigh)\)\s*$/i);
|
||||
const m = raw.match(/^(.*)\((low|medium|high|xhigh)\)\s*$/i);
|
||||
if (m) {
|
||||
const base = String(m[1] || '').trim();
|
||||
const lvl = String(m[2] || '').trim().toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user