codex-to-im 1.0.36 → 1.0.38
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/cli.mjs +8 -0
- package/dist/daemon.mjs +49 -3
- package/dist/ui-server.mjs +49 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -36,6 +36,8 @@ var DEFAULT_WORKSPACE_ROOT = path.join(os.homedir(), "cx2im");
|
|
|
36
36
|
var CTI_HOME = process.env.CTI_HOME || DEFAULT_CTI_HOME;
|
|
37
37
|
var CONFIG_PATH = path.join(CTI_HOME, "config.env");
|
|
38
38
|
var CONFIG_V2_PATH = path.join(CTI_HOME, "config.v2.json");
|
|
39
|
+
var DEFAULT_STREAM_STATUS_IDLE_START_SECONDS = 180;
|
|
40
|
+
var DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS = 10;
|
|
39
41
|
function expandHomePath(value) {
|
|
40
42
|
if (!value) return value;
|
|
41
43
|
if (value === "~") return os.homedir();
|
|
@@ -168,6 +170,8 @@ function migrateLegacyEnvToV2(env) {
|
|
|
168
170
|
defaultModel: env.get("CTI_DEFAULT_MODEL") || void 0,
|
|
169
171
|
defaultMode: env.get("CTI_DEFAULT_MODE") || "code",
|
|
170
172
|
historyMessageLimit: parsePositiveInt(env.get("CTI_HISTORY_MESSAGE_LIMIT")) ?? 8,
|
|
173
|
+
streamStatusIdleStartSeconds: parsePositiveInt(env.get("CTI_STREAM_STATUS_IDLE_START_SECONDS")) ?? DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
174
|
+
streamStatusCheckIntervalSeconds: parsePositiveInt(env.get("CTI_STREAM_STATUS_CHECK_INTERVAL_SECONDS")) ?? DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
171
175
|
codexSkipGitRepoCheck: env.has("CTI_CODEX_SKIP_GIT_REPO_CHECK") ? env.get("CTI_CODEX_SKIP_GIT_REPO_CHECK") === "true" : true,
|
|
172
176
|
codexSandboxMode: parseSandboxMode(env.get("CTI_CODEX_SANDBOX_MODE")) ?? "workspace-write",
|
|
173
177
|
codexReasoningEffort: parseReasoningEffort(env.get("CTI_CODEX_REASONING_EFFORT")) ?? "medium",
|
|
@@ -190,6 +194,8 @@ function expandConfig(v2) {
|
|
|
190
194
|
defaultModel: v2.runtime.defaultModel,
|
|
191
195
|
defaultMode: v2.runtime.defaultMode || "code",
|
|
192
196
|
historyMessageLimit: v2.runtime.historyMessageLimit ?? 8,
|
|
197
|
+
streamStatusIdleStartSeconds: v2.runtime.streamStatusIdleStartSeconds ?? DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
198
|
+
streamStatusCheckIntervalSeconds: v2.runtime.streamStatusCheckIntervalSeconds ?? DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
193
199
|
codexSkipGitRepoCheck: v2.runtime.codexSkipGitRepoCheck ?? true,
|
|
194
200
|
codexSandboxMode: v2.runtime.codexSandboxMode ?? "workspace-write",
|
|
195
201
|
codexReasoningEffort: v2.runtime.codexReasoningEffort ?? "medium",
|
|
@@ -214,6 +220,8 @@ function loadConfig() {
|
|
|
214
220
|
defaultWorkspaceRoot: DEFAULT_WORKSPACE_ROOT,
|
|
215
221
|
defaultMode: "code",
|
|
216
222
|
historyMessageLimit: 8,
|
|
223
|
+
streamStatusIdleStartSeconds: DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
224
|
+
streamStatusCheckIntervalSeconds: DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
217
225
|
codexSkipGitRepoCheck: true,
|
|
218
226
|
codexSandboxMode: "workspace-write",
|
|
219
227
|
codexReasoningEffort: "medium",
|
package/dist/daemon.mjs
CHANGED
|
@@ -5123,6 +5123,8 @@ var DEFAULT_WORKSPACE_ROOT = path.join(os.homedir(), "cx2im");
|
|
|
5123
5123
|
var CTI_HOME = process.env.CTI_HOME || DEFAULT_CTI_HOME;
|
|
5124
5124
|
var CONFIG_PATH = path.join(CTI_HOME, "config.env");
|
|
5125
5125
|
var CONFIG_V2_PATH = path.join(CTI_HOME, "config.v2.json");
|
|
5126
|
+
var DEFAULT_STREAM_STATUS_IDLE_START_SECONDS = 180;
|
|
5127
|
+
var DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS = 10;
|
|
5126
5128
|
function expandHomePath(value) {
|
|
5127
5129
|
if (!value) return value;
|
|
5128
5130
|
if (value === "~") return os.homedir();
|
|
@@ -5258,6 +5260,8 @@ function migrateLegacyEnvToV2(env) {
|
|
|
5258
5260
|
defaultModel: env.get("CTI_DEFAULT_MODEL") || void 0,
|
|
5259
5261
|
defaultMode: env.get("CTI_DEFAULT_MODE") || "code",
|
|
5260
5262
|
historyMessageLimit: parsePositiveInt(env.get("CTI_HISTORY_MESSAGE_LIMIT")) ?? 8,
|
|
5263
|
+
streamStatusIdleStartSeconds: parsePositiveInt(env.get("CTI_STREAM_STATUS_IDLE_START_SECONDS")) ?? DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
5264
|
+
streamStatusCheckIntervalSeconds: parsePositiveInt(env.get("CTI_STREAM_STATUS_CHECK_INTERVAL_SECONDS")) ?? DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
5261
5265
|
codexSkipGitRepoCheck: env.has("CTI_CODEX_SKIP_GIT_REPO_CHECK") ? env.get("CTI_CODEX_SKIP_GIT_REPO_CHECK") === "true" : true,
|
|
5262
5266
|
codexSandboxMode: parseSandboxMode(env.get("CTI_CODEX_SANDBOX_MODE")) ?? "workspace-write",
|
|
5263
5267
|
codexReasoningEffort: parseReasoningEffort(env.get("CTI_CODEX_REASONING_EFFORT")) ?? "medium",
|
|
@@ -5284,6 +5288,8 @@ function expandConfig(v2) {
|
|
|
5284
5288
|
defaultModel: v2.runtime.defaultModel,
|
|
5285
5289
|
defaultMode: v2.runtime.defaultMode || "code",
|
|
5286
5290
|
historyMessageLimit: v2.runtime.historyMessageLimit ?? 8,
|
|
5291
|
+
streamStatusIdleStartSeconds: v2.runtime.streamStatusIdleStartSeconds ?? DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
5292
|
+
streamStatusCheckIntervalSeconds: v2.runtime.streamStatusCheckIntervalSeconds ?? DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
5287
5293
|
codexSkipGitRepoCheck: v2.runtime.codexSkipGitRepoCheck ?? true,
|
|
5288
5294
|
codexSandboxMode: v2.runtime.codexSandboxMode ?? "workspace-write",
|
|
5289
5295
|
codexReasoningEffort: v2.runtime.codexReasoningEffort ?? "medium",
|
|
@@ -5308,6 +5314,8 @@ function loadConfig() {
|
|
|
5308
5314
|
defaultWorkspaceRoot: DEFAULT_WORKSPACE_ROOT,
|
|
5309
5315
|
defaultMode: "code",
|
|
5310
5316
|
historyMessageLimit: 8,
|
|
5317
|
+
streamStatusIdleStartSeconds: DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
5318
|
+
streamStatusCheckIntervalSeconds: DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
5311
5319
|
codexSkipGitRepoCheck: true,
|
|
5312
5320
|
codexSandboxMode: "workspace-write",
|
|
5313
5321
|
codexReasoningEffort: "medium",
|
|
@@ -5351,6 +5359,18 @@ function configToSettings(config2) {
|
|
|
5351
5359
|
"bridge_history_message_limit",
|
|
5352
5360
|
String(config2.historyMessageLimit && config2.historyMessageLimit > 0 ? config2.historyMessageLimit : 8)
|
|
5353
5361
|
);
|
|
5362
|
+
m.set(
|
|
5363
|
+
"bridge_stream_status_idle_start_seconds",
|
|
5364
|
+
String(
|
|
5365
|
+
config2.streamStatusIdleStartSeconds && config2.streamStatusIdleStartSeconds > 0 ? config2.streamStatusIdleStartSeconds : DEFAULT_STREAM_STATUS_IDLE_START_SECONDS
|
|
5366
|
+
)
|
|
5367
|
+
);
|
|
5368
|
+
m.set(
|
|
5369
|
+
"bridge_stream_status_check_interval_seconds",
|
|
5370
|
+
String(
|
|
5371
|
+
config2.streamStatusCheckIntervalSeconds && config2.streamStatusCheckIntervalSeconds > 0 ? config2.streamStatusCheckIntervalSeconds : DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS
|
|
5372
|
+
)
|
|
5373
|
+
);
|
|
5354
5374
|
m.set(
|
|
5355
5375
|
"bridge_codex_skip_git_repo_check",
|
|
5356
5376
|
config2.codexSkipGitRepoCheck === true ? "true" : "false"
|
|
@@ -5599,7 +5619,7 @@ var DEDUP_MAX = 1e3;
|
|
|
5599
5619
|
var MAX_FILE_SIZE = 20 * 1024 * 1024;
|
|
5600
5620
|
var TYPING_EMOJI = "Typing";
|
|
5601
5621
|
var CARD_THROTTLE_MS = 200;
|
|
5602
|
-
var INITIAL_STREAMING_STATUS = "\
|
|
5622
|
+
var INITIAL_STREAMING_STATUS = "\u5904\u7406\u4E2D";
|
|
5603
5623
|
var EMPTY_STREAMING_TOOLS = "";
|
|
5604
5624
|
var MIME_BY_TYPE = {
|
|
5605
5625
|
image: "image/png",
|
|
@@ -18953,6 +18973,7 @@ var STREAM_DEFAULTS = {
|
|
|
18953
18973
|
telegram: { intervalMs: 700, minDeltaChars: 20, maxChars: 3900 },
|
|
18954
18974
|
discord: { intervalMs: 1500, minDeltaChars: 40, maxChars: 1900 }
|
|
18955
18975
|
};
|
|
18976
|
+
var STREAM_STATUS_IDLE_START_MS = 18e4;
|
|
18956
18977
|
var STREAM_STATUS_HEARTBEAT_MS = 1e4;
|
|
18957
18978
|
function getStreamConfig(channelType = "telegram") {
|
|
18958
18979
|
const { store } = getBridgeContext();
|
|
@@ -18963,6 +18984,21 @@ function getStreamConfig(channelType = "telegram") {
|
|
|
18963
18984
|
const maxChars = parseInt(store.getSetting(`${prefix}max_chars`) || "", 10) || defaults.maxChars;
|
|
18964
18985
|
return { intervalMs, minDeltaChars, maxChars };
|
|
18965
18986
|
}
|
|
18987
|
+
function getStructuredStreamStatusConfig() {
|
|
18988
|
+
const { store } = getBridgeContext();
|
|
18989
|
+
const idleStartSeconds = parseInt(store.getSetting("bridge_stream_status_idle_start_seconds") || "", 10);
|
|
18990
|
+
const heartbeatSeconds = parseInt(store.getSetting("bridge_stream_status_check_interval_seconds") || "", 10);
|
|
18991
|
+
return {
|
|
18992
|
+
idleStartMs: Math.max(
|
|
18993
|
+
0,
|
|
18994
|
+
(Number.isFinite(idleStartSeconds) && idleStartSeconds > 0 ? idleStartSeconds : STREAM_STATUS_IDLE_START_MS / 1e3) * 1e3
|
|
18995
|
+
),
|
|
18996
|
+
heartbeatMs: Math.max(
|
|
18997
|
+
1e3,
|
|
18998
|
+
(Number.isFinite(heartbeatSeconds) && heartbeatSeconds > 0 ? heartbeatSeconds : STREAM_STATUS_HEARTBEAT_MS / 1e3) * 1e3
|
|
18999
|
+
)
|
|
19000
|
+
};
|
|
19001
|
+
}
|
|
18966
19002
|
function flushPreview(adapter, state, config2) {
|
|
18967
19003
|
if (state.degraded || !adapter.sendPreview) return;
|
|
18968
19004
|
const text2 = state.pendingText.length > config2.maxChars ? state.pendingText.slice(0, config2.maxChars) + "..." : state.pendingText;
|
|
@@ -18988,7 +19024,7 @@ function formatRuntimeDuration(ms) {
|
|
|
18988
19024
|
return `${hours}h ${minutes}m ${seconds}s`;
|
|
18989
19025
|
}
|
|
18990
19026
|
function formatInteractiveRuntimeStatus(elapsedMs, silentMs) {
|
|
18991
|
-
const parts = [`\u5DF2\u8FD0\u884C ${formatRuntimeDuration(elapsedMs)}`];
|
|
19027
|
+
const parts = [elapsedMs < 1e3 ? "\u5904\u7406\u4E2D" : `\u5DF2\u8FD0\u884C ${formatRuntimeDuration(elapsedMs)}`];
|
|
18992
19028
|
if (typeof silentMs === "number" && silentMs >= 0) {
|
|
18993
19029
|
parts.push(`\u6700\u8FD1 ${formatRuntimeDuration(silentMs)} \u65E0\u65B0\u8F93\u51FA`);
|
|
18994
19030
|
}
|
|
@@ -19002,7 +19038,15 @@ async function runInteractiveMessage(adapter, msg, text2, attachments, deps) {
|
|
|
19002
19038
|
const clearIntervalFn = deps.clearIntervalFn ?? ((handle) => clearInterval(handle));
|
|
19003
19039
|
const processMessageImpl = deps.processMessageImpl ?? processMessage;
|
|
19004
19040
|
const forwardPermissionRequestImpl = deps.forwardPermissionRequestImpl ?? forwardPermissionRequest;
|
|
19005
|
-
const
|
|
19041
|
+
const structuredStreamStatusConfig = getStructuredStreamStatusConfig();
|
|
19042
|
+
const streamStatusIdleDetectionStartMs = Math.max(
|
|
19043
|
+
0,
|
|
19044
|
+
deps.streamStatusIdleDetectionStartMs ?? structuredStreamStatusConfig.idleStartMs
|
|
19045
|
+
);
|
|
19046
|
+
const streamStatusHeartbeatMs = Math.max(
|
|
19047
|
+
1e3,
|
|
19048
|
+
deps.streamStatusHeartbeatMs ?? structuredStreamStatusConfig.heartbeatMs
|
|
19049
|
+
);
|
|
19006
19050
|
adapter.onMessageStart?.(msg.address.chatId, streamKey);
|
|
19007
19051
|
const taskAbort = new AbortController();
|
|
19008
19052
|
const taskId = `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
@@ -19151,6 +19195,8 @@ async function runInteractiveMessage(adapter, msg, text2, attachments, deps) {
|
|
|
19151
19195
|
clearStreamStatusHeartbeat();
|
|
19152
19196
|
return;
|
|
19153
19197
|
}
|
|
19198
|
+
const elapsedMs = nowMs() - taskStartedAt;
|
|
19199
|
+
if (elapsedMs < streamStatusIdleDetectionStartMs) return;
|
|
19154
19200
|
const silentMs = nowMs() - taskState.lastActivityAt;
|
|
19155
19201
|
if (silentMs < streamStatusHeartbeatMs) return;
|
|
19156
19202
|
pushRunningStatus(silentMs);
|
package/dist/ui-server.mjs
CHANGED
|
@@ -4604,6 +4604,8 @@ var DEFAULT_WORKSPACE_ROOT = path.join(os.homedir(), "cx2im");
|
|
|
4604
4604
|
var CTI_HOME = process.env.CTI_HOME || DEFAULT_CTI_HOME;
|
|
4605
4605
|
var CONFIG_PATH = path.join(CTI_HOME, "config.env");
|
|
4606
4606
|
var CONFIG_V2_PATH = path.join(CTI_HOME, "config.v2.json");
|
|
4607
|
+
var DEFAULT_STREAM_STATUS_IDLE_START_SECONDS = 180;
|
|
4608
|
+
var DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS = 10;
|
|
4607
4609
|
function expandHomePath(value) {
|
|
4608
4610
|
if (!value) return value;
|
|
4609
4611
|
if (value === "~") return os.homedir();
|
|
@@ -4739,6 +4741,8 @@ function migrateLegacyEnvToV2(env) {
|
|
|
4739
4741
|
defaultModel: env.get("CTI_DEFAULT_MODEL") || void 0,
|
|
4740
4742
|
defaultMode: env.get("CTI_DEFAULT_MODE") || "code",
|
|
4741
4743
|
historyMessageLimit: parsePositiveInt(env.get("CTI_HISTORY_MESSAGE_LIMIT")) ?? 8,
|
|
4744
|
+
streamStatusIdleStartSeconds: parsePositiveInt(env.get("CTI_STREAM_STATUS_IDLE_START_SECONDS")) ?? DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
4745
|
+
streamStatusCheckIntervalSeconds: parsePositiveInt(env.get("CTI_STREAM_STATUS_CHECK_INTERVAL_SECONDS")) ?? DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
4742
4746
|
codexSkipGitRepoCheck: env.has("CTI_CODEX_SKIP_GIT_REPO_CHECK") ? env.get("CTI_CODEX_SKIP_GIT_REPO_CHECK") === "true" : true,
|
|
4743
4747
|
codexSandboxMode: parseSandboxMode(env.get("CTI_CODEX_SANDBOX_MODE")) ?? "workspace-write",
|
|
4744
4748
|
codexReasoningEffort: parseReasoningEffort(env.get("CTI_CODEX_REASONING_EFFORT")) ?? "medium",
|
|
@@ -4765,6 +4769,8 @@ function expandConfig(v2) {
|
|
|
4765
4769
|
defaultModel: v2.runtime.defaultModel,
|
|
4766
4770
|
defaultMode: v2.runtime.defaultMode || "code",
|
|
4767
4771
|
historyMessageLimit: v2.runtime.historyMessageLimit ?? 8,
|
|
4772
|
+
streamStatusIdleStartSeconds: v2.runtime.streamStatusIdleStartSeconds ?? DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
4773
|
+
streamStatusCheckIntervalSeconds: v2.runtime.streamStatusCheckIntervalSeconds ?? DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
4768
4774
|
codexSkipGitRepoCheck: v2.runtime.codexSkipGitRepoCheck ?? true,
|
|
4769
4775
|
codexSandboxMode: v2.runtime.codexSandboxMode ?? "workspace-write",
|
|
4770
4776
|
codexReasoningEffort: v2.runtime.codexReasoningEffort ?? "medium",
|
|
@@ -4784,6 +4790,8 @@ function buildV2FileFromExpandedConfig(config, current) {
|
|
|
4784
4790
|
defaultModel: config.defaultModel,
|
|
4785
4791
|
defaultMode: config.defaultMode,
|
|
4786
4792
|
historyMessageLimit: config.historyMessageLimit,
|
|
4793
|
+
streamStatusIdleStartSeconds: config.streamStatusIdleStartSeconds,
|
|
4794
|
+
streamStatusCheckIntervalSeconds: config.streamStatusCheckIntervalSeconds,
|
|
4787
4795
|
codexSkipGitRepoCheck: config.codexSkipGitRepoCheck,
|
|
4788
4796
|
codexSandboxMode: config.codexSandboxMode,
|
|
4789
4797
|
codexReasoningEffort: config.codexReasoningEffort,
|
|
@@ -4814,6 +4822,8 @@ function loadConfig() {
|
|
|
4814
4822
|
defaultWorkspaceRoot: DEFAULT_WORKSPACE_ROOT,
|
|
4815
4823
|
defaultMode: "code",
|
|
4816
4824
|
historyMessageLimit: 8,
|
|
4825
|
+
streamStatusIdleStartSeconds: DEFAULT_STREAM_STATUS_IDLE_START_SECONDS,
|
|
4826
|
+
streamStatusCheckIntervalSeconds: DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS,
|
|
4817
4827
|
codexSkipGitRepoCheck: true,
|
|
4818
4828
|
codexSandboxMode: "workspace-write",
|
|
4819
4829
|
codexReasoningEffort: "medium",
|
|
@@ -4845,6 +4855,12 @@ function saveConfig(config) {
|
|
|
4845
4855
|
if (next.runtime.historyMessageLimit !== void 0) {
|
|
4846
4856
|
out += formatEnvLine("CTI_HISTORY_MESSAGE_LIMIT", String(next.runtime.historyMessageLimit));
|
|
4847
4857
|
}
|
|
4858
|
+
if (next.runtime.streamStatusIdleStartSeconds !== void 0) {
|
|
4859
|
+
out += formatEnvLine("CTI_STREAM_STATUS_IDLE_START_SECONDS", String(next.runtime.streamStatusIdleStartSeconds));
|
|
4860
|
+
}
|
|
4861
|
+
if (next.runtime.streamStatusCheckIntervalSeconds !== void 0) {
|
|
4862
|
+
out += formatEnvLine("CTI_STREAM_STATUS_CHECK_INTERVAL_SECONDS", String(next.runtime.streamStatusCheckIntervalSeconds));
|
|
4863
|
+
}
|
|
4848
4864
|
if (next.runtime.codexSkipGitRepoCheck !== void 0) {
|
|
4849
4865
|
out += formatEnvLine("CTI_CODEX_SKIP_GIT_REPO_CHECK", String(next.runtime.codexSkipGitRepoCheck));
|
|
4850
4866
|
}
|
|
@@ -4917,6 +4933,18 @@ function configToSettings(config) {
|
|
|
4917
4933
|
"bridge_history_message_limit",
|
|
4918
4934
|
String(config.historyMessageLimit && config.historyMessageLimit > 0 ? config.historyMessageLimit : 8)
|
|
4919
4935
|
);
|
|
4936
|
+
m.set(
|
|
4937
|
+
"bridge_stream_status_idle_start_seconds",
|
|
4938
|
+
String(
|
|
4939
|
+
config.streamStatusIdleStartSeconds && config.streamStatusIdleStartSeconds > 0 ? config.streamStatusIdleStartSeconds : DEFAULT_STREAM_STATUS_IDLE_START_SECONDS
|
|
4940
|
+
)
|
|
4941
|
+
);
|
|
4942
|
+
m.set(
|
|
4943
|
+
"bridge_stream_status_check_interval_seconds",
|
|
4944
|
+
String(
|
|
4945
|
+
config.streamStatusCheckIntervalSeconds && config.streamStatusCheckIntervalSeconds > 0 ? config.streamStatusCheckIntervalSeconds : DEFAULT_STREAM_STATUS_CHECK_INTERVAL_SECONDS
|
|
4946
|
+
)
|
|
4947
|
+
);
|
|
4920
4948
|
m.set(
|
|
4921
4949
|
"bridge_codex_skip_git_repo_check",
|
|
4922
4950
|
config.codexSkipGitRepoCheck === true ? "true" : "false"
|
|
@@ -7626,6 +7654,8 @@ function configToPayload(config) {
|
|
|
7626
7654
|
availableModels: availableCodexModels,
|
|
7627
7655
|
defaultMode: config.defaultMode,
|
|
7628
7656
|
historyMessageLimit: config.historyMessageLimit ?? 8,
|
|
7657
|
+
streamStatusIdleStartSeconds: config.streamStatusIdleStartSeconds ?? 180,
|
|
7658
|
+
streamStatusCheckIntervalSeconds: config.streamStatusCheckIntervalSeconds ?? 10,
|
|
7629
7659
|
codexSkipGitRepoCheck: config.codexSkipGitRepoCheck === true,
|
|
7630
7660
|
codexSandboxMode: config.codexSandboxMode || "workspace-write",
|
|
7631
7661
|
codexReasoningEffort: config.codexReasoningEffort || "medium",
|
|
@@ -7649,6 +7679,8 @@ function mergeConfig(payload) {
|
|
|
7649
7679
|
defaultModel: rawDefaultModel === void 0 ? current.defaultModel : rawDefaultModel === "" ? void 0 : availableCodexModelSlugs.has(rawDefaultModel) ? rawDefaultModel : current.defaultModel,
|
|
7650
7680
|
defaultMode: payload.defaultMode === "plan" || payload.defaultMode === "ask" ? payload.defaultMode : "code",
|
|
7651
7681
|
historyMessageLimit: asPositiveInt(payload.historyMessageLimit) || current.historyMessageLimit || 8,
|
|
7682
|
+
streamStatusIdleStartSeconds: asPositiveInt(payload.streamStatusIdleStartSeconds) || current.streamStatusIdleStartSeconds || 180,
|
|
7683
|
+
streamStatusCheckIntervalSeconds: asPositiveInt(payload.streamStatusCheckIntervalSeconds) || current.streamStatusCheckIntervalSeconds || 10,
|
|
7652
7684
|
codexSkipGitRepoCheck: payload.codexSkipGitRepoCheck === true,
|
|
7653
7685
|
codexSandboxMode: payload.codexSandboxMode === "read-only" || payload.codexSandboxMode === "danger-full-access" ? payload.codexSandboxMode : "workspace-write",
|
|
7654
7686
|
codexReasoningEffort: payload.codexReasoningEffort === "minimal" || payload.codexReasoningEffort === "low" || payload.codexReasoningEffort === "high" || payload.codexReasoningEffort === "xhigh" ? payload.codexReasoningEffort : "medium",
|
|
@@ -9486,6 +9518,14 @@ function renderHtml() {
|
|
|
9486
9518
|
/history \u8FD4\u56DE\u6761\u6570
|
|
9487
9519
|
<input id="historyMessageLimit" type="number" min="1" max="20" value="8" />
|
|
9488
9520
|
</label>
|
|
9521
|
+
<label>
|
|
9522
|
+
\u9759\u9ED8\u68C0\u6D4B\u542F\u52A8\u65F6\u957F\uFF08\u79D2\uFF09
|
|
9523
|
+
<input id="streamStatusIdleStartSeconds" type="number" min="1" value="180" />
|
|
9524
|
+
</label>
|
|
9525
|
+
<label>
|
|
9526
|
+
\u9759\u9ED8\u68C0\u6D4B\u95F4\u9694\uFF08\u79D2\uFF09
|
|
9527
|
+
<input id="streamStatusCheckIntervalSeconds" type="number" min="1" value="10" />
|
|
9528
|
+
</label>
|
|
9489
9529
|
</div>
|
|
9490
9530
|
<label>
|
|
9491
9531
|
\u9ED8\u8BA4\u5DE5\u4F5C\u7A7A\u95F4
|
|
@@ -9515,7 +9555,7 @@ function renderHtml() {
|
|
|
9515
9555
|
</select>
|
|
9516
9556
|
</label>
|
|
9517
9557
|
</div>
|
|
9518
|
-
<div class="small">\u672A\u7ED1\u5B9A\u7684 IM \u804A\u5929\u4F1A\u5148\u8FDB\u5165\u4E34\u65F6\u8349\u7A3F\u7EBF\u7A0B\uFF08\u7B49\u540C <code>/t 0</code>\uFF09\uFF1B\u201C\u9ED8\u8BA4\u5DE5\u4F5C\u7A7A\u95F4\u201D\u53EA\u7528\u4E8E <code>/new proj1</code> \u8FD9\u7C7B\u76F8\u5BF9\u9879\u76EE\u540D\u3002\u7559\u7A7A\u65F6\u4F1A\u6309\u5F53\u524D\u7CFB\u7EDF\u81EA\u52A8\u56DE\u9000\u5230 <code>~/cx2im</code>\u3002\u9ED8\u8BA4\u6A21\u578B\u5019\u9009\u9879\u6765\u81EA\u542F\u52A8\u65F6\u8BFB\u53D6\u7684 Codex \u6A21\u578B\u7F13\u5B58\uFF1A\u9690\u85CF\u6A21\u578B\u4E0D\u4F1A\u5C55\u793A\uFF0CCLI only \u6A21\u578B\u4F1A\u6807\u6210\u201C\u4EC5 IM / CLI\u201D\u3002\u7559\u7A7A\u5219\u7EE7\u7EED\u8DDF\u968F Codex \u5F53\u524D\u9ED8\u8BA4\u6A21\u578B\u3002\u6587\u4EF6\u7CFB\u7EDF\u6743\u9650\u662F\u5168\u5C40\u9ED8\u8BA4\u503C\uFF0C\u601D\u8003\u7EA7\u522B\u53EF\u5728 IM \u4F1A\u8BDD\u91CC\u518D\u5355\u72EC\u8986\u76D6\u3002</div>
|
|
9558
|
+
<div class="small">\u672A\u7ED1\u5B9A\u7684 IM \u804A\u5929\u4F1A\u5148\u8FDB\u5165\u4E34\u65F6\u8349\u7A3F\u7EBF\u7A0B\uFF08\u7B49\u540C <code>/t 0</code>\uFF09\uFF1B\u201C\u9ED8\u8BA4\u5DE5\u4F5C\u7A7A\u95F4\u201D\u53EA\u7528\u4E8E <code>/new proj1</code> \u8FD9\u7C7B\u76F8\u5BF9\u9879\u76EE\u540D\u3002\u7559\u7A7A\u65F6\u4F1A\u6309\u5F53\u524D\u7CFB\u7EDF\u81EA\u52A8\u56DE\u9000\u5230 <code>~/cx2im</code>\u3002\u9ED8\u8BA4\u6A21\u578B\u5019\u9009\u9879\u6765\u81EA\u542F\u52A8\u65F6\u8BFB\u53D6\u7684 Codex \u6A21\u578B\u7F13\u5B58\uFF1A\u9690\u85CF\u6A21\u578B\u4E0D\u4F1A\u5C55\u793A\uFF0CCLI only \u6A21\u578B\u4F1A\u6807\u6210\u201C\u4EC5 IM / CLI\u201D\u3002\u7559\u7A7A\u5219\u7EE7\u7EED\u8DDF\u968F Codex \u5F53\u524D\u9ED8\u8BA4\u6A21\u578B\u3002\u6587\u4EF6\u7CFB\u7EDF\u6743\u9650\u662F\u5168\u5C40\u9ED8\u8BA4\u503C\uFF0C\u601D\u8003\u7EA7\u522B\u53EF\u5728 IM \u4F1A\u8BDD\u91CC\u518D\u5355\u72EC\u8986\u76D6\u3002\u9759\u9ED8\u68C0\u6D4B\u914D\u7F6E\u53EA\u5F71\u54CD\u98DE\u4E66\u957F\u4EFB\u52A1\u5E95\u90E8\u201C\u6700\u8FD1 X \u65E0\u65B0\u8F93\u51FA\u201D\u7684\u51FA\u73B0\u65F6\u673A\u3002</div>
|
|
9519
9559
|
<div class="small">\u5F53\u524D\u9700\u8981\u91CD\u542F Bridge \u7684\u914D\u7F6E\uFF1A<code>Runtime</code>\u3001<code>\u81EA\u52A8\u6279\u51C6\u5DE5\u5177\u6743\u9650</code>\u3001<code>\u5141\u8BB8\u5728\u672A\u4FE1\u4EFB Git \u76EE\u5F55\u8FD0\u884C Codex</code>\u3002\u901A\u9053\u5B9E\u4F8B\u7684\u63A5\u5165\u914D\u7F6E\u8BF7\u5728\u201C\u901A\u9053\u201D\u9875\u7EF4\u62A4\u3002</div>
|
|
9520
9560
|
<div class="checkbox-row">
|
|
9521
9561
|
<label class="checkbox"><input id="autoApprove" type="checkbox" /> \u81EA\u52A8\u6279\u51C6\u5DE5\u5177\u6743\u9650</label>
|
|
@@ -9835,6 +9875,8 @@ function renderHtml() {
|
|
|
9835
9875
|
runtime: document.getElementById('runtime').value,
|
|
9836
9876
|
defaultMode: document.getElementById('defaultMode').value,
|
|
9837
9877
|
historyMessageLimit: document.getElementById('historyMessageLimit').value,
|
|
9878
|
+
streamStatusIdleStartSeconds: document.getElementById('streamStatusIdleStartSeconds').value,
|
|
9879
|
+
streamStatusCheckIntervalSeconds: document.getElementById('streamStatusCheckIntervalSeconds').value,
|
|
9838
9880
|
defaultWorkspaceRoot: document.getElementById('defaultWorkspaceRoot').value,
|
|
9839
9881
|
defaultModel: document.getElementById('defaultModel').value,
|
|
9840
9882
|
codexSkipGitRepoCheck: document.getElementById('codexSkipGitRepoCheck').checked,
|
|
@@ -10012,6 +10054,8 @@ function renderHtml() {
|
|
|
10012
10054
|
defaultModel: '\u9ED8\u8BA4\u6A21\u578B',
|
|
10013
10055
|
defaultMode: '\u9ED8\u8BA4\u6A21\u5F0F',
|
|
10014
10056
|
historyMessageLimit: '/history \u8FD4\u56DE\u6761\u6570',
|
|
10057
|
+
streamStatusIdleStartSeconds: '\u9759\u9ED8\u68C0\u6D4B\u542F\u52A8\u65F6\u957F',
|
|
10058
|
+
streamStatusCheckIntervalSeconds: '\u9759\u9ED8\u68C0\u6D4B\u95F4\u9694',
|
|
10015
10059
|
codexSkipGitRepoCheck: '\u5141\u8BB8\u5728\u672A\u4FE1\u4EFB Git \u76EE\u5F55\u8FD0\u884C Codex',
|
|
10016
10060
|
codexSandboxMode: 'Codex \u6587\u4EF6\u7CFB\u7EDF\u6743\u9650',
|
|
10017
10061
|
codexReasoningEffort: 'Codex \u601D\u8003\u7EA7\u522B',
|
|
@@ -10033,6 +10077,8 @@ function renderHtml() {
|
|
|
10033
10077
|
'defaultModel',
|
|
10034
10078
|
'defaultMode',
|
|
10035
10079
|
'historyMessageLimit',
|
|
10080
|
+
'streamStatusIdleStartSeconds',
|
|
10081
|
+
'streamStatusCheckIntervalSeconds',
|
|
10036
10082
|
'codexSandboxMode',
|
|
10037
10083
|
'codexReasoningEffort',
|
|
10038
10084
|
'uiAllowLan',
|
|
@@ -10604,6 +10650,8 @@ function renderHtml() {
|
|
|
10604
10650
|
document.getElementById('runtime').value = config.runtime || 'codex';
|
|
10605
10651
|
document.getElementById('defaultMode').value = config.defaultMode || 'code';
|
|
10606
10652
|
document.getElementById('historyMessageLimit').value = String(config.historyMessageLimit || 8);
|
|
10653
|
+
document.getElementById('streamStatusIdleStartSeconds').value = String(config.streamStatusIdleStartSeconds || 180);
|
|
10654
|
+
document.getElementById('streamStatusCheckIntervalSeconds').value = String(config.streamStatusCheckIntervalSeconds || 10);
|
|
10607
10655
|
document.getElementById('defaultWorkspaceRoot').value = config.defaultWorkspaceRoot || '';
|
|
10608
10656
|
renderDefaultModelOptions(config);
|
|
10609
10657
|
document.getElementById('codexSkipGitRepoCheck').checked = config.codexSkipGitRepoCheck === true;
|
package/package.json
CHANGED