reifyui 0.15.0 → 0.15.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.
@@ -253,7 +253,10 @@ function commandText(a) {
253
253
  if (c.length >= 3 && /(^|\/)(ba|z)?sh$/.test(String(c[0])) && /^-\w*c$/.test(String(c[1]))) c = c.slice(2).join(" ");
254
254
  else c = c.join(" ");
255
255
  }
256
- return str(c).trim();
256
+ let t = str(c).trim();
257
+ const m = t.match(/^(?:\/(?:usr\/)?bin\/)?(?:ba|z)?sh\s+-\w*c\s+(['"])([\s\S]*)\1$/);
258
+ if (m) t = m[2].replace(m[1] === "'" ? /'\\''/g : /\\"/g, m[1]);
259
+ return t;
257
260
  }
258
261
  function lineCount(s) {
259
262
  const t = str(s);
@@ -951,7 +954,8 @@ function turnFromMessage(msg, clock = null, user = null) {
951
954
  const c = s.callId ? byCall[s.callId] : null;
952
955
  const answered = s.result !== void 0;
953
956
  let st = c ? c.status : answered ? "done" : status === "running" ? "running" : status === "done" ? "done" : "stopped";
954
- if (answered && st === "running") st = "done";
957
+ if (s.isError || s.is_error) st = "failed";
958
+ if (answered && st === "running") st = s.isError || s.is_error ? "failed" : "done";
955
959
  if (st === "running" && status !== "running") st = status === "done" ? "done" : "stopped";
956
960
  items.push({
957
961
  kind: "tool",