maoda-commander-tt 0.0.58 → 0.0.59
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 +5 -0
- package/dist/chunk-ZLB4RQD2.js +21 -0
- package/dist/chunk-ZLB4RQD2.js.map +1 -0
- package/dist/{chunk-PEHEATMJ.js → chunk-ZPHRGP36.js} +5 -2
- package/dist/chunk-ZPHRGP36.js.map +1 -0
- package/dist/codex-worker-main.js +4 -1
- package/dist/codex-worker-main.js.map +1 -1
- package/dist/image-worker-main.js +4 -1
- package/dist/image-worker-main.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-PEHEATMJ.js.map +0 -1
package/README.md
CHANGED
|
@@ -94,6 +94,11 @@ pnpm build && pnpm test:dist
|
|
|
94
94
|
|
|
95
95
|
## 后台启动 Codex
|
|
96
96
|
|
|
97
|
+
`tt codex`、`tt ai run` 和本地图片 worker 共用可执行文件查找顺序:
|
|
98
|
+
`/Applications/ChatGPT.app/Contents/Resources/codex` →
|
|
99
|
+
`/Applications/Codex.app/Contents/Resources/codex` → PATH 中的 `codex`。
|
|
100
|
+
App 内路径不存在、不是文件或不可执行时跳到下一项;启动后的执行失败不重试下一项。
|
|
101
|
+
|
|
97
102
|
```bash
|
|
98
103
|
tt codex "我的具体 prompt"
|
|
99
104
|
tt codex -C /path/to/repo -m gpt-5.6-sol -r ultra "我的具体 prompt"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/modules/codex/resolve-codex-command.ts
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
function resolveCodexCommand() {
|
|
4
|
+
for (const command of [
|
|
5
|
+
"/Applications/ChatGPT.app/Contents/Resources/codex",
|
|
6
|
+
"/Applications/Codex.app/Contents/Resources/codex"
|
|
7
|
+
]) {
|
|
8
|
+
try {
|
|
9
|
+
if (!fs.statSync(command).isFile()) continue;
|
|
10
|
+
fs.accessSync(command, fs.constants.X_OK);
|
|
11
|
+
return command;
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return "codex";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
resolveCodexCommand
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-ZLB4RQD2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/modules/codex/resolve-codex-command.ts"],"sourcesContent":["import fs from \"node:fs\";\n\n/** Prefer an executable bundled with the desktop apps, then let PATH resolve codex. */\nexport function resolveCodexCommand(): string {\n for (const command of [\n \"/Applications/ChatGPT.app/Contents/Resources/codex\",\n \"/Applications/Codex.app/Contents/Resources/codex\",\n ]) {\n try {\n if (!fs.statSync(command).isFile()) continue;\n fs.accessSync(command, fs.constants.X_OK);\n return command;\n } catch { /* Missing or non-executable bundles fall through to the next candidate. */ }\n }\n return \"codex\";\n}\n"],"mappings":";AAAA,OAAO,QAAQ;AAGR,SAAS,sBAA8B;AAC5C,aAAW,WAAW;AAAA,IACpB;AAAA,IACA;AAAA,EACF,GAAG;AACD,QAAI;AACF,UAAI,CAAC,GAAG,SAAS,OAAO,EAAE,OAAO,EAAG;AACpC,SAAG,WAAW,SAAS,GAAG,UAAU,IAAI;AACxC,aAAO;AAAA,IACT,QAAQ;AAAA,IAA8E;AAAA,EACxF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
isImageWorkerAlive,
|
|
5
5
|
validateImageArtifact
|
|
6
6
|
} from "./chunk-W4TSQEWE.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveCodexCommand
|
|
9
|
+
} from "./chunk-ZLB4RQD2.js";
|
|
7
10
|
import {
|
|
8
11
|
captureProcess,
|
|
9
12
|
openUrl,
|
|
@@ -4310,7 +4313,7 @@ var AiRunCommand = class extends BaseCommand {
|
|
|
4310
4313
|
if (!enhancedPrompt.ok) {
|
|
4311
4314
|
return enhancedPrompt;
|
|
4312
4315
|
}
|
|
4313
|
-
return runProcess(
|
|
4316
|
+
return runProcess(resolveCodexCommand(), [
|
|
4314
4317
|
"exec",
|
|
4315
4318
|
"-m",
|
|
4316
4319
|
"gpt-5.4",
|
|
@@ -8799,4 +8802,4 @@ export {
|
|
|
8799
8802
|
ToolCommand,
|
|
8800
8803
|
createRootCommands
|
|
8801
8804
|
};
|
|
8802
|
-
//# sourceMappingURL=chunk-
|
|
8805
|
+
//# sourceMappingURL=chunk-ZPHRGP36.js.map
|