@optima-chat/browser-cli 0.15.1 → 0.15.2
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 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -824,7 +824,7 @@ function artifactUrl(artifactPath) {
|
|
|
824
824
|
}
|
|
825
825
|
function hasStagedArtifact(task) {
|
|
826
826
|
const output = task.output;
|
|
827
|
-
return
|
|
827
|
+
return !!output?.artifact_path;
|
|
828
828
|
}
|
|
829
829
|
function downloadHint(task) {
|
|
830
830
|
const filename = task.output?.filename;
|
|
@@ -960,6 +960,9 @@ function registerScriptCommands(program2) {
|
|
|
960
960
|
saveSessionId(result.session_id);
|
|
961
961
|
}
|
|
962
962
|
console.log(formatScriptTask(result));
|
|
963
|
+
if (result.status !== "completed" && hasStagedArtifact(result)) {
|
|
964
|
+
console.log(downloadHint(result));
|
|
965
|
+
}
|
|
963
966
|
if (result.status === "completed") {
|
|
964
967
|
try {
|
|
965
968
|
const saved = await deliverArtifact(result, opts.out);
|
|
@@ -988,7 +991,7 @@ ${downloadHint(result)}`);
|
|
|
988
991
|
if (hasStagedArtifact(task)) console.log(downloadHint(task));
|
|
989
992
|
return;
|
|
990
993
|
}
|
|
991
|
-
if (task.status
|
|
994
|
+
if (task.status === "running") {
|
|
992
995
|
throw new Error(`Task ${taskId} is ${task.status} \u2014 nothing to download yet`);
|
|
993
996
|
}
|
|
994
997
|
const saved = await deliverArtifact(task, typeof opts.download === "string" ? opts.download : void 0);
|