@ycodium-ai/agent-codex 0.2.2868 → 0.2.2874
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -16
- package/locales/zh-CN.json +9 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -867,6 +867,15 @@ function isMissingThreadResumeError(message) {
|
|
|
867
867
|
if (!lower.includes("thread")) return false;
|
|
868
868
|
return MISSING_THREAD_RESUME_ERROR_SNIPPETS.some((snippet) => lower.includes(snippet));
|
|
869
869
|
}
|
|
870
|
+
function missingThreadResumeError(threadId, cause) {
|
|
871
|
+
return Object.assign(
|
|
872
|
+
new Error(
|
|
873
|
+
`Codex could not find this conversation (thread ${threadId}) in its history, so it cannot continue here. Start a new thread to continue.`,
|
|
874
|
+
{ cause }
|
|
875
|
+
),
|
|
876
|
+
{ code: "resume-thread-missing" }
|
|
877
|
+
);
|
|
878
|
+
}
|
|
870
879
|
function isActiveWriterConflict(message) {
|
|
871
880
|
return message.toLowerCase().includes("already has an active writer");
|
|
872
881
|
}
|
|
@@ -3569,10 +3578,7 @@ var CodexSessionRuntime = class {
|
|
|
3569
3578
|
).catch((error) => {
|
|
3570
3579
|
const message = error instanceof Error ? error.message : String(error);
|
|
3571
3580
|
if (!isMissingThreadResumeError(message)) throw error;
|
|
3572
|
-
throw
|
|
3573
|
-
`Codex could not find this conversation (thread ${resume.threadId}) in its history, so it cannot continue here. Start a new thread to continue.`,
|
|
3574
|
-
{ cause: error }
|
|
3575
|
-
);
|
|
3581
|
+
throw missingThreadResumeError(resume.threadId, error);
|
|
3576
3582
|
}) : await this.rpc.request("thread/start", startParams, 0);
|
|
3577
3583
|
const opened = decodeThreadOpen(result);
|
|
3578
3584
|
this.nativeThreadId = opened.threadId;
|
|
@@ -4078,20 +4084,11 @@ async function startCodexMcpOAuth(input) {
|
|
|
4078
4084
|
}
|
|
4079
4085
|
|
|
4080
4086
|
// src/models.ts
|
|
4087
|
+
import { REASONING_OPTION_LABEL, reasoningEffortShortLabel } from "@ycodium-ai/plugin-api/executor";
|
|
4081
4088
|
var MODEL_LIST_MAX_PAGES = 20;
|
|
4082
4089
|
var MODEL_LIST_TIMEOUT_MS = 15e3;
|
|
4083
|
-
var REASONING_EFFORT_LABELS = {
|
|
4084
|
-
none: "None",
|
|
4085
|
-
minimal: "Minimal",
|
|
4086
|
-
low: "Low",
|
|
4087
|
-
medium: "Medium",
|
|
4088
|
-
high: "High",
|
|
4089
|
-
xhigh: "Extra High",
|
|
4090
|
-
max: "Max",
|
|
4091
|
-
ultra: "Ultra"
|
|
4092
|
-
};
|
|
4093
4090
|
var DEFAULT_SERVICE_TIER_ID = "default";
|
|
4094
|
-
var reasoningEffortLabel = (effort) =>
|
|
4091
|
+
var reasoningEffortLabel = (effort) => reasoningEffortShortLabel(effort) ?? effort;
|
|
4095
4092
|
function codexModelDisplayName(displayName) {
|
|
4096
4093
|
return displayName.replace(/^gpt/i, "GPT").replace(/-([a-z])/g, (_, c) => `-${c.toUpperCase()}`);
|
|
4097
4094
|
}
|
|
@@ -4116,7 +4113,7 @@ function reasoningDescriptor(row) {
|
|
|
4116
4113
|
if (options.length === 0) return null;
|
|
4117
4114
|
return {
|
|
4118
4115
|
id: "reasoningEffort",
|
|
4119
|
-
label:
|
|
4116
|
+
label: REASONING_OPTION_LABEL,
|
|
4120
4117
|
type: "select",
|
|
4121
4118
|
options,
|
|
4122
4119
|
...defaultEffort ? { currentValue: defaultEffort } : {}
|
package/locales/zh-CN.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"shadowHomePath": {
|
|
14
14
|
"title": "影子目录路径",
|
|
15
|
-
"description": "
|
|
15
|
+
"description": "账号专用的 Codex 目录。auth.json 单独保存,其余状态仍与 CODEX_HOME 共用。",
|
|
16
16
|
"placeholder": "~/.codex-personal"
|
|
17
17
|
},
|
|
18
18
|
"launchArgs": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"account": {
|
|
24
|
-
"method": "
|
|
24
|
+
"method": "账号连接方式",
|
|
25
25
|
"existing": "使用现有 Codex 配置",
|
|
26
26
|
"chatgpt": "ChatGPT 登录",
|
|
27
27
|
"apiKey": "API URL 和密钥",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"key": "API 密钥",
|
|
30
30
|
"keyStoredPlaceholder": "已存储的密钥 — 输入新值以替换",
|
|
31
31
|
"apiRequired": "请输入 HTTP 或 HTTPS API URL 和 API 密钥。",
|
|
32
|
-
"loginHint": "
|
|
33
|
-
"detecting": "
|
|
34
|
-
"detectFailed": "
|
|
35
|
-
"noAccounts": "在这台机器上未找到 ChatGPT
|
|
36
|
-
"addAnother": "登录其他 ChatGPT
|
|
32
|
+
"loginHint": "使用这台机器上已有的账号,或登录其他账号。",
|
|
33
|
+
"detecting": "正在检查这台机器上的账号...",
|
|
34
|
+
"detectFailed": "无法检查账号。请重试。",
|
|
35
|
+
"noAccounts": "在这台机器上未找到 ChatGPT 账号。",
|
|
36
|
+
"addAnother": "登录其他 ChatGPT 账号",
|
|
37
37
|
"useAccount": "使用 {{email}}",
|
|
38
38
|
"alreadyAdded": "已添加",
|
|
39
39
|
"retry": "再次检查",
|
|
40
|
-
"duplicate": "此 ChatGPT
|
|
41
|
-
"directoryUnavailable": "
|
|
40
|
+
"duplicate": "此 ChatGPT 账号已作为 {{name}} 可用。",
|
|
41
|
+
"directoryUnavailable": "无法在这台机器上为单独的账号做好准备。请检查连接后重试。",
|
|
42
42
|
"addAndSignIn": "添加并登录"
|
|
43
43
|
},
|
|
44
44
|
"usage": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-codex",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2874",
|
|
4
4
|
"description": "Codex executor: Codex CLI over the app-server JSON-RPC protocol.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"tailwindcss": "^4.0.0",
|
|
30
30
|
"typescript": "~6.0.3",
|
|
31
31
|
"vite-plus": "0.2.2",
|
|
32
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
32
|
+
"@ycodium-ai/plugin-api": "0.2.2874",
|
|
33
33
|
"ycodium-executor-testing": "0.0.0"
|
|
34
34
|
},
|
|
35
35
|
"ycodium": {
|