@tangle-network/agent-app 0.43.42 → 0.43.43

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.
@@ -3,7 +3,7 @@ import {
3
3
  ChatMessages,
4
4
  ModelPicker,
5
5
  ProviderLogo
6
- } from "../chunk-ZLHK25C3.js";
6
+ } from "../chunk-PEUBCJXF.js";
7
7
  import "../chunk-65P3HJY3.js";
8
8
  import "../chunk-2EO7CPL3.js";
9
9
  import "../chunk-2QI7XV2T.js";
@@ -2761,6 +2761,7 @@ function proposalPreview(call) {
2761
2761
  }
2762
2762
  function truncate(v, max = 240) {
2763
2763
  const s = typeof v === "string" ? v : JSON.stringify(v);
2764
+ if (typeof s !== "string") return "";
2764
2765
  return s.length > max ? `${s.slice(0, max)}\u2026` : s;
2765
2766
  }
2766
2767
  function KvRows({ data }) {
@@ -2787,16 +2788,20 @@ function ShellDetail({ call }) {
2787
2788
  ] });
2788
2789
  }
2789
2790
  function DefaultToolDetail({ call }) {
2790
- const outcome = toolOutcomeOf(call);
2791
+ const result = call.result;
2792
+ const envelope = typeof result === "object" && result !== null ? result : null;
2791
2793
  return /* @__PURE__ */ jsxs10("div", { className: "space-y-2", children: [
2792
2794
  call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */ jsxs10("div", { children: [
2793
2795
  /* @__PURE__ */ jsx12("p", { className: "mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Called with" }),
2794
2796
  /* @__PURE__ */ jsx12(KvRows, { data: call.args })
2795
2797
  ] }),
2796
- outcome && /* @__PURE__ */ jsxs10("div", { children: [
2797
- /* @__PURE__ */ jsx12("p", { className: "mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: outcome.ok === false ? "Failed" : "Result" }),
2798
- outcome.ok === false ? /* @__PURE__ */ jsx12("p", { className: "text-xs text-destructive", children: outcome.message ?? "Tool failed" }) : outcome.result && typeof outcome.result === "object" ? /* @__PURE__ */ jsx12(KvRows, { data: outcome.result }) : /* @__PURE__ */ jsx12("p", { className: "font-mono text-[11px] text-muted-foreground", children: truncate(outcome.result) })
2799
- ] })
2798
+ envelope ? /* @__PURE__ */ jsxs10("div", { children: [
2799
+ /* @__PURE__ */ jsx12("p", { className: "mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: envelope.ok === false ? "Failed" : "Result" }),
2800
+ envelope.ok === false ? /* @__PURE__ */ jsx12("p", { className: "text-xs text-destructive", children: envelope.message ?? "Tool failed" }) : envelope.result && typeof envelope.result === "object" ? /* @__PURE__ */ jsx12(KvRows, { data: envelope.result }) : envelope.result != null ? /* @__PURE__ */ jsx12("p", { className: "font-mono text-[11px] text-muted-foreground", children: truncate(envelope.result) }) : null
2801
+ ] }) : result != null ? /* @__PURE__ */ jsxs10("div", { children: [
2802
+ /* @__PURE__ */ jsx12("p", { className: "mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Result" }),
2803
+ /* @__PURE__ */ jsx12("p", { className: "font-mono text-[11px] text-muted-foreground", children: truncate(result) })
2804
+ ] }) : null
2800
2805
  ] });
2801
2806
  }
2802
2807
  function ProposalCard({
@@ -3311,4 +3316,4 @@ export {
3311
3316
  useThinkingSeconds,
3312
3317
  ChatMessages
3313
3318
  };
3314
- //# sourceMappingURL=chunk-ZLHK25C3.js.map
3319
+ //# sourceMappingURL=chunk-PEUBCJXF.js.map