@particle-academy/agent-integrations 0.37.0 → 0.38.0

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.
@@ -1,4 +1,4 @@
1
- import { ShareControls, AgentCursor, AgentActivityHighlight, AgentPanel } from './chunk-ABP2THQV.js';
1
+ import { ShareControls, AgentCursor, AgentActivityHighlight, AgentPanel } from './chunk-QYWPCRT2.js';
2
2
  import { createSessionDescriptor, attachSseRelay } from './chunk-JDCB2NMM.js';
3
3
  import { attachInProcess } from './chunk-AFUULW5E.js';
4
4
  import { registerWhiteboardBridge } from './chunk-2U5JB6ZA.js';
package/dist/index.cjs CHANGED
@@ -4892,17 +4892,47 @@ function AgentPanel({ agent, activity, onSubmit, busy, actions, className, style
4892
4892
  }
4893
4893
  function ActivityRow({ item }) {
4894
4894
  const time = formatTime(item.at);
4895
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `fai-row fai-row--${item.kind}`, children: [
4896
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fai-row__meta", children: [
4897
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "fai-row__source", children: item.source }),
4898
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "fai-row__time", children: time })
4899
- ] }),
4900
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fai-row__text", children: item.text }),
4901
- item.detail !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "fai-row__detail", children: [
4902
- /* @__PURE__ */ jsxRuntime.jsx("summary", { children: "details" }),
4903
- /* @__PURE__ */ jsxRuntime.jsx("pre", { children: safeJson(item.detail) })
4904
- ] })
4905
- ] });
4895
+ const status = item.status ?? (item.kind === "error" ? "error" : "ok");
4896
+ const isCall = item.kind === "tool" && (item.args !== void 0 || item.result !== void 0 || item.durationMs !== void 0);
4897
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4898
+ "div",
4899
+ {
4900
+ className: `fai-row fai-row--${item.kind}${isCall ? ` fai-row--${status}` : ""}`,
4901
+ "data-fai-row": "",
4902
+ "data-kind": item.kind,
4903
+ "data-status": isCall ? status : void 0,
4904
+ children: [
4905
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fai-row__meta", children: [
4906
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "fai-row__source", children: item.source }),
4907
+ isCall && item.args !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "fai-row__args", "data-fai-args": "", children: [
4908
+ "(",
4909
+ inline(item.args),
4910
+ ")"
4911
+ ] }),
4912
+ isCall && item.durationMs !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "fai-row__latency", "data-fai-latency": "", children: [
4913
+ "\xB7 ",
4914
+ item.durationMs,
4915
+ "ms"
4916
+ ] }),
4917
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "fai-row__time", children: time })
4918
+ ] }),
4919
+ isCall && item.result !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fai-row__result", "data-fai-result": "", children: [
4920
+ "\u2192 ",
4921
+ inline(item.result)
4922
+ ] }),
4923
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fai-row__text", children: item.text }),
4924
+ item.detail !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "fai-row__detail", children: [
4925
+ /* @__PURE__ */ jsxRuntime.jsx("summary", { children: "details" }),
4926
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { children: safeJson(item.detail) })
4927
+ ] })
4928
+ ]
4929
+ }
4930
+ );
4931
+ }
4932
+ function inline(v, max = 80) {
4933
+ if (typeof v === "string") return v.length > max ? `${v.slice(0, max)}\u2026` : v;
4934
+ const json = safeJson(v).replace(/\s+/g, " ");
4935
+ return json.length > max ? `${json.slice(0, max)}\u2026` : json;
4906
4936
  }
4907
4937
  function formatTime(at) {
4908
4938
  const d = new Date(at);