@slock-ai/daemon 0.52.0 → 0.52.1
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.
|
@@ -4024,11 +4024,14 @@ function detectOpenCodeModels(home = os5.homedir(), runCommand = runOpenCodeMode
|
|
|
4024
4024
|
if (commandResult.error || commandResult.status !== 0) return null;
|
|
4025
4025
|
return parseOpenCodeModelsOutput(commandResult.stdout);
|
|
4026
4026
|
}
|
|
4027
|
-
function runOpenCodeModelsCommand(home) {
|
|
4028
|
-
const
|
|
4027
|
+
function runOpenCodeModelsCommand(home, deps = {}) {
|
|
4028
|
+
const platform = deps.platform ?? process.platform;
|
|
4029
|
+
const spawnSyncFn = deps.spawnSyncFn ?? spawnSync2;
|
|
4030
|
+
const result = spawnSyncFn("opencode", ["models"], {
|
|
4029
4031
|
env: { ...process.env, HOME: home, FORCE_COLOR: "0", NO_COLOR: "1" },
|
|
4030
4032
|
encoding: "utf8",
|
|
4031
|
-
timeout: 5e3
|
|
4033
|
+
timeout: 5e3,
|
|
4034
|
+
shell: platform === "win32"
|
|
4032
4035
|
});
|
|
4033
4036
|
return {
|
|
4034
4037
|
status: result.status,
|
package/dist/core.js
CHANGED
package/dist/index.js
CHANGED