@copilotkitnext/react 0.0.9-alpha.2 → 0.0.10

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/index.mjs CHANGED
@@ -941,7 +941,7 @@ var CopilotKitProvider = ({
941
941
  runtimeUrl,
942
942
  headers = {},
943
943
  properties = {},
944
- agents = {},
944
+ agents__unsafe_dev_only: agents = {},
945
945
  renderToolCalls,
946
946
  frontendTools,
947
947
  humanInTheLoop
@@ -2395,6 +2395,70 @@ function defineToolCallRender(def) {
2395
2395
  ...def.agentId ? { agentId: def.agentId } : {}
2396
2396
  };
2397
2397
  }
2398
+
2399
+ // src/components/WildcardToolCallRender.tsx
2400
+ import { useState as useState8 } from "react";
2401
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
2402
+ var WildcardToolCallRender = defineToolCallRender({
2403
+ name: "*",
2404
+ render: ({ args, result, name, status }) => {
2405
+ const [isExpanded, setIsExpanded] = useState8(false);
2406
+ const statusString = String(status);
2407
+ const isActive = statusString === "inProgress" || statusString === "executing";
2408
+ const isComplete = statusString === "complete";
2409
+ const statusStyles = isActive ? "bg-amber-100 text-amber-800 dark:bg-amber-500/15 dark:text-amber-400" : isComplete ? "bg-emerald-100 text-emerald-800 dark:bg-emerald-500/15 dark:text-emerald-400" : "bg-zinc-100 text-zinc-800 dark:bg-zinc-700/40 dark:text-zinc-300";
2410
+ return /* @__PURE__ */ jsx15("div", { className: "mt-2 pb-2", children: /* @__PURE__ */ jsxs8("div", { className: "rounded-xl border border-zinc-200/60 dark:border-zinc-800/60 bg-white/70 dark:bg-zinc-900/50 shadow-sm backdrop-blur p-4", children: [
2411
+ /* @__PURE__ */ jsxs8(
2412
+ "div",
2413
+ {
2414
+ className: "flex items-center justify-between gap-3 cursor-pointer",
2415
+ onClick: () => setIsExpanded(!isExpanded),
2416
+ children: [
2417
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 min-w-0", children: [
2418
+ /* @__PURE__ */ jsx15(
2419
+ "svg",
2420
+ {
2421
+ className: `h-4 w-4 text-zinc-500 dark:text-zinc-400 transition-transform ${isExpanded ? "rotate-90" : ""}`,
2422
+ fill: "none",
2423
+ viewBox: "0 0 24 24",
2424
+ strokeWidth: 2,
2425
+ stroke: "currentColor",
2426
+ children: /* @__PURE__ */ jsx15(
2427
+ "path",
2428
+ {
2429
+ strokeLinecap: "round",
2430
+ strokeLinejoin: "round",
2431
+ d: "M8.25 4.5l7.5 7.5-7.5 7.5"
2432
+ }
2433
+ )
2434
+ }
2435
+ ),
2436
+ /* @__PURE__ */ jsx15("span", { className: "inline-block h-2 w-2 rounded-full bg-blue-500" }),
2437
+ /* @__PURE__ */ jsx15("span", { className: "truncate text-sm font-medium text-zinc-900 dark:text-zinc-100", children: name })
2438
+ ] }),
2439
+ /* @__PURE__ */ jsx15(
2440
+ "span",
2441
+ {
2442
+ className: `inline-flex items-center rounded-full px-2 py-1 text-xs font-medium ${statusStyles}`,
2443
+ children: String(status)
2444
+ }
2445
+ )
2446
+ ]
2447
+ }
2448
+ ),
2449
+ isExpanded && /* @__PURE__ */ jsxs8("div", { className: "mt-3 grid gap-4", children: [
2450
+ /* @__PURE__ */ jsxs8("div", { children: [
2451
+ /* @__PURE__ */ jsx15("div", { className: "text-xs uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "Arguments" }),
2452
+ /* @__PURE__ */ jsx15("pre", { className: "mt-2 max-h-64 overflow-auto rounded-md bg-zinc-50 dark:bg-zinc-800/60 p-3 text-xs leading-relaxed text-zinc-800 dark:text-zinc-200 whitespace-pre-wrap break-words", children: JSON.stringify(args ?? {}, null, 2) })
2453
+ ] }),
2454
+ result !== void 0 && /* @__PURE__ */ jsxs8("div", { children: [
2455
+ /* @__PURE__ */ jsx15("div", { className: "text-xs uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "Result" }),
2456
+ /* @__PURE__ */ jsx15("pre", { className: "mt-2 max-h-64 overflow-auto rounded-md bg-zinc-50 dark:bg-zinc-800/60 p-3 text-xs leading-relaxed text-zinc-800 dark:text-zinc-200 whitespace-pre-wrap break-words", children: typeof result === "string" ? result : JSON.stringify(result, null, 2) })
2457
+ ] })
2458
+ ] })
2459
+ ] }) });
2460
+ }
2461
+ });
2398
2462
  export {
2399
2463
  AudioRecorderError,
2400
2464
  CopilotChat,
@@ -2407,6 +2471,7 @@ export {
2407
2471
  CopilotChatUserMessage_default as CopilotChatUserMessage,
2408
2472
  CopilotChatView_default as CopilotChatView,
2409
2473
  CopilotKitProvider,
2474
+ WildcardToolCallRender,
2410
2475
  defineToolCallRender,
2411
2476
  useAgent,
2412
2477
  useAgentContext,