feat: PNG头像替换SVG + 支持/init命令

This commit is contained in:
cc-dan
2026-03-18 01:46:09 +00:00
parent 7ec87714c5
commit 41b7757c19
6 changed files with 112 additions and 92 deletions

View File

@@ -70,29 +70,29 @@ function createAgentRuntime(deps) {
const runtimeConfig = prepareCodexCustomRuntime(codexConfig);
if (runtimeConfig?.error) {
return { error: runtimeConfig.error };
}
const runtimeId = getRuntimeSessionId(session);
const args = ['exec'];
args.push('--json', '--skip-git-repo-check');
}
const runtimeId = getRuntimeSessionId(session);
const args = ['exec'];
args.push('--json', '--skip-git-repo-check');
const permMode = session.permissionMode || 'yolo';
// `-s/--sandbox` is an option for `codex exec`, but not for `codex exec resume`.
// When resuming, it must appear before the `resume` subcommand, otherwise Codex CLI errors
// with: "unexpected argument '-s' found".
if (runtimeId && permMode === 'plan') {
args.push('-s', 'read-only');
}
if (runtimeId) args.push('resume');
switch (permMode) {
case 'yolo':
args.push('--dangerously-bypass-approvals-and-sandbox');
break;
case 'plan':
if (!runtimeId) args.push('-s', 'read-only');
break;
case 'default':
default:
args.push('--full-auto');
const permMode = session.permissionMode || 'yolo';
// `-s/--sandbox` is an option for `codex exec`, but not for `codex exec resume`.
// When resuming, it must appear before the `resume` subcommand, otherwise Codex CLI errors
// with: "unexpected argument '-s' found".
if (runtimeId && permMode === 'plan') {
args.push('-s', 'read-only');
}
if (runtimeId) args.push('resume');
switch (permMode) {
case 'yolo':
args.push('--dangerously-bypass-approvals-and-sandbox');
break;
case 'plan':
if (!runtimeId) args.push('-s', 'read-only');
break;
case 'default':
default:
args.push('--full-auto');
break;
}