@ai-matrx/agents 0.42.0 → 0.43.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.
@@ -541,7 +541,7 @@ function ContextRulesTable({
541
541
  },
542
542
  rowId(row)
543
543
  );
544
- const heading = (props) => /* @__PURE__ */ jsx3(Heading, { ...props, grid, comfortable, readOnly }, props.id);
544
+ const heading = (props) => /* @__PURE__ */ jsx3(Heading, { ...props, grid, narrow, comfortable, readOnly }, props.id);
545
545
  const renderLevel = (level, depth) => {
546
546
  const all = levelRows(level);
547
547
  const name = level.ref.path[level.ref.path.length - 1] ?? "";
@@ -639,12 +639,24 @@ function Heading({
639
639
  onToggle,
640
640
  noSwitch,
641
641
  grid,
642
+ narrow,
642
643
  comfortable,
643
644
  readOnly
644
645
  }) {
645
646
  const { count, charsLabel } = summarizeContextRows(rows);
646
647
  const total = rows.length;
647
648
  const showSwitch = !noSwitch && (Boolean(onToggle) || readOnly && total > 0);
649
+ const countLabel = total > 0 ? count === total ? String(total) : `${count}/${total}` : null;
650
+ const toggle = showSwitch ? /* @__PURE__ */ jsx3(
651
+ Switch,
652
+ {
653
+ size: "sm",
654
+ "aria-label": `Include ${switchName}`,
655
+ checked,
656
+ disabled: readOnly || !onToggle,
657
+ onCheckedChange: (next) => onToggle?.(next)
658
+ }
659
+ ) : null;
648
660
  return /* @__PURE__ */ jsxs3(
649
661
  "div",
650
662
  {
@@ -653,24 +665,15 @@ function Heading({
653
665
  className: cn2(
654
666
  grid,
655
667
  "border-b border-border/50 font-medium",
656
- comfortable ? "min-h-11" : "h-7",
668
+ comfortable ? "min-h-11 py-1" : "min-h-7 py-0.5",
657
669
  kind === "group" ? "bg-muted/25 text-muted-foreground" : "bg-muted/60 text-foreground"
658
670
  ),
659
671
  children: [
660
- /* @__PURE__ */ jsxs3("div", { role: "cell", className: cn2("flex min-w-0 items-center gap-1", indent(depth)), children: [
661
- /* @__PURE__ */ jsx3("span", { className: "min-w-0 truncate", title: label, children: label }),
662
- total > 0 ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 font-normal tabular-nums text-muted-foreground", children: count === total ? total : `${count}/${total}` }) : null
672
+ /* @__PURE__ */ jsxs3("div", { role: "cell", className: cn2("flex min-w-0 items-baseline gap-1.5", indent(depth)), children: [
673
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 whitespace-normal break-words", title: label, children: label }),
674
+ countLabel ? /* @__PURE__ */ jsx3("span", { className: "shrink-0 font-normal tabular-nums text-muted-foreground", children: countLabel }) : null
663
675
  ] }),
664
- /* @__PURE__ */ jsx3("div", { role: "cell", className: "flex justify-center", children: showSwitch ? /* @__PURE__ */ jsx3(
665
- Switch,
666
- {
667
- size: "sm",
668
- "aria-label": `Include ${switchName}`,
669
- checked,
670
- disabled: readOnly || !onToggle,
671
- onCheckedChange: (next) => onToggle?.(next)
672
- }
673
- ) : null }),
676
+ /* @__PURE__ */ jsx3("div", { role: "cell", className: cn2("flex justify-center", narrow && "order-last"), children: toggle }),
674
677
  /* @__PURE__ */ jsx3("div", { role: "cell", className: "text-right font-normal tabular-nums text-muted-foreground", children: total > 0 ? charsLabel : null }),
675
678
  /* @__PURE__ */ jsx3("div", { role: "cell" })
676
679
  ]
@@ -754,7 +757,7 @@ function ContextRuleRow({
754
757
  ]
755
758
  }
756
759
  ),
757
- /* @__PURE__ */ jsx3("div", { role: "cell", className: "flex justify-center", children: /* @__PURE__ */ jsx3(
760
+ /* @__PURE__ */ jsx3("div", { role: "cell", className: cn2("flex justify-center", narrow && "order-last"), children: /* @__PURE__ */ jsx3(
758
761
  Switch,
759
762
  {
760
763
  size: "sm",
@@ -924,11 +927,12 @@ function ContextRulesChip({
924
927
  {
925
928
  type: "button",
926
929
  "aria-label": faceName,
930
+ title: name || void 0,
927
931
  "data-mismatch": warn ? "true" : void 0,
928
932
  "data-blind": blind ? "true" : void 0,
929
933
  onClick: isMobile ? () => setOpen(true) : void 0,
930
934
  className: cn3(
931
- "relative inline-flex h-6 max-w-[12rem] shrink-0 items-center gap-1 rounded-md border border-border bg-card px-1.5 text-xs font-medium text-foreground transition-colors hover:bg-accent",
935
+ "relative inline-flex h-6 min-w-0 shrink items-center gap-1 rounded-md border border-border bg-card px-1.5 text-xs font-medium text-foreground transition-colors hover:bg-accent",
932
936
  comfortable && "after:absolute after:-inset-x-1.5 after:-inset-y-2.5 after:content-['']",
933
937
  !eyeOpen && "text-muted-foreground",
934
938
  blind && "border-dashed",
@@ -1020,7 +1024,7 @@ function ContextRulesChip({
1020
1024
  PopoverContent2,
1021
1025
  {
1022
1026
  align: "end",
1023
- className: "w-[26rem] max-w-[calc(100vw-1rem)] overflow-hidden p-0",
1027
+ className: "w-[30rem] max-w-[calc(100vw-1rem)] overflow-hidden p-0",
1024
1028
  children: body
1025
1029
  }
1026
1030
  )