@multiplayer-app/ai-agent-react 0.1.0-beta.97 → 0.1.0-beta.98

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.
@@ -36761,7 +36761,24 @@ const j3 = ({ call: e }) => {
36761
36761
  ] }) }) });
36762
36762
  }, G3 = ({ call: e, contextKey: t, messageId: n, chatId: r }) => {
36763
36763
  const a = Ue(), i = e.subagentChatId || (typeof e.input?.subagentChatId == "string" ? e.input.subagentChatId : void 0), [o, s] = et(!1), l = lt(() => a.getToolRenderer(e), [a, e]);
36764
- return l ? /* @__PURE__ */ oe("div", { className: "mp-agent-tool-panel", children: [
36764
+ if (!l) {
36765
+ const u = !!(e.requiresConfirmation && e.approvalId);
36766
+ return !!i || a.config.debug || u ? /* @__PURE__ */ oe("div", { className: "mp-agent-tool-panel", children: [
36767
+ /* @__PURE__ */ C(
36768
+ V2,
36769
+ {
36770
+ call: e,
36771
+ isExpandable: !!i,
36772
+ isExpanded: o,
36773
+ onToggleExpand: () => s((p) => !p)
36774
+ }
36775
+ ),
36776
+ /* @__PURE__ */ C(j2, { call: e, messageId: n, chatId: r }),
36777
+ i && /* @__PURE__ */ C(G2, { chatId: i, isExpanded: o }),
36778
+ !i && /* @__PURE__ */ C(H2, { call: e })
36779
+ ] }) : null;
36780
+ }
36781
+ return /* @__PURE__ */ oe("div", { className: "mp-agent-tool-panel", children: [
36765
36782
  i && /* @__PURE__ */ C(
36766
36783
  V2,
36767
36784
  {
@@ -36775,19 +36792,6 @@ const j3 = ({ call: e }) => {
36775
36792
  /* @__PURE__ */ C(j2, { call: e, messageId: n, chatId: r }),
36776
36793
  i && /* @__PURE__ */ C(G2, { chatId: i, isExpanded: o }),
36777
36794
  !i && /* @__PURE__ */ C(H2, { call: e })
36778
- ] }) : /* @__PURE__ */ oe("div", { className: "mp-agent-tool-panel", children: [
36779
- /* @__PURE__ */ C(
36780
- V2,
36781
- {
36782
- call: e,
36783
- isExpandable: !!i,
36784
- isExpanded: o,
36785
- onToggleExpand: () => s((u) => !u)
36786
- }
36787
- ),
36788
- /* @__PURE__ */ C(j2, { call: e, messageId: n, chatId: r }),
36789
- i && /* @__PURE__ */ C(G2, { chatId: i, isExpanded: o }),
36790
- !i && /* @__PURE__ */ C(H2, { call: e })
36791
36795
  ] });
36792
36796
  }, ywe = (e) => {
36793
36797
  const t = e.sender?.displayName || e.sender?.id || e.agentName;
@@ -96441,10 +96445,8 @@ const iVe = ({ content: e, role: t }) => {
96441
96445
  }
96442
96446
  );
96443
96447
  }, Hh = Rt(({ reasoning: e, isStreaming: t }) => {
96444
- const [n, r] = et(!t), a = Fe(null);
96448
+ const [n, r] = et(!0), a = Fe(null);
96445
96449
  return $e(() => {
96446
- r(!t);
96447
- }, [t]), $e(() => {
96448
96450
  if (n)
96449
96451
  return;
96450
96452
  const o = a.current;
@@ -96495,7 +96497,16 @@ const w7 = () => /* @__PURE__ */ oe("span", { className: "mp-agent-message-typin
96495
96497
  l
96496
96498
  ) : null;
96497
96499
  const u = i.get(s.toolCallId);
96498
- return u ? /* @__PURE__ */ C("div", { className: "mp-agent-tool-calls", children: /* @__PURE__ */ C(G3, { call: u, contextKey: t, messageId: e.id, chatId: e.chat }) }, l) : null;
96500
+ return u ? /* @__PURE__ */ C(
96501
+ G3,
96502
+ {
96503
+ call: u,
96504
+ contextKey: t,
96505
+ messageId: e.id,
96506
+ chatId: e.chat
96507
+ },
96508
+ l
96509
+ ) : null;
96499
96510
  }),
96500
96511
  n && (e.parts?.length ?? 0) === 0 && /* @__PURE__ */ C(w7, {})
96501
96512
  ] });