@ai-matrx/agents 0.41.0 → 0.41.1

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.
@@ -556,6 +556,60 @@ function levelSwitch(level, bulk) {
556
556
  if (level.master) return { checked: level.master.on, onToggle: level.master.onToggle };
557
557
  return { checked: levelRows(level).some((r) => r.include), onToggle: bulk };
558
558
  }
559
+ var useIsoLayoutEffect = typeof window === "undefined" ? React2.useEffect : React2.useLayoutEffect;
560
+ function HeadingPath({ path, name }) {
561
+ const boxRef = React2.useRef(null);
562
+ const fullRef = React2.useRef(null);
563
+ const [compact, setCompact] = React2.useState(false);
564
+ const multi = path.length > 1;
565
+ useIsoLayoutEffect(() => {
566
+ const box = boxRef.current;
567
+ const full = fullRef.current;
568
+ if (!multi || !box || !full) return void 0;
569
+ const fit = () => setCompact(full.scrollWidth > box.clientWidth);
570
+ fit();
571
+ if (typeof ResizeObserver === "undefined") return void 0;
572
+ const observer = new ResizeObserver(fit);
573
+ observer.observe(box);
574
+ return () => observer.disconnect();
575
+ }, [multi, name]);
576
+ const shown = multi && compact ? path.slice(-1) : path;
577
+ return /* @__PURE__ */ jsxs3(
578
+ "span",
579
+ {
580
+ ref: boxRef,
581
+ "data-compact": multi && compact ? "true" : void 0,
582
+ className: "relative flex min-w-0 flex-1 items-center gap-1 overflow-hidden",
583
+ title: name,
584
+ children: [
585
+ multi ? /* @__PURE__ */ jsx3(
586
+ "span",
587
+ {
588
+ ref: fullRef,
589
+ "aria-hidden": true,
590
+ className: "pointer-events-none invisible absolute left-0 top-0 flex items-center gap-1 whitespace-nowrap",
591
+ children: path.map((part, i) => /* @__PURE__ */ jsxs3(React2.Fragment, { children: [
592
+ i > 0 ? /* @__PURE__ */ jsx3("span", { children: "\u203A" }) : null,
593
+ /* @__PURE__ */ jsx3("span", { children: part })
594
+ ] }, `${i}:${part}`))
595
+ }
596
+ ) : null,
597
+ shown.map((part, i) => /* @__PURE__ */ jsxs3(React2.Fragment, { children: [
598
+ i > 0 ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-muted-foreground", children: "\u203A" }) : null,
599
+ /* @__PURE__ */ jsx3(
600
+ "span",
601
+ {
602
+ className: cn2(
603
+ i < shown.length - 1 ? "shrink-0 whitespace-nowrap text-muted-foreground" : "min-w-0 truncate"
604
+ ),
605
+ children: part
606
+ }
607
+ )
608
+ ] }, `${i}:${part}`))
609
+ ]
610
+ }
611
+ );
612
+ }
559
613
  function LevelHeading({
560
614
  kind,
561
615
  path,
@@ -582,19 +636,7 @@ function LevelHeading({
582
636
  ),
583
637
  children: [
584
638
  /* @__PURE__ */ jsxs3("div", { role: "cell", className: cn2("flex min-w-0 items-center gap-1", kind === "group" && "pl-2"), children: [
585
- /* @__PURE__ */ jsx3("span", { className: "flex min-w-0 items-center gap-1 overflow-hidden", title: name, children: path.map((part, i) => /* @__PURE__ */ jsxs3(React2.Fragment, { children: [
586
- i > 0 ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-muted-foreground", children: "\u203A" }) : null,
587
- /* @__PURE__ */ jsx3(
588
- "span",
589
- {
590
- className: cn2(
591
- "truncate",
592
- i < path.length - 1 ? "max-w-[45%] shrink-0 text-muted-foreground" : "min-w-0"
593
- ),
594
- children: part
595
- }
596
- )
597
- ] }, `${i}:${part}`)) }),
639
+ /* @__PURE__ */ jsx3(HeadingPath, { path, name }),
598
640
  total > 0 ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 font-normal tabular-nums text-muted-foreground", children: count === total ? total : `${count}/${total}` }) : null
599
641
  ] }),
600
642
  /* @__PURE__ */ jsx3("div", { role: "cell", className: "flex justify-center", children: showSwitch ? /* @__PURE__ */ jsx3(