@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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. 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
- lines.push("Session is still open \u2014 use browser-cli dom/click/input to continue");
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/browser-cli",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {