@optima-chat/browser-cli 0.15.3 → 0.15.4
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/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -887,7 +887,10 @@ function formatScriptTask(task) {
|
|
|
887
887
|
}
|
|
888
888
|
lines.push("");
|
|
889
889
|
}
|
|
890
|
-
|
|
890
|
+
const sid = task.session_id;
|
|
891
|
+
lines.push(
|
|
892
|
+
sid ? `Session ${sid} may still be open \u2014 continue with browser-cli --session ${sid} dom/click/input, or free it with browser-cli --session ${sid} close` : "Session id not reported \u2014 if one remains, close it by id: browser-cli --session <id> close"
|
|
893
|
+
);
|
|
891
894
|
} else if (task.status === "failed") {
|
|
892
895
|
lines.push(`\u2717 Script failed: ${task.error ?? "unknown error"}`);
|
|
893
896
|
} else {
|
|
@@ -990,6 +993,7 @@ ${downloadHint(result)}`);
|
|
|
990
993
|
program2.command("script-task").argument("<task-id>", "Task ID").description("Check script task status").option("--download [path]", "Save the task's exported file (default: ./<filename>)").action(async (taskId, opts) => {
|
|
991
994
|
try {
|
|
992
995
|
const task = await api.getScriptTask(taskId);
|
|
996
|
+
if (task.status === "needs_fallback" && task.session_id) saveSessionId(task.session_id);
|
|
993
997
|
if (opts.download === void 0) {
|
|
994
998
|
console.log(formatScriptTask(task));
|
|
995
999
|
if (hasStagedArtifact(task)) console.log(downloadHint(task));
|