codex-to-im 1.0.34 → 1.0.35
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/daemon.mjs +20 -6
- package/package.json +1 -1
package/dist/daemon.mjs
CHANGED
|
@@ -16201,6 +16201,19 @@ function toUserVisibleCommandError(command, error) {
|
|
|
16201
16201
|
}
|
|
16202
16202
|
return `${command} \u6267\u884C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`;
|
|
16203
16203
|
}
|
|
16204
|
+
function pad2(value) {
|
|
16205
|
+
return String(value).padStart(2, "0");
|
|
16206
|
+
}
|
|
16207
|
+
function formatCommandDateTime(value) {
|
|
16208
|
+
const trimmed = value?.trim();
|
|
16209
|
+
if (!trimmed) return "-";
|
|
16210
|
+
const date = new Date(trimmed);
|
|
16211
|
+
if (Number.isNaN(date.getTime())) return trimmed;
|
|
16212
|
+
return [
|
|
16213
|
+
`${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`,
|
|
16214
|
+
`${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())}`
|
|
16215
|
+
].join(" ");
|
|
16216
|
+
}
|
|
16204
16217
|
function stripStoredAttachmentMarker(content) {
|
|
16205
16218
|
return content.replace(/\n?<!--files:[\s\S]*?-->$/u, "").trim();
|
|
16206
16219
|
}
|
|
@@ -16258,7 +16271,7 @@ function formatRuntimeStatus(session) {
|
|
|
16258
16271
|
}
|
|
16259
16272
|
function formatMirrorStatus(session) {
|
|
16260
16273
|
if (session?.mirror_status === "watching") {
|
|
16261
|
-
return session.mirror_last_event_at ? `\u76D1\u542C\u4E2D \xB7 \u6700\u8FD1\u540C\u6B65 ${session.mirror_last_event_at}` : "\u76D1\u542C\u4E2D";
|
|
16274
|
+
return session.mirror_last_event_at ? `\u76D1\u542C\u4E2D \xB7 \u6700\u8FD1\u540C\u6B65 ${formatCommandDateTime(session.mirror_last_event_at)}` : "\u76D1\u542C\u4E2D";
|
|
16262
16275
|
}
|
|
16263
16276
|
if (session?.mirror_status === "stale") {
|
|
16264
16277
|
return "\u5F85\u6062\u590D\uFF08\u6682\u65F6\u6CA1\u5B9A\u4F4D\u5230\u684C\u9762 thread \u6587\u4EF6\uFF09";
|
|
@@ -16294,14 +16307,15 @@ function formatCommandTimestamp(value) {
|
|
|
16294
16307
|
if (!trimmed) return "-";
|
|
16295
16308
|
const parsed = Date.parse(trimmed);
|
|
16296
16309
|
if (!Number.isFinite(parsed)) return trimmed;
|
|
16310
|
+
const localized = formatCommandDateTime(trimmed);
|
|
16297
16311
|
const diffMs = Math.max(0, Date.now() - parsed);
|
|
16298
16312
|
const diffMinutes = Math.floor(diffMs / 6e4);
|
|
16299
|
-
if (diffMinutes < 1) return `${
|
|
16300
|
-
if (diffMinutes < 60) return `${
|
|
16313
|
+
if (diffMinutes < 1) return `${localized}\uFF08\u521A\u521A\uFF09`;
|
|
16314
|
+
if (diffMinutes < 60) return `${localized}\uFF08${diffMinutes} \u5206\u949F\u524D\uFF09`;
|
|
16301
16315
|
const diffHours = Math.floor(diffMinutes / 60);
|
|
16302
|
-
if (diffHours < 24) return `${
|
|
16316
|
+
if (diffHours < 24) return `${localized}\uFF08${diffHours} \u5C0F\u65F6\u524D\uFF09`;
|
|
16303
16317
|
const diffDays = Math.floor(diffHours / 24);
|
|
16304
|
-
return `${
|
|
16318
|
+
return `${localized}\uFF08${diffDays} \u5929\u524D\uFF09`;
|
|
16305
16319
|
}
|
|
16306
16320
|
function formatHealthProcessProbe(diagnosis) {
|
|
16307
16321
|
if (!diagnosis.processProbe) {
|
|
@@ -17891,7 +17905,7 @@ async function handleBridgeCommand(adapter, msg, text2, deps) {
|
|
|
17891
17905
|
[
|
|
17892
17906
|
["\u6807\u9898", getSessionDisplayName(draftSession, draftSession.working_directory)],
|
|
17893
17907
|
["\u76EE\u5F55", formatCommandPath(draftSession.working_directory)],
|
|
17894
|
-
["\u8FC7\u671F\u65F6\u95F4", draftSession.expires_at
|
|
17908
|
+
["\u8FC7\u671F\u65F6\u95F4", formatCommandDateTime(draftSession.expires_at)],
|
|
17895
17909
|
["\u6A21\u5F0F", "ask"]
|
|
17896
17910
|
],
|
|
17897
17911
|
["\u8FD9\u662F\u9690\u85CF\u7684\u8349\u7A3F\u7EBF\u7A0B\uFF0C\u4E0D\u4F1A\u51FA\u73B0\u5728\u5E38\u89C4\u4F1A\u8BDD\u5217\u8868\u4E2D\u3002"],
|
package/package.json
CHANGED