@particle-academy/agent-integrations 0.32.0 → 0.33.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.
- package/dist/{chunk-HSI5RVF4.js → chunk-SJTLTITO.js} +29 -2
- package/dist/chunk-SJTLTITO.js.map +1 -0
- package/dist/components-shared-whiteboard.cjs +27 -0
- package/dist/components-shared-whiteboard.cjs.map +1 -1
- package/dist/components-shared-whiteboard.js +1 -1
- package/dist/index.cjs +27 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +2 -2
- package/dist/styles.css +46 -0
- package/dist/styles.css.map +1 -1
- package/package.json +7 -4
- package/dist/chunk-HSI5RVF4.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShareControls, AgentCursor, AgentActivityHighlight, AgentPanel } from './chunk-
|
|
1
|
+
import { ShareControls, AgentCursor, AgentActivityHighlight, AgentPanel } from './chunk-SJTLTITO.js';
|
|
2
2
|
import { createSessionDescriptor, attachSseRelay } from './chunk-N6RLSLOF.js';
|
|
3
3
|
import { attachInProcess } from './chunk-AFUULW5E.js';
|
|
4
4
|
import { registerWhiteboardBridge } from './chunk-2U5JB6ZA.js';
|
package/dist/index.cjs
CHANGED
|
@@ -4772,11 +4772,21 @@ function ShareControls({
|
|
|
4772
4772
|
onStart,
|
|
4773
4773
|
onStop,
|
|
4774
4774
|
status,
|
|
4775
|
+
agentConnected = false,
|
|
4776
|
+
activity,
|
|
4775
4777
|
shareBaseUrl,
|
|
4776
4778
|
className,
|
|
4777
4779
|
style
|
|
4778
4780
|
}) {
|
|
4779
4781
|
const [tab, setTab] = react.useState("prompt");
|
|
4782
|
+
const wasConnected = react.useRef(false);
|
|
4783
|
+
react.useEffect(() => {
|
|
4784
|
+
if (agentConnected && !wasConnected.current) {
|
|
4785
|
+
wasConnected.current = true;
|
|
4786
|
+
setTab("activity");
|
|
4787
|
+
}
|
|
4788
|
+
if (!agentConnected) wasConnected.current = false;
|
|
4789
|
+
}, [agentConnected]);
|
|
4780
4790
|
if (!session) {
|
|
4781
4791
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["fai-share fai-share--idle", className ?? ""].filter(Boolean).join(" "), style, children: [
|
|
4782
4792
|
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "fai-share__start", onClick: onStart, children: "Start shared session" }),
|
|
@@ -4811,12 +4821,14 @@ function ShareControls({
|
|
|
4811
4821
|
] })
|
|
4812
4822
|
] }),
|
|
4813
4823
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fai-share__tabs", role: "tablist", children: [
|
|
4824
|
+
agentConnected && /* @__PURE__ */ jsxRuntime.jsx(TabButton, { tab: "activity", active: tab, setTab, children: "Activity" }),
|
|
4814
4825
|
/* @__PURE__ */ jsxRuntime.jsx(TabButton, { tab: "prompt", active: tab, setTab, children: "Agent prompt" }),
|
|
4815
4826
|
/* @__PURE__ */ jsxRuntime.jsx(TabButton, { tab: "url", active: tab, setTab, children: "URL" }),
|
|
4816
4827
|
/* @__PURE__ */ jsxRuntime.jsx(TabButton, { tab: "json", active: tab, setTab, children: "JSON" }),
|
|
4817
4828
|
/* @__PURE__ */ jsxRuntime.jsx(TabButton, { tab: "curl", active: tab, setTab, children: "cURL recipe" })
|
|
4818
4829
|
] }),
|
|
4819
4830
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fai-share__panel", children: [
|
|
4831
|
+
tab === "activity" && /* @__PURE__ */ jsxRuntime.jsx(ActivityLog, { activity }),
|
|
4820
4832
|
tab === "prompt" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4821
4833
|
CopyBox,
|
|
4822
4834
|
{
|
|
@@ -4844,6 +4856,21 @@ function ShareControls({
|
|
|
4844
4856
|
] })
|
|
4845
4857
|
] });
|
|
4846
4858
|
}
|
|
4859
|
+
function ActivityLog({ activity }) {
|
|
4860
|
+
const entries = (activity ?? []).slice().reverse();
|
|
4861
|
+
if (entries.length === 0) {
|
|
4862
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "fai-share__empty", children: "Connected. Nothing yet \u2014 actions appear here as the agent takes them." });
|
|
4863
|
+
}
|
|
4864
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "fai-share__activity", "aria-live": "polite", children: entries.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "fai-share__activity-row", "data-kind": entry.kind, children: [
|
|
4865
|
+
/* @__PURE__ */ jsxRuntime.jsx("time", { className: "fai-share__activity-time", dateTime: new Date(entry.at).toISOString(), children: new Date(entry.at).toLocaleTimeString(void 0, {
|
|
4866
|
+
hour: "2-digit",
|
|
4867
|
+
minute: "2-digit",
|
|
4868
|
+
second: "2-digit"
|
|
4869
|
+
}) }),
|
|
4870
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "fai-share__activity-source", children: entry.source }),
|
|
4871
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "fai-share__activity-text", children: entry.text })
|
|
4872
|
+
] }, entry.id)) });
|
|
4873
|
+
}
|
|
4847
4874
|
function TabButton({ tab, active, setTab, children }) {
|
|
4848
4875
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4849
4876
|
"button",
|