ai-lab-bridge 0.1.6 → 0.1.7
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/index.js +9 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -787,13 +787,18 @@ function startSession(message) {
|
|
|
787
787
|
|
|
788
788
|
let promptViaStdin = true;
|
|
789
789
|
let launch = null;
|
|
790
|
-
if (cli === "claude"
|
|
791
|
-
|
|
792
|
-
// 实测 0.24.6),stream-json 输出与 Claude Code 兼容,复用同一启动参数与解析器
|
|
793
|
-
argv = [cli, ["-p", "--output-format", "stream-json", "--verbose"]];
|
|
790
|
+
if (cli === "claude") {
|
|
791
|
+
argv = ["claude", ["-p", "--output-format", "stream-json", "--verbose"]];
|
|
794
792
|
if (sessionRef) argv[1].push("--resume", sessionRef);
|
|
795
793
|
if (options.permission_mode) argv[1].push("--permission-mode", String(options.permission_mode));
|
|
796
794
|
if (options.model) argv[1].push("--model", String(options.model));
|
|
795
|
+
} else if (cli === "qwen") {
|
|
796
|
+
// qwen 0.24+ 与 claude 同源(实测 0.24.6 stream-json 格式兼容),启动参数使用 qwen 自己的
|
|
797
|
+
// --approval-mode(5 档:plan/default/auto-edit/auto/yolo),不复用 claude 的 --permission-mode
|
|
798
|
+
argv = [cli, ["-p", "--output-format", "stream-json", "--verbose"]];
|
|
799
|
+
if (sessionRef) argv[1].push("--resume", sessionRef);
|
|
800
|
+
if (options.permission_mode) argv[1].push("--approval-mode", String(options.permission_mode));
|
|
801
|
+
if (options.model) argv[1].push("--model", String(options.model));
|
|
797
802
|
} else if (cli === "codex") {
|
|
798
803
|
argv = ["codex", ["exec", "--json", "-"]];
|
|
799
804
|
if (sessionRef) argv = ["codex", ["exec", "resume", sessionRef, "--json", "-"]];
|