opencode-supertask 0.1.12 → 0.1.13
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/index.js +5 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/gateway/index.js +5 -7
- package/dist/gateway/index.js.map +1 -1
- package/dist/web/index.js +2 -5
- package/dist/web/index.js.map +1 -1
- package/dist/worker/index.d.ts +0 -1
- package/dist/worker/index.js +3 -2
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
package/dist/worker/index.d.ts
CHANGED
package/dist/worker/index.js
CHANGED
|
@@ -5677,7 +5677,8 @@ var WorkerEngine = class {
|
|
|
5677
5677
|
status: "running"
|
|
5678
5678
|
});
|
|
5679
5679
|
const modelToUse = this.resolveModel(task.model);
|
|
5680
|
-
const
|
|
5680
|
+
const modelArg = modelToUse ? ` -m "${modelToUse}"` : "";
|
|
5681
|
+
const cmd = `opencode run --agent supertask-runner${modelArg} --format json "\u6267\u884C\u4EFB\u52A1 ID: ${task.id}${modelToUse ? ` OVERRIDE_MODEL=${modelToUse}` : ""}"`;
|
|
5681
5682
|
const cwd = task.cwd || process.cwd();
|
|
5682
5683
|
const child = spawn("sh", ["-c", cmd], { cwd, stdio: ["inherit", "pipe", "pipe"] });
|
|
5683
5684
|
await TaskRunService.updatePid(run.id, process.pid, child.pid ?? 0);
|
|
@@ -5779,7 +5780,7 @@ var WorkerEngine = class {
|
|
|
5779
5780
|
});
|
|
5780
5781
|
}
|
|
5781
5782
|
resolveModel(taskModel) {
|
|
5782
|
-
if (!taskModel || taskModel === "default") return
|
|
5783
|
+
if (!taskModel || taskModel === "default") return null;
|
|
5783
5784
|
return taskModel;
|
|
5784
5785
|
}
|
|
5785
5786
|
};
|