codex-to-im 1.0.26 → 1.0.28
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/README.md +14 -0
- package/README_EN.md +14 -0
- package/dist/cli.mjs +5 -2
- package/dist/daemon.mjs +28 -7
- package/dist/ui-server.mjs +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,6 +102,20 @@ codex-to-im status
|
|
|
102
102
|
codex-to-im stop
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
+
### 卸载
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
codex-to-im uninstall
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
说明:
|
|
112
|
+
|
|
113
|
+
- 该命令会停止本地 UI、停止 bridge,并尝试移除已安装的 bridge 开机自启动任务。
|
|
114
|
+
- 当前命令退出后,后台会尝试执行 `npm uninstall -g codex-to-im`;这一步不是立即完成。
|
|
115
|
+
- 可根据输出中的日志路径确认后台卸载结果;如果几秒后 `codex-to-im` 仍可执行,请手动运行 `npm uninstall -g codex-to-im`。
|
|
116
|
+
- 该命令不会删除 `~/.codex-to-im` 下的配置、日志和会话数据。
|
|
117
|
+
- 该命令也不会删除 `~/.codex/skills/codex-to-im`;如需彻底清理,请手动删除相关目录。
|
|
118
|
+
|
|
105
119
|
## 典型使用方式
|
|
106
120
|
|
|
107
121
|
### 1. 接管桌面线程
|
package/README_EN.md
CHANGED
|
@@ -102,6 +102,20 @@ If you want to stop the local UI and bridge:
|
|
|
102
102
|
codex-to-im stop
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
+
### Uninstall
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
codex-to-im uninstall
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Notes:
|
|
112
|
+
|
|
113
|
+
- This command stops the local UI, stops the bridge, and attempts to remove the installed bridge boot task if present.
|
|
114
|
+
- After the command exits, a background helper attempts to run `npm uninstall -g codex-to-im`; this step is not immediate.
|
|
115
|
+
- Check the log path printed by the command to confirm the uninstall result. If `codex-to-im` is still available a few seconds later, run `npm uninstall -g codex-to-im` manually.
|
|
116
|
+
- This command does not delete local config, logs, or session data under `~/.codex-to-im`.
|
|
117
|
+
- This command also does not delete `~/.codex/skills/codex-to-im`; remove those directories manually if you want a full local cleanup.
|
|
118
|
+
|
|
105
119
|
## Typical Workflows
|
|
106
120
|
|
|
107
121
|
### 1. Take over a desktop thread
|
package/dist/cli.mjs
CHANGED
|
@@ -657,9 +657,12 @@ async function main() {
|
|
|
657
657
|
[
|
|
658
658
|
`Stopped services. UI running=${result.ui.running ? "yes" : "no"}, Bridge running=${result.bridge.running ? "yes" : "no"}`,
|
|
659
659
|
result.autostart.installed ? `Bridge autostart still installed: ${result.autostart.taskName}` : "Bridge autostart removed.",
|
|
660
|
-
`
|
|
660
|
+
`Background npm uninstall scheduled via ${result.npmCommand}.`,
|
|
661
661
|
`Log: ${result.logPath}`,
|
|
662
|
-
"\u5F53\u524D\u547D\u4EE4\u9000\u51FA\u540E\uFF0C\u540E\u53F0\u4F1A\
|
|
662
|
+
"\u5F53\u524D\u547D\u4EE4\u9000\u51FA\u540E\uFF0C\u540E\u53F0\u4F1A\u5C1D\u8BD5\u6267\u884C npm uninstall -g codex-to-im\u3002",
|
|
663
|
+
"\u8FD9\u4E00\u6B65\u4E0D\u662F\u7ACB\u5373\u5B8C\u6210\uFF1B\u5982\u9700\u786E\u8BA4\u7ED3\u679C\uFF0C\u8BF7\u67E5\u770B\u4E0A\u9762\u7684\u65E5\u5FD7\u6587\u4EF6\u3002",
|
|
664
|
+
"\u5982\u679C\u51E0\u79D2\u540E codex-to-im \u4ECD\u53EF\u6267\u884C\uFF0C\u8BF7\u624B\u52A8\u8FD0\u884C\uFF1Anpm uninstall -g codex-to-im",
|
|
665
|
+
"\u672C\u547D\u4EE4\u4E0D\u4F1A\u5220\u9664 ~/.codex-to-im \u6216 ~/.codex/skills/codex-to-im\uFF0C\u8BF7\u6309\u9700\u624B\u52A8\u5220\u9664\u3002"
|
|
663
666
|
].join("\n") + "\n"
|
|
664
667
|
);
|
|
665
668
|
return;
|
package/dist/daemon.mjs
CHANGED
|
@@ -14729,8 +14729,8 @@ function walkSessionFiles(dirPath, target) {
|
|
|
14729
14729
|
}
|
|
14730
14730
|
}
|
|
14731
14731
|
function isDesktopLike(meta) {
|
|
14732
|
-
const originator = meta?.originator
|
|
14733
|
-
const source = meta?.source
|
|
14732
|
+
const originator = typeof meta?.originator === "string" ? meta.originator.toLowerCase() : "";
|
|
14733
|
+
const source = typeof meta?.source === "string" ? meta.source.toLowerCase() : "";
|
|
14734
14734
|
if (source === "exec") return false;
|
|
14735
14735
|
return originator.includes("desktop") || source === "vscode" || source === "desktop";
|
|
14736
14736
|
}
|
|
@@ -14862,9 +14862,9 @@ function parseDesktopSession(filePath, threadIndexEntries, archivedThreadIds) {
|
|
|
14862
14862
|
threadId,
|
|
14863
14863
|
filePath,
|
|
14864
14864
|
cwd,
|
|
14865
|
-
originator: parsed.payload.originator
|
|
14866
|
-
source: parsed.payload.source
|
|
14867
|
-
cliVersion: parsed.payload.cli_version
|
|
14865
|
+
originator: typeof parsed.payload.originator === "string" ? parsed.payload.originator : "Codex Desktop",
|
|
14866
|
+
source: typeof parsed.payload.source === "string" ? parsed.payload.source : void 0,
|
|
14867
|
+
cliVersion: typeof parsed.payload.cli_version === "string" ? parsed.payload.cli_version : void 0,
|
|
14868
14868
|
firstSeenAt,
|
|
14869
14869
|
lastEventAt,
|
|
14870
14870
|
title,
|
|
@@ -17230,8 +17230,10 @@ function buildIndexedCommandList(title, items, footer = [], markdown = false) {
|
|
|
17230
17230
|
return lines.join("\n").trim();
|
|
17231
17231
|
}
|
|
17232
17232
|
function buildDesktopThreadsCommandResponse(desktopSessions, markdown, showAll, limit = 10) {
|
|
17233
|
+
const actualCount = desktopSessions.length;
|
|
17234
|
+
const title = showAll ? `\u684C\u9762\u4F1A\u8BDD\uFF08\u5F53\u524D\u663E\u793A ${actualCount} \u6761\uFF0C\u6700\u591A ${MAX_DESKTOP_THREAD_LIST_LIMIT} \u6761\uFF09` : `\u6700\u8FD1 ${actualCount} \u6761\u684C\u9762\u4F1A\u8BDD`;
|
|
17233
17235
|
return buildIndexedCommandList(
|
|
17234
|
-
|
|
17236
|
+
title,
|
|
17235
17237
|
desktopSessions.map((session) => ({
|
|
17236
17238
|
heading: session.title || "\u672A\u547D\u540D\u7EBF\u7A0B",
|
|
17237
17239
|
details: [
|
|
@@ -17800,6 +17802,20 @@ function decrementQueuedCount(sessionId) {
|
|
|
17800
17802
|
}
|
|
17801
17803
|
syncSessionRuntimeState(sessionId);
|
|
17802
17804
|
}
|
|
17805
|
+
function resetPersistedInteractiveRuntimeState() {
|
|
17806
|
+
const { store } = getBridgeContext();
|
|
17807
|
+
for (const session of store.listSessions()) {
|
|
17808
|
+
const queuedCount = session.queued_count && session.queued_count > 0 ? session.queued_count : 0;
|
|
17809
|
+
if (queuedCount === 0 && session.runtime_status !== "running" && session.runtime_status !== "queued") {
|
|
17810
|
+
continue;
|
|
17811
|
+
}
|
|
17812
|
+
store.updateSession(session.id, {
|
|
17813
|
+
queued_count: 0,
|
|
17814
|
+
runtime_status: "idle",
|
|
17815
|
+
last_runtime_update_at: nowIso2()
|
|
17816
|
+
});
|
|
17817
|
+
}
|
|
17818
|
+
}
|
|
17803
17819
|
function formatRuntimeStatus(session) {
|
|
17804
17820
|
const status = session?.runtime_status || "idle";
|
|
17805
17821
|
const queuedCount = session?.queued_count && session.queued_count > 0 ? session.queued_count : 0;
|
|
@@ -18831,6 +18847,7 @@ async function start() {
|
|
|
18831
18847
|
console.log("[bridge-manager] Bridge not enabled (remote_bridge_enabled != true)");
|
|
18832
18848
|
return;
|
|
18833
18849
|
}
|
|
18850
|
+
resetPersistedInteractiveRuntimeState();
|
|
18834
18851
|
await syncConfiguredAdapters({ startLoops: false });
|
|
18835
18852
|
const startedCount = state.adapters.size;
|
|
18836
18853
|
if (startedCount === 0) {
|
|
@@ -19397,7 +19414,7 @@ async function handleCommand(adapter, msg, text2) {
|
|
|
19397
19414
|
);
|
|
19398
19415
|
break;
|
|
19399
19416
|
}
|
|
19400
|
-
const displayedThreads = getDisplayedDesktopThreads(
|
|
19417
|
+
const displayedThreads = getDisplayedDesktopThreads(MAX_DESKTOP_THREAD_LIST_LIMIT);
|
|
19401
19418
|
const threadPick = resolveByIndexOrPrefix(args, displayedThreads, (session) => session.threadId);
|
|
19402
19419
|
if (threadPick.ambiguous) {
|
|
19403
19420
|
response = "\u5339\u914D\u5230\u591A\u4E2A\u684C\u9762\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001 `/t` \u67E5\u770B\u5217\u8868\uFF0C\u518D\u7528 `/t 1` \u8FD9\u79CD\u5E8F\u53F7\u5207\u6362\u3002";
|
|
@@ -19428,6 +19445,10 @@ async function handleCommand(adapter, msg, text2) {
|
|
|
19428
19445
|
);
|
|
19429
19446
|
break;
|
|
19430
19447
|
}
|
|
19448
|
+
if (threadPick.index !== void 0) {
|
|
19449
|
+
response = displayedThreads.length > 0 ? `\u5F53\u524D\u53EA\u627E\u5230 ${displayedThreads.length} \u6761\u684C\u9762\u4F1A\u8BDD\uFF0C\u6CA1\u6709\u7B2C ${threadPick.index} \u6761\u3002\u5148\u53D1\u9001 \`/t\` \u67E5\u770B\u6700\u8FD1\u4F1A\u8BDD\uFF0C\u6216\u53D1\u9001 \`/t all\` \u67E5\u770B\u66F4\u591A\u540E\u518D\u9009\u62E9\u3002` : "\u6CA1\u6709\u627E\u5230\u684C\u9762\u4F1A\u8BDD\u3002\u5148\u5728 Codex Desktop App \u4E2D\u6253\u5F00\u4E00\u4E2A\u4F1A\u8BDD\uFF0C\u518D\u56DE\u6765\u8BD5\u4E00\u6B21\u3002";
|
|
19450
|
+
break;
|
|
19451
|
+
}
|
|
19431
19452
|
response = "\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u684C\u9762\u4F1A\u8BDD\u3002\u5148\u53D1\u9001 `/t` \u67E5\u770B\u6700\u8FD1\u4F1A\u8BDD\uFF0C\u518D\u7528 `/t 1` \u63A5\u7BA1\u3002";
|
|
19432
19453
|
break;
|
|
19433
19454
|
}
|
package/dist/ui-server.mjs
CHANGED
|
@@ -5142,8 +5142,8 @@ function walkSessionFiles(dirPath, target) {
|
|
|
5142
5142
|
}
|
|
5143
5143
|
}
|
|
5144
5144
|
function isDesktopLike(meta) {
|
|
5145
|
-
const originator = meta?.originator
|
|
5146
|
-
const source = meta?.source
|
|
5145
|
+
const originator = typeof meta?.originator === "string" ? meta.originator.toLowerCase() : "";
|
|
5146
|
+
const source = typeof meta?.source === "string" ? meta.source.toLowerCase() : "";
|
|
5147
5147
|
if (source === "exec") return false;
|
|
5148
5148
|
return originator.includes("desktop") || source === "vscode" || source === "desktop";
|
|
5149
5149
|
}
|
|
@@ -5275,9 +5275,9 @@ function parseDesktopSession(filePath, threadIndexEntries, archivedThreadIds) {
|
|
|
5275
5275
|
threadId,
|
|
5276
5276
|
filePath,
|
|
5277
5277
|
cwd,
|
|
5278
|
-
originator: parsed.payload.originator
|
|
5279
|
-
source: parsed.payload.source
|
|
5280
|
-
cliVersion: parsed.payload.cli_version
|
|
5278
|
+
originator: typeof parsed.payload.originator === "string" ? parsed.payload.originator : "Codex Desktop",
|
|
5279
|
+
source: typeof parsed.payload.source === "string" ? parsed.payload.source : void 0,
|
|
5280
|
+
cliVersion: typeof parsed.payload.cli_version === "string" ? parsed.payload.cli_version : void 0,
|
|
5281
5281
|
firstSeenAt,
|
|
5282
5282
|
lastEventAt,
|
|
5283
5283
|
title,
|
package/package.json
CHANGED