@lasso-ai/cli 1.0.24 → 1.0.25
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/agent.js +7 -2
- package/package.json +1 -1
package/dist/cli/agent.js
CHANGED
|
@@ -351,7 +351,7 @@ function localCommand(provider, model, prompt) {
|
|
|
351
351
|
return { command: "claude", args: ["-p", prompt || "", "--output-format", "stream-json", "--verbose", "--permission-mode", "plan", "--max-turns", "3", ...(selectedModel ? ["--model", selectedModel] : [])] };
|
|
352
352
|
}
|
|
353
353
|
if (provider === "opencode") {
|
|
354
|
-
return { command: "opencode", args: ["run", "--format", "json", "--agent", "plan", ...(selectedModel ? ["--model", selectedModel] : []), prompt || ""] };
|
|
354
|
+
return { command: "opencode", args: ["run", "--format", "json", "--print-logs", "--log-level", "INFO", "--agent", "plan", ...(selectedModel ? ["--model", selectedModel] : []), prompt || ""] };
|
|
355
355
|
}
|
|
356
356
|
return { command: "codex", args: ["exec", "--json", "--sandbox", "read-only", "--skip-git-repo-check", ...(selectedModel ? ["--model", selectedModel] : []), prompt || ""] };
|
|
357
357
|
}
|
|
@@ -393,8 +393,13 @@ function runLocalCommand(cwd, command, args, provider, signal, onProgress) {
|
|
|
393
393
|
const progress = progressFromLine(line, provider);
|
|
394
394
|
if (progress)
|
|
395
395
|
onProgress?.(progress.message, progress.detail);
|
|
396
|
-
else if (stream === "stderr" && line.trim())
|
|
396
|
+
else if (stream === "stderr" && line.trim()) {
|
|
397
397
|
onProgress?.(`${label} · ${snippet(line, 110)}`);
|
|
398
|
+
if (provider === "opencode" && /quota exceeded|authentication failed|invalid api key|unauthorized|forbidden/i.test(line)) {
|
|
399
|
+
onProgress?.("OpenCode · provider rejected the request; stopping this task…");
|
|
400
|
+
child.kill("SIGTERM");
|
|
401
|
+
}
|
|
402
|
+
}
|
|
398
403
|
}
|
|
399
404
|
};
|
|
400
405
|
child.stdout.on("data", (chunk) => consume(chunk, "stdout"));
|
package/package.json
CHANGED