@ai-matrx/agents 0.43.6 → 0.43.9
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/CHANGELOG.md +13 -0
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/context/react/index.cjs +225 -192
- package/dist/context/react/index.cjs.map +1 -1
- package/dist/context/react/index.js +230 -197
- package/dist/context/react/index.js.map +1 -1
- package/dist/generated/api-types.cjs.map +1 -1
- package/dist/generated/api-types.d.cts +235 -0
- package/dist/generated/api-types.d.ts +235 -0
- package/dist/generated/stream-events.cjs.map +1 -1
- package/dist/generated/stream-events.d.cts +3 -0
- package/dist/generated/stream-events.d.ts +3 -0
- package/dist/generated/stream-events.js.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{keys.generated-BjKL_5CY.d.cts → keys.generated-Dfy6RITs.d.cts} +4 -4
- package/dist/{keys.generated-BjKL_5CY.d.ts → keys.generated-Dfy6RITs.d.ts} +4 -4
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +2 -2
- package/dist/mandates/index.d.ts +2 -2
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/matrx/index.d.cts +1 -1
- package/dist/matrx/index.d.ts +1 -1
- package/generated/api-types.ts +235 -0
- package/generated/stream-events.ts +3 -0
- package/mandates/snapshots/keys.0.43.7.json +653 -0
- package/mandates/snapshots/keys.0.43.8.json +653 -0
- package/mandates/snapshots/keys.0.43.9.json +653 -0
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ module.exports = __toCommonJS(react_exports);
|
|
|
53
53
|
|
|
54
54
|
// context/react/ContextRulesTable.tsx
|
|
55
55
|
var React2 = __toESM(require("react"), 1);
|
|
56
|
-
var
|
|
56
|
+
var import_design_system3 = require("@ai-matrx/design-system");
|
|
57
57
|
|
|
58
58
|
// context/index.ts
|
|
59
59
|
var DEFAULT_INLINE_MAX_CHARS = 200;
|
|
@@ -219,6 +219,14 @@ var ArrowDownToLineIcon = icon(
|
|
|
219
219
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M19 21H5" })
|
|
220
220
|
] })
|
|
221
221
|
);
|
|
222
|
+
var LockIcon = icon(
|
|
223
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
224
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
225
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
226
|
+
] })
|
|
227
|
+
);
|
|
228
|
+
var CheckIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20 6 9 17l-5-5" }));
|
|
229
|
+
var MinusIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5 12h14" }));
|
|
222
230
|
|
|
223
231
|
// context/react/hierarchy.ts
|
|
224
232
|
var AI_MATRX_LEVEL = { id: "ai_matrx", path: ["AI Matrx"], order: 900 };
|
|
@@ -293,9 +301,36 @@ function includeChanges(rows, include, cap) {
|
|
|
293
301
|
return changes;
|
|
294
302
|
}
|
|
295
303
|
|
|
304
|
+
// context/react/FrozenInclude.tsx
|
|
305
|
+
var import_design_system = require("@ai-matrx/design-system");
|
|
306
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
307
|
+
var FROZEN_INCLUDE_TOOLTIP = "Sent as shown";
|
|
308
|
+
function FrozenInclude({ name, checked }) {
|
|
309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_design_system.TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_design_system.Tooltip, { children: [
|
|
310
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_design_system.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
311
|
+
"span",
|
|
312
|
+
{
|
|
313
|
+
role: "img",
|
|
314
|
+
"aria-label": `${checked ? "Included" : "Not included"}: ${name}`,
|
|
315
|
+
"data-frozen-include": checked ? "on" : "off",
|
|
316
|
+
tabIndex: 0,
|
|
317
|
+
className: (0, import_design_system.cn)(
|
|
318
|
+
"inline-flex h-5 items-center gap-0.5 rounded px-1 text-muted-foreground",
|
|
319
|
+
checked ? "bg-muted text-foreground" : "bg-transparent"
|
|
320
|
+
),
|
|
321
|
+
children: [
|
|
322
|
+
checked ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CheckIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MinusIcon, { className: "h-3 w-3" }),
|
|
323
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LockIcon, { className: "h-2.5 w-2.5 opacity-70" })
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
) }),
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_design_system.TooltipContent, { children: FROZEN_INCLUDE_TOOLTIP })
|
|
328
|
+
] }) });
|
|
329
|
+
}
|
|
330
|
+
|
|
296
331
|
// context/react/InlineMaxInput.tsx
|
|
297
332
|
var React = __toESM(require("react"), 1);
|
|
298
|
-
var
|
|
333
|
+
var import_design_system2 = require("@ai-matrx/design-system");
|
|
299
334
|
|
|
300
335
|
// context/react/shared.ts
|
|
301
336
|
var LAYER_LABEL = {
|
|
@@ -374,7 +409,7 @@ function onRequestReason(row) {
|
|
|
374
409
|
}
|
|
375
410
|
|
|
376
411
|
// context/react/InlineMaxInput.tsx
|
|
377
|
-
var
|
|
412
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
378
413
|
function InlineMaxInput({
|
|
379
414
|
value,
|
|
380
415
|
inherited,
|
|
@@ -408,17 +443,17 @@ function InlineMaxInput({
|
|
|
408
443
|
if (next !== value) onCommit(next);
|
|
409
444
|
};
|
|
410
445
|
const overridden = value !== null;
|
|
411
|
-
return /* @__PURE__ */ (0,
|
|
412
|
-
/* @__PURE__ */ (0,
|
|
446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import_design_system2.cn)("flex items-center justify-end", comfortable ? "gap-0.5" : "gap-1"), children: [
|
|
447
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
413
448
|
"span",
|
|
414
449
|
{
|
|
415
450
|
"aria-hidden": "true",
|
|
416
|
-
className: (0,
|
|
451
|
+
className: (0, import_design_system2.cn)("h-1.5 w-1.5 shrink-0 rounded-full", overridden ? "bg-primary" : "bg-transparent")
|
|
417
452
|
}
|
|
418
453
|
),
|
|
419
|
-
/* @__PURE__ */ (0,
|
|
420
|
-
/* @__PURE__ */ (0,
|
|
421
|
-
|
|
454
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system2.Tooltip, { open: notice, children: [
|
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
456
|
+
import_design_system2.Input,
|
|
422
457
|
{
|
|
423
458
|
type: "text",
|
|
424
459
|
inputMode: "numeric",
|
|
@@ -447,30 +482,30 @@ function InlineMaxInput({
|
|
|
447
482
|
e.currentTarget.blur();
|
|
448
483
|
}
|
|
449
484
|
},
|
|
450
|
-
className: (0,
|
|
485
|
+
className: (0, import_design_system2.cn)(
|
|
451
486
|
"min-w-0 rounded px-1 py-0 text-right tabular-nums shadow-none",
|
|
452
487
|
comfortable ? "h-8 w-[6.5ch] text-base" : "h-6 w-[6.5ch] text-xs"
|
|
453
488
|
)
|
|
454
489
|
}
|
|
455
490
|
) }),
|
|
456
|
-
/* @__PURE__ */ (0,
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.TooltipContent, { children: `Limit is ${cap}` })
|
|
457
492
|
] }),
|
|
458
|
-
overridden && !disabled ? /* @__PURE__ */ (0,
|
|
459
|
-
/* @__PURE__ */ (0,
|
|
493
|
+
overridden && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system2.Tooltip, { children: [
|
|
494
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
460
495
|
"button",
|
|
461
496
|
{
|
|
462
497
|
type: "button",
|
|
463
498
|
"aria-label": `Reset inline max for ${label}`,
|
|
464
499
|
onClick: () => onCommit(null),
|
|
465
|
-
className: (0,
|
|
500
|
+
className: (0, import_design_system2.cn)(
|
|
466
501
|
"inline-flex shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
467
502
|
comfortable ? "h-8 w-7" : "h-5 w-5"
|
|
468
503
|
),
|
|
469
|
-
children: /* @__PURE__ */ (0,
|
|
504
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RotateCcwIcon, { className: "h-3 w-3" })
|
|
470
505
|
}
|
|
471
506
|
) }),
|
|
472
|
-
/* @__PURE__ */ (0,
|
|
473
|
-
] }) : /* @__PURE__ */ (0,
|
|
507
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.TooltipContent, { children: `Reset to ${formatLimit(inherited)}` })
|
|
508
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-hidden": "true", className: (0, import_design_system2.cn)("shrink-0", comfortable ? "w-7" : "w-5") })
|
|
474
509
|
] });
|
|
475
510
|
}
|
|
476
511
|
|
|
@@ -491,7 +526,7 @@ function summarizeContextRows(rows) {
|
|
|
491
526
|
}
|
|
492
527
|
|
|
493
528
|
// context/react/ContextRulesTable.tsx
|
|
494
|
-
var
|
|
529
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
495
530
|
var CONTEXT_RULES_GRID = {
|
|
496
531
|
compact: "grid grid-cols-[minmax(0,1fr)_2.75rem_4rem_6.5rem] items-center gap-x-2 px-2",
|
|
497
532
|
comfortable: "grid grid-cols-[minmax(0,1fr)_2.75rem_3.5rem_6.75rem] items-center gap-x-1.5 px-3"
|
|
@@ -557,7 +592,7 @@ function ContextRulesTable({
|
|
|
557
592
|
const changes = bulkChanges(list, next);
|
|
558
593
|
if (changes.length > 0) onSetInclude(changes);
|
|
559
594
|
} : void 0;
|
|
560
|
-
const renderRow = (row, depth) => /* @__PURE__ */ (0,
|
|
595
|
+
const renderRow = (row, depth) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
561
596
|
ContextRuleRow,
|
|
562
597
|
{
|
|
563
598
|
row,
|
|
@@ -576,11 +611,11 @@ function ContextRulesTable({
|
|
|
576
611
|
},
|
|
577
612
|
rowId(row)
|
|
578
613
|
);
|
|
579
|
-
const heading = (props) => /* @__PURE__ */ (0,
|
|
614
|
+
const heading = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Heading, { ...props, grid, narrow, comfortable, readOnly }, props.id);
|
|
580
615
|
const renderLevel = (level, depth) => {
|
|
581
616
|
const all = levelRows(level);
|
|
582
617
|
const name = level.ref.path[level.ref.path.length - 1] ?? "";
|
|
583
|
-
return /* @__PURE__ */ (0,
|
|
618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { role: "rowgroup", "aria-label": headed ? level.ref.path.join(" \u203A ") : void 0, "data-level": level.ref.id, children: [
|
|
584
619
|
headed ? heading({
|
|
585
620
|
id: `h:${level.ref.id}`,
|
|
586
621
|
kind: "level",
|
|
@@ -591,7 +626,7 @@ function ContextRulesTable({
|
|
|
591
626
|
...levelSwitch(level, bulk(all))
|
|
592
627
|
}) : null,
|
|
593
628
|
level.rows.map((row) => renderRow(row, depth + 1)),
|
|
594
|
-
level.groups.map((group) => /* @__PURE__ */ (0,
|
|
629
|
+
level.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { role: "rowgroup", "aria-label": group.ref.label, "data-group": group.ref.id, children: [
|
|
595
630
|
heading({
|
|
596
631
|
id: `h:${group.ref.id}`,
|
|
597
632
|
kind: "group",
|
|
@@ -606,7 +641,7 @@ function ContextRulesTable({
|
|
|
606
641
|
] }, group.ref.id))
|
|
607
642
|
] }, level.ref.id);
|
|
608
643
|
};
|
|
609
|
-
return /* @__PURE__ */ (0,
|
|
644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
610
645
|
"div",
|
|
611
646
|
{
|
|
612
647
|
ref: rootRef,
|
|
@@ -614,22 +649,22 @@ function ContextRulesTable({
|
|
|
614
649
|
"aria-label": "Values",
|
|
615
650
|
"data-density": density,
|
|
616
651
|
"data-layout": narrow ? "narrow" : "wide",
|
|
617
|
-
className: (0,
|
|
652
|
+
className: (0, import_design_system3.cn)("text-xs", className),
|
|
618
653
|
children: [
|
|
619
|
-
narrow ? null : /* @__PURE__ */ (0,
|
|
654
|
+
narrow ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
620
655
|
"div",
|
|
621
656
|
{
|
|
622
657
|
role: "row",
|
|
623
|
-
className: (0,
|
|
658
|
+
className: (0, import_design_system3.cn)(grid, "sticky top-0 z-10 h-7 border-b border-border bg-card font-medium text-muted-foreground"),
|
|
624
659
|
children: [
|
|
625
|
-
/* @__PURE__ */ (0,
|
|
626
|
-
/* @__PURE__ */ (0,
|
|
627
|
-
/* @__PURE__ */ (0,
|
|
628
|
-
/* @__PURE__ */ (0,
|
|
660
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { role: "columnheader", children: "Item" }),
|
|
661
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { role: "columnheader", className: "text-center", children: "Include" }),
|
|
662
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { role: "columnheader", className: "text-right", children: "Chars" }),
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { role: "columnheader", className: "pr-6 text-right", children: "Inline max" })
|
|
629
664
|
]
|
|
630
665
|
}
|
|
631
666
|
),
|
|
632
|
-
levels.length === 0 ? /* @__PURE__ */ (0,
|
|
667
|
+
levels.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-2 py-3 text-center text-muted-foreground", children: "None" }) : sectionsOf(levels).map((section) => {
|
|
633
668
|
if (section.label === null || !headed) return renderLevel(section.levels[0], 0);
|
|
634
669
|
const all = section.levels.flatMap(levelRows);
|
|
635
670
|
const several = section.levels.length > 1;
|
|
@@ -641,7 +676,7 @@ function ContextRulesTable({
|
|
|
641
676
|
}
|
|
642
677
|
if (changes.length > 0) onSetInclude?.(changes);
|
|
643
678
|
} : void 0;
|
|
644
|
-
return /* @__PURE__ */ (0,
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { role: "rowgroup", "aria-label": section.label, "data-section": section.label, children: [
|
|
645
680
|
heading({
|
|
646
681
|
id: `h:${section.id}`,
|
|
647
682
|
kind: "section",
|
|
@@ -682,35 +717,35 @@ function Heading({
|
|
|
682
717
|
const total = rows.length;
|
|
683
718
|
const showSwitch = !noSwitch && (Boolean(onToggle) || readOnly && total > 0);
|
|
684
719
|
const countLabel = total > 0 ? count === total ? String(total) : `${count}/${total}` : null;
|
|
685
|
-
const toggle = showSwitch ? /* @__PURE__ */ (0,
|
|
686
|
-
|
|
720
|
+
const toggle = showSwitch ? readOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FrozenInclude, { name: switchName, checked }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
721
|
+
import_design_system3.Switch,
|
|
687
722
|
{
|
|
688
723
|
size: "sm",
|
|
689
724
|
"aria-label": `Include ${switchName}`,
|
|
690
725
|
checked,
|
|
691
|
-
disabled:
|
|
726
|
+
disabled: !onToggle,
|
|
692
727
|
onCheckedChange: (next) => onToggle?.(next)
|
|
693
728
|
}
|
|
694
729
|
) : null;
|
|
695
|
-
return /* @__PURE__ */ (0,
|
|
730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
696
731
|
"div",
|
|
697
732
|
{
|
|
698
733
|
role: "row",
|
|
699
734
|
"data-heading": kind,
|
|
700
|
-
className: (0,
|
|
735
|
+
className: (0, import_design_system3.cn)(
|
|
701
736
|
grid,
|
|
702
737
|
"border-b border-border/50 font-medium",
|
|
703
738
|
comfortable ? "min-h-11 py-1" : "min-h-7 py-0.5",
|
|
704
739
|
kind === "group" ? "bg-muted/25 text-muted-foreground" : "bg-muted/60 text-foreground"
|
|
705
740
|
),
|
|
706
741
|
children: [
|
|
707
|
-
/* @__PURE__ */ (0,
|
|
708
|
-
/* @__PURE__ */ (0,
|
|
709
|
-
countLabel ? /* @__PURE__ */ (0,
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { role: "cell", className: (0, import_design_system3.cn)("flex min-w-0 items-baseline gap-1.5", indent(depth)), children: [
|
|
743
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "min-w-0 whitespace-normal break-words", title: label, children: label }),
|
|
744
|
+
countLabel ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "shrink-0 font-normal tabular-nums text-muted-foreground", children: countLabel }) : null
|
|
710
745
|
] }),
|
|
711
|
-
/* @__PURE__ */ (0,
|
|
712
|
-
/* @__PURE__ */ (0,
|
|
713
|
-
/* @__PURE__ */ (0,
|
|
746
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { role: "cell", className: (0, import_design_system3.cn)("flex justify-center", narrow && "order-last"), children: toggle }),
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { role: "cell", className: "text-right font-normal tabular-nums text-muted-foreground", children: total > 0 ? charsLabel : null }),
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { role: "cell" })
|
|
714
749
|
]
|
|
715
750
|
}
|
|
716
751
|
);
|
|
@@ -732,7 +767,7 @@ function ContextRuleRow({
|
|
|
732
767
|
}) {
|
|
733
768
|
const selfChecked = row.blockedBy === "self_check" || mismatches.some((m) => m.reason === "self_check");
|
|
734
769
|
const decided = selfChecked ? SELF_CHECK_TOOLTIP : row.serverResolved ? SERVER_RESOLVED_TOOLTIP : `Include: ${LAYER_LABEL[row.decided_by.include]} \xB7 Limit: ${LAYER_LABEL[row.decided_by.max_inline_chars]}`;
|
|
735
|
-
const labelNode = onOpenRow ? /* @__PURE__ */ (0,
|
|
770
|
+
const labelNode = onOpenRow ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
736
771
|
"button",
|
|
737
772
|
{
|
|
738
773
|
type: "button",
|
|
@@ -740,8 +775,8 @@ function ContextRuleRow({
|
|
|
740
775
|
className: "block min-w-0 flex-1 truncate text-left hover:underline focus-visible:underline focus-visible:outline-none",
|
|
741
776
|
children: row.label
|
|
742
777
|
}
|
|
743
|
-
) : /* @__PURE__ */ (0,
|
|
744
|
-
return /* @__PURE__ */ (0,
|
|
778
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "block min-w-0 flex-1 truncate", children: row.label });
|
|
779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
745
780
|
"div",
|
|
746
781
|
{
|
|
747
782
|
role: "row",
|
|
@@ -751,72 +786,71 @@ function ContextRuleRow({
|
|
|
751
786
|
"data-included": row.include ? "true" : "false",
|
|
752
787
|
"data-mismatch": mismatches.length > 0 ? "true" : void 0,
|
|
753
788
|
"aria-selected": selected || void 0,
|
|
754
|
-
className: (0,
|
|
789
|
+
className: (0, import_design_system3.cn)(
|
|
755
790
|
grid,
|
|
756
791
|
"border-b border-border/50",
|
|
757
792
|
comfortable ? "min-h-11" : "h-7",
|
|
758
793
|
selected && "bg-accent"
|
|
759
794
|
),
|
|
760
795
|
children: [
|
|
761
|
-
/* @__PURE__ */ (0,
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
762
797
|
"div",
|
|
763
798
|
{
|
|
764
799
|
role: "cell",
|
|
765
|
-
className: (0,
|
|
800
|
+
className: (0, import_design_system3.cn)(
|
|
766
801
|
"flex min-w-0 items-center gap-1.5",
|
|
767
802
|
indent(depth),
|
|
768
803
|
!row.include && "opacity-50"
|
|
769
804
|
),
|
|
770
805
|
children: [
|
|
771
|
-
mismatches.length > 0 ? /* @__PURE__ */ (0,
|
|
772
|
-
/* @__PURE__ */ (0,
|
|
806
|
+
mismatches.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system3.Tooltip, { children: [
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
773
808
|
"span",
|
|
774
809
|
{
|
|
775
810
|
role: "img",
|
|
776
811
|
"aria-label": "Mismatch",
|
|
777
812
|
className: "inline-flex shrink-0 text-warning",
|
|
778
|
-
children: /* @__PURE__ */ (0,
|
|
813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TriangleAlertIcon, { className: "h-3.5 w-3.5" })
|
|
779
814
|
}
|
|
780
815
|
) }),
|
|
781
|
-
/* @__PURE__ */ (0,
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.TooltipContent, { children: describeMismatches(mismatches) })
|
|
782
817
|
] }) : null,
|
|
783
|
-
lead ? /* @__PURE__ */ (0,
|
|
784
|
-
/* @__PURE__ */ (0,
|
|
785
|
-
/* @__PURE__ */ (0,
|
|
786
|
-
/* @__PURE__ */ (0,
|
|
787
|
-
/* @__PURE__ */ (0,
|
|
788
|
-
/* @__PURE__ */ (0,
|
|
818
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "inline-flex shrink-0 items-center", children: lead }) : null,
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system3.Tooltip, { children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.TooltipTrigger, { asChild: true, children: labelNode }),
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system3.TooltipContent, { children: [
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { children: row.label }),
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "font-normal text-muted-foreground", children: decided })
|
|
789
824
|
] })
|
|
790
825
|
] }),
|
|
791
|
-
trail ? /* @__PURE__ */ (0,
|
|
826
|
+
trail ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "min-w-0 max-w-[45%] shrink truncate text-muted-foreground", children: trail }) : null
|
|
792
827
|
]
|
|
793
828
|
}
|
|
794
829
|
),
|
|
795
|
-
/* @__PURE__ */ (0,
|
|
796
|
-
|
|
830
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { role: "cell", className: (0, import_design_system3.cn)("flex justify-center", narrow && "order-last"), children: readOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FrozenInclude, { name: row.label, checked: row.include }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
831
|
+
import_design_system3.Switch,
|
|
797
832
|
{
|
|
798
833
|
size: "sm",
|
|
799
834
|
"aria-label": `Include ${row.label}`,
|
|
800
835
|
checked: row.include,
|
|
801
|
-
disabled: readOnly,
|
|
802
836
|
onCheckedChange: (next) => onChange(row.key, row.surfaceKey, withInclude(row, next))
|
|
803
837
|
}
|
|
804
838
|
) }),
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
839
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
806
840
|
"div",
|
|
807
841
|
{
|
|
808
842
|
role: "cell",
|
|
809
|
-
className: (0,
|
|
843
|
+
className: (0, import_design_system3.cn)("flex items-center justify-end gap-1 tabular-nums", !row.include && "opacity-50"),
|
|
810
844
|
children: [
|
|
811
|
-
row.include && row.delivery === "on_request" ? /* @__PURE__ */ (0,
|
|
812
|
-
/* @__PURE__ */ (0,
|
|
813
|
-
/* @__PURE__ */ (0,
|
|
845
|
+
row.include && row.delivery === "on_request" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system3.Tooltip, { children: [
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { role: "img", "aria-label": "On request", className: "inline-flex text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ArrowDownToLineIcon, { className: "h-3 w-3" }) }) }),
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.TooltipContent, { children: onRequestReason(row) })
|
|
814
848
|
] }) : null,
|
|
815
|
-
/* @__PURE__ */ (0,
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: formatChars(row.chars) })
|
|
816
850
|
]
|
|
817
851
|
}
|
|
818
852
|
),
|
|
819
|
-
/* @__PURE__ */ (0,
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { role: "cell", children: narrow ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InlineMaxButton, { row, cap, readOnly, comfortable, onChange }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
820
854
|
InlineMaxInput,
|
|
821
855
|
{
|
|
822
856
|
label: row.label,
|
|
@@ -843,27 +877,27 @@ function InlineMaxButton({
|
|
|
843
877
|
const [open, setOpen] = React2.useState(false);
|
|
844
878
|
const own = row.userRule?.max_inline_chars ?? null;
|
|
845
879
|
const text = own !== null ? formatLimit(own) : limitPlaceholder(row, cap);
|
|
846
|
-
return /* @__PURE__ */ (0,
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system3.Popover, { open, onOpenChange: setOpen, children: [
|
|
881
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
848
882
|
"button",
|
|
849
883
|
{
|
|
850
884
|
type: "button",
|
|
851
885
|
"aria-label": `Inline max ${row.label}: ${text}`,
|
|
852
886
|
disabled: readOnly,
|
|
853
|
-
className: (0,
|
|
887
|
+
className: (0, import_design_system3.cn)(
|
|
854
888
|
"relative inline-flex min-w-[2.25rem] items-center justify-end gap-1 rounded px-1 tabular-nums hover:bg-accent disabled:opacity-60",
|
|
855
889
|
comfortable ? "h-8 after:absolute after:-inset-y-1.5 after:inset-x-0 after:content-['']" : "h-6",
|
|
856
890
|
own === null ? "text-muted-foreground" : "text-foreground"
|
|
857
891
|
),
|
|
858
892
|
children: [
|
|
859
|
-
own !== null ? /* @__PURE__ */ (0,
|
|
893
|
+
own !== null ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, className: "h-1 w-1 rounded-full bg-primary" }) : null,
|
|
860
894
|
text
|
|
861
895
|
]
|
|
862
896
|
}
|
|
863
897
|
) }),
|
|
864
|
-
/* @__PURE__ */ (0,
|
|
865
|
-
/* @__PURE__ */ (0,
|
|
866
|
-
/* @__PURE__ */ (0,
|
|
898
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.PopoverContent, { align: "end", className: "w-auto p-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
899
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-muted-foreground", children: "Inline max" }),
|
|
900
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
867
901
|
InlineMaxInput,
|
|
868
902
|
{
|
|
869
903
|
label: row.label,
|
|
@@ -882,8 +916,8 @@ function InlineMaxButton({
|
|
|
882
916
|
|
|
883
917
|
// context/react/ContextRulesChip.tsx
|
|
884
918
|
var React3 = __toESM(require("react"), 1);
|
|
885
|
-
var
|
|
886
|
-
var
|
|
919
|
+
var import_design_system4 = require("@ai-matrx/design-system");
|
|
920
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
887
921
|
var BLIND_TOOLTIP = "This model can't read these values";
|
|
888
922
|
var BLIND_LABEL = "Not read";
|
|
889
923
|
function IconButton({
|
|
@@ -892,21 +926,21 @@ function IconButton({
|
|
|
892
926
|
comfortable,
|
|
893
927
|
children
|
|
894
928
|
}) {
|
|
895
|
-
return /* @__PURE__ */ (0,
|
|
896
|
-
/* @__PURE__ */ (0,
|
|
929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system4.Tooltip, { children: [
|
|
930
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
897
931
|
"button",
|
|
898
932
|
{
|
|
899
933
|
type: "button",
|
|
900
934
|
"aria-label": label,
|
|
901
935
|
onClick,
|
|
902
|
-
className: (0,
|
|
936
|
+
className: (0, import_design_system4.cn)(
|
|
903
937
|
"inline-flex shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
904
938
|
comfortable ? "h-11 w-11" : "h-7 w-7"
|
|
905
939
|
),
|
|
906
940
|
children
|
|
907
941
|
}
|
|
908
942
|
) }),
|
|
909
|
-
/* @__PURE__ */ (0,
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.TooltipContent, { children: label })
|
|
910
944
|
] });
|
|
911
945
|
}
|
|
912
946
|
function ContextRulesChip({
|
|
@@ -947,7 +981,7 @@ function ContextRulesChip({
|
|
|
947
981
|
const hasPage = on !== void 0 && !hierarchy;
|
|
948
982
|
const headerName = hierarchy ? "" : name;
|
|
949
983
|
const eyeOpen = !blind && on !== false;
|
|
950
|
-
const faceButton = /* @__PURE__ */ (0,
|
|
984
|
+
const faceButton = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
951
985
|
"button",
|
|
952
986
|
{
|
|
953
987
|
type: "button",
|
|
@@ -957,7 +991,7 @@ function ContextRulesChip({
|
|
|
957
991
|
"data-blind": blind ? "true" : void 0,
|
|
958
992
|
"aria-pressed": pressed,
|
|
959
993
|
onClick: isMobile ? () => setOpen(true) : void 0,
|
|
960
|
-
className: (0,
|
|
994
|
+
className: (0, import_design_system4.cn)(
|
|
961
995
|
"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",
|
|
962
996
|
comfortable && "after:absolute after:-inset-x-1.5 after:-inset-y-2.5 after:content-['']",
|
|
963
997
|
!eyeOpen && "text-muted-foreground",
|
|
@@ -967,37 +1001,37 @@ function ContextRulesChip({
|
|
|
967
1001
|
className
|
|
968
1002
|
),
|
|
969
1003
|
children: [
|
|
970
|
-
eyeOpen ? /* @__PURE__ */ (0,
|
|
971
|
-
name ? /* @__PURE__ */ (0,
|
|
972
|
-
/* @__PURE__ */ (0,
|
|
973
|
-
warn ? /* @__PURE__ */ (0,
|
|
974
|
-
/* @__PURE__ */ (0,
|
|
1004
|
+
eyeOpen ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EyeIcon, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EyeOffIcon, { className: "h-3 w-3 shrink-0" }),
|
|
1005
|
+
name ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "min-w-0 truncate", children: name }) : null,
|
|
1006
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "shrink-0 tabular-nums text-muted-foreground", children: count }),
|
|
1007
|
+
warn ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "inline-flex shrink-0 items-center gap-0.5 tabular-nums text-warning", children: [
|
|
1008
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TriangleAlertIcon, { className: "h-3 w-3" }),
|
|
975
1009
|
mismatchCount
|
|
976
1010
|
] }) : null
|
|
977
1011
|
]
|
|
978
1012
|
}
|
|
979
1013
|
);
|
|
980
1014
|
const faceTip = blind ? BLIND_TOOLTIP : name ? null : faceName;
|
|
981
|
-
const withBlindTip = (trigger) => faceTip ? /* @__PURE__ */ (0,
|
|
982
|
-
/* @__PURE__ */ (0,
|
|
983
|
-
/* @__PURE__ */ (0,
|
|
1015
|
+
const withBlindTip = (trigger) => faceTip ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system4.Tooltip, { children: [
|
|
1016
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.TooltipTrigger, { asChild: true, children: trigger }),
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.TooltipContent, { children: faceTip })
|
|
984
1018
|
] }) : trigger;
|
|
985
|
-
const body = /* @__PURE__ */ (0,
|
|
986
|
-
/* @__PURE__ */ (0,
|
|
1019
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-h-0 flex-col", children: [
|
|
1020
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
987
1021
|
"div",
|
|
988
1022
|
{
|
|
989
|
-
className: (0,
|
|
1023
|
+
className: (0, import_design_system4.cn)(
|
|
990
1024
|
"flex shrink-0 items-center gap-2 border-b border-border px-3",
|
|
991
1025
|
comfortable ? "h-12" : "h-10"
|
|
992
1026
|
),
|
|
993
1027
|
children: [
|
|
994
|
-
eyeOpen ? /* @__PURE__ */ (0,
|
|
995
|
-
headerName ? /* @__PURE__ */ (0,
|
|
996
|
-
/* @__PURE__ */ (0,
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
998
|
-
blind ? /* @__PURE__ */ (0,
|
|
999
|
-
hasPage ? /* @__PURE__ */ (0,
|
|
1000
|
-
|
|
1028
|
+
eyeOpen ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EyeIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EyeOffIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1029
|
+
headerName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "min-w-0 truncate text-sm font-medium", children: headerName }) : null,
|
|
1030
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${count} \xB7 ${charsLabel} chars` }),
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "ml-auto flex shrink-0 items-center gap-0.5", children: [
|
|
1032
|
+
blind ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mr-1 text-xs text-muted-foreground", children: BLIND_LABEL }) : null,
|
|
1033
|
+
hasPage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1034
|
+
import_design_system4.Switch,
|
|
1001
1035
|
{
|
|
1002
1036
|
size: "sm",
|
|
1003
1037
|
"aria-label": "Include this page",
|
|
@@ -1007,8 +1041,8 @@ function ContextRulesChip({
|
|
|
1007
1041
|
className: "mr-1"
|
|
1008
1042
|
}
|
|
1009
1043
|
) : null,
|
|
1010
|
-
anyOverride && !readOnly ? /* @__PURE__ */ (0,
|
|
1011
|
-
/* @__PURE__ */ (0,
|
|
1044
|
+
anyOverride && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconButton, { label: "Reset all", onClick: onResetAll, comfortable, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RotateCcwIcon, { className: "h-3.5 w-3.5" }) }) : null,
|
|
1045
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1012
1046
|
IconButton,
|
|
1013
1047
|
{
|
|
1014
1048
|
label: "Open full view",
|
|
@@ -1017,14 +1051,14 @@ function ContextRulesChip({
|
|
|
1017
1051
|
setOpen(false);
|
|
1018
1052
|
onOpenFullView();
|
|
1019
1053
|
},
|
|
1020
|
-
children: /* @__PURE__ */ (0,
|
|
1054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PanelRightIcon, { className: "h-3.5 w-3.5" })
|
|
1021
1055
|
}
|
|
1022
1056
|
)
|
|
1023
1057
|
] })
|
|
1024
1058
|
]
|
|
1025
1059
|
}
|
|
1026
1060
|
),
|
|
1027
|
-
/* @__PURE__ */ (0,
|
|
1061
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_design_system4.cn)("min-h-0 overflow-y-auto", comfortable ? "max-h-[70dvh]" : "max-h-[min(24rem,60vh)]"), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1028
1062
|
ContextRulesTable,
|
|
1029
1063
|
{
|
|
1030
1064
|
rows,
|
|
@@ -1040,15 +1074,15 @@ function ContextRulesChip({
|
|
|
1040
1074
|
) })
|
|
1041
1075
|
] });
|
|
1042
1076
|
if (isMobile) {
|
|
1043
|
-
return /* @__PURE__ */ (0,
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system4.TooltipProvider, { delayDuration: 300, titleTooltips: false, children: [
|
|
1044
1078
|
withBlindTip(faceButton),
|
|
1045
|
-
/* @__PURE__ */ (0,
|
|
1079
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.BottomSheet, { open, onOpenChange: setOpen, title: name || faceName, surface: "solid", children: body })
|
|
1046
1080
|
] });
|
|
1047
1081
|
}
|
|
1048
|
-
return /* @__PURE__ */ (0,
|
|
1049
|
-
withBlindTip(/* @__PURE__ */ (0,
|
|
1050
|
-
/* @__PURE__ */ (0,
|
|
1051
|
-
|
|
1082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system4.Popover, { open, onOpenChange: setOpen, children: [
|
|
1083
|
+
withBlindTip(/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.PopoverTrigger, { asChild: true, children: faceButton })),
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1085
|
+
import_design_system4.PopoverContent,
|
|
1052
1086
|
{
|
|
1053
1087
|
align: "end",
|
|
1054
1088
|
className: "w-[30rem] max-w-[calc(100vw-1rem)] overflow-hidden p-0",
|
|
@@ -1060,12 +1094,12 @@ function ContextRulesChip({
|
|
|
1060
1094
|
|
|
1061
1095
|
// context/react/ContextRulesPanelBody.tsx
|
|
1062
1096
|
var React5 = __toESM(require("react"), 1);
|
|
1063
|
-
var
|
|
1097
|
+
var import_design_system7 = require("@ai-matrx/design-system");
|
|
1064
1098
|
|
|
1065
1099
|
// context/react/ContextDeliveredValue.tsx
|
|
1066
1100
|
var React4 = __toESM(require("react"), 1);
|
|
1067
|
-
var
|
|
1068
|
-
var
|
|
1101
|
+
var import_design_system5 = require("@ai-matrx/design-system");
|
|
1102
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1069
1103
|
function ContextDeliveredValue({
|
|
1070
1104
|
row,
|
|
1071
1105
|
load,
|
|
@@ -1073,10 +1107,10 @@ function ContextDeliveredValue({
|
|
|
1073
1107
|
}) {
|
|
1074
1108
|
const blocks = row.deliveredBlocks ?? [];
|
|
1075
1109
|
if (!row.delivered && !row.onRequest && blocks.length === 0) {
|
|
1076
|
-
return isServerAuthoritativeKey(row.key) ? /* @__PURE__ */ (0,
|
|
1110
|
+
return isServerAuthoritativeKey(row.key) ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { "data-testid": "context-server-fills", className: (0, import_design_system5.cn)("text-xs text-muted-foreground", className), children: "Filled in by the server" }) : null;
|
|
1077
1111
|
}
|
|
1078
|
-
return /* @__PURE__ */ (0,
|
|
1079
|
-
row.delivered ? /* @__PURE__ */ (0,
|
|
1112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_design_system5.cn)("flex flex-col gap-3", className), children: [
|
|
1113
|
+
row.delivered ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1080
1114
|
DeliveredSection,
|
|
1081
1115
|
{
|
|
1082
1116
|
title: "Agent received",
|
|
@@ -1085,7 +1119,7 @@ function ContextDeliveredValue({
|
|
|
1085
1119
|
load
|
|
1086
1120
|
}
|
|
1087
1121
|
) : null,
|
|
1088
|
-
blocks.map((block) => /* @__PURE__ */ (0,
|
|
1122
|
+
blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1089
1123
|
DeliveredSection,
|
|
1090
1124
|
{
|
|
1091
1125
|
title: block.label,
|
|
@@ -1098,7 +1132,7 @@ function ContextDeliveredValue({
|
|
|
1098
1132
|
row.onRequest || row.delivery === "on_request" && row.delivered ? (
|
|
1099
1133
|
// A lazy value (a document, a file family …) carries no ref: the turn never reads
|
|
1100
1134
|
// it. It is fetched — and sized — when opened.
|
|
1101
|
-
/* @__PURE__ */ (0,
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1102
1136
|
DeliveredSection,
|
|
1103
1137
|
{
|
|
1104
1138
|
title: "Returned on request",
|
|
@@ -1108,7 +1142,7 @@ function ContextDeliveredValue({
|
|
|
1108
1142
|
}
|
|
1109
1143
|
)
|
|
1110
1144
|
) : null,
|
|
1111
|
-
row.delivered && CONTEXT_FETCHABLE_ROWS[row.key] ? /* @__PURE__ */ (0,
|
|
1145
|
+
row.delivered && CONTEXT_FETCHABLE_ROWS[row.key] ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1112
1146
|
DeliveredSection,
|
|
1113
1147
|
{
|
|
1114
1148
|
title: "Agent can fetch",
|
|
@@ -1155,18 +1189,18 @@ function DeliveredSection({
|
|
|
1155
1189
|
};
|
|
1156
1190
|
}, [load, kind, key, attempt]);
|
|
1157
1191
|
const unavailable = loaded.state === "done" && !loaded.available;
|
|
1158
|
-
return /* @__PURE__ */ (0,
|
|
1159
|
-
/* @__PURE__ */ (0,
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1161
|
-
unavailable ? /* @__PURE__ */ (0,
|
|
1192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "flex flex-col gap-1", "aria-label": title, "data-view-kind": kind, "data-view-key": key, children: [
|
|
1193
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-baseline gap-2 text-xs", children: [
|
|
1194
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "font-medium", children: title }),
|
|
1195
|
+
unavailable ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1162
1196
|
"span",
|
|
1163
1197
|
{
|
|
1164
1198
|
"data-testid": "context-delivered-unavailable",
|
|
1165
1199
|
className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
|
|
1166
1200
|
children: "Not available to this agent"
|
|
1167
1201
|
}
|
|
1168
|
-
) : ref_ || loaded.state === "done" ? /* @__PURE__ */ (0,
|
|
1169
|
-
loaded.state === "done" && loaded.fetched === false ? /* @__PURE__ */ (0,
|
|
1202
|
+
) : ref_ || loaded.state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "tabular-nums text-muted-foreground", children: `${formatChars(ref_ ? ref_.chars : loaded.state === "done" ? loaded.chars : 0)} chars` }) : null,
|
|
1203
|
+
loaded.state === "done" && loaded.fetched === false ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1170
1204
|
"span",
|
|
1171
1205
|
{
|
|
1172
1206
|
"data-testid": "context-delivered-not-read",
|
|
@@ -1175,9 +1209,9 @@ function DeliveredSection({
|
|
|
1175
1209
|
}
|
|
1176
1210
|
) : null
|
|
1177
1211
|
] }),
|
|
1178
|
-
unavailable ? null : !load ? /* @__PURE__ */ (0,
|
|
1179
|
-
/* @__PURE__ */ (0,
|
|
1180
|
-
/* @__PURE__ */ (0,
|
|
1212
|
+
unavailable ? null : !load ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-xs text-muted-foreground", children: "\u2014" }) : loaded.state === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system5.Skeleton, { "data-testid": "context-delivered-loading", className: "h-16 w-full" }) : loaded.state === "error" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system5.ErrorBox, { as: "div", message: loaded.message, className: "flex items-center gap-2 text-xs text-destructive", children: [
|
|
1213
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "min-w-0 truncate", title: loaded.message, children: loaded.message }),
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1181
1215
|
"button",
|
|
1182
1216
|
{
|
|
1183
1217
|
type: "button",
|
|
@@ -1186,11 +1220,11 @@ function DeliveredSection({
|
|
|
1186
1220
|
children: "Retry"
|
|
1187
1221
|
}
|
|
1188
1222
|
)
|
|
1189
|
-
] }) : loaded.text === "" ? /* @__PURE__ */ (0,
|
|
1223
|
+
] }) : loaded.text === "" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-testid": "context-delivered-empty", className: "text-xs text-muted-foreground", children: "None" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1190
1224
|
"pre",
|
|
1191
1225
|
{
|
|
1192
1226
|
"data-testid": "context-delivered-text",
|
|
1193
|
-
className: (0,
|
|
1227
|
+
className: (0, import_design_system5.cn)(
|
|
1194
1228
|
"max-h-[min(50dvh,22rem)] cursor-text select-text overflow-auto",
|
|
1195
1229
|
"whitespace-pre-wrap break-words rounded border border-border",
|
|
1196
1230
|
"bg-muted/40 p-2 font-mono text-[11px] text-foreground"
|
|
@@ -1202,8 +1236,8 @@ function DeliveredSection({
|
|
|
1202
1236
|
}
|
|
1203
1237
|
|
|
1204
1238
|
// context/react/ContextReceiptBlocks.tsx
|
|
1205
|
-
var
|
|
1206
|
-
var
|
|
1239
|
+
var import_design_system6 = require("@ai-matrx/design-system");
|
|
1240
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1207
1241
|
function ContextReceiptBlocks({
|
|
1208
1242
|
blocks,
|
|
1209
1243
|
selectedId,
|
|
@@ -1213,29 +1247,29 @@ function ContextReceiptBlocks({
|
|
|
1213
1247
|
}) {
|
|
1214
1248
|
if (blocks.length === 0) return null;
|
|
1215
1249
|
const comfortable = density === "comfortable";
|
|
1216
|
-
return /* @__PURE__ */ (0,
|
|
1217
|
-
/* @__PURE__ */ (0,
|
|
1250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { role: "table", "aria-label": "Also sent", className: (0, import_design_system6.cn)("text-xs", className), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { role: "rowgroup", children: [
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1218
1252
|
"div",
|
|
1219
1253
|
{
|
|
1220
1254
|
role: "row",
|
|
1221
1255
|
className: "flex h-6 items-center bg-muted/40 px-2 font-medium text-muted-foreground",
|
|
1222
|
-
children: /* @__PURE__ */ (0,
|
|
1256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { role: "cell", children: "Also sent" })
|
|
1223
1257
|
}
|
|
1224
1258
|
),
|
|
1225
|
-
blocks.map((block) => /* @__PURE__ */ (0,
|
|
1259
|
+
blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1226
1260
|
"div",
|
|
1227
1261
|
{
|
|
1228
1262
|
role: "row",
|
|
1229
1263
|
"data-block-id": block.id,
|
|
1230
1264
|
"aria-selected": selectedId === block.id || void 0,
|
|
1231
|
-
className: (0,
|
|
1265
|
+
className: (0, import_design_system6.cn)(
|
|
1232
1266
|
CONTEXT_RULES_GRID[density],
|
|
1233
1267
|
"border-b border-border/50",
|
|
1234
1268
|
comfortable ? "min-h-11" : "h-7",
|
|
1235
1269
|
selectedId === block.id && "bg-accent"
|
|
1236
1270
|
),
|
|
1237
1271
|
children: [
|
|
1238
|
-
/* @__PURE__ */ (0,
|
|
1272
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { role: "cell", className: "col-span-2 flex min-w-0 items-center", children: onOpenBlock ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1239
1273
|
"button",
|
|
1240
1274
|
{
|
|
1241
1275
|
type: "button",
|
|
@@ -1244,9 +1278,9 @@ function ContextReceiptBlocks({
|
|
|
1244
1278
|
className: "block min-w-0 flex-1 truncate text-left hover:underline focus-visible:underline focus-visible:outline-none",
|
|
1245
1279
|
children: block.label
|
|
1246
1280
|
}
|
|
1247
|
-
) : /* @__PURE__ */ (0,
|
|
1248
|
-
/* @__PURE__ */ (0,
|
|
1249
|
-
/* @__PURE__ */ (0,
|
|
1281
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { title: block.label, className: "block min-w-0 flex-1 truncate", children: block.label }) }),
|
|
1282
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { role: "cell", className: "text-right tabular-nums", children: formatChars(block.delivered.chars) }),
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { role: "cell" })
|
|
1250
1284
|
]
|
|
1251
1285
|
},
|
|
1252
1286
|
block.id
|
|
@@ -1258,12 +1292,12 @@ function ContextReceiptBlockDetail({
|
|
|
1258
1292
|
load,
|
|
1259
1293
|
className
|
|
1260
1294
|
}) {
|
|
1261
|
-
return /* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_design_system6.cn)("flex flex-col gap-3 p-3", className), children: [
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "min-w-0 truncate text-sm font-medium", children: block.label }),
|
|
1298
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${formatChars(block.delivered.chars)} chars \xB7 ${DELIVERY_LABEL.inline}` })
|
|
1265
1299
|
] }),
|
|
1266
|
-
/* @__PURE__ */ (0,
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1267
1301
|
DeliveredSection,
|
|
1268
1302
|
{
|
|
1269
1303
|
title: "Agent received",
|
|
@@ -1276,7 +1310,7 @@ function ContextReceiptBlockDetail({
|
|
|
1276
1310
|
}
|
|
1277
1311
|
|
|
1278
1312
|
// context/react/ContextRulesPanelBody.tsx
|
|
1279
|
-
var
|
|
1313
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1280
1314
|
function layerCells(row) {
|
|
1281
1315
|
const { surface, agent, default_max } = row.layers ?? {};
|
|
1282
1316
|
const declared = agent?.declared === true;
|
|
@@ -1299,38 +1333,38 @@ function layerCells(row) {
|
|
|
1299
1333
|
var LAYERS = ["default", "page", "agent", "you"];
|
|
1300
1334
|
function LayerTable({ row }) {
|
|
1301
1335
|
const cells = layerCells(row);
|
|
1302
|
-
const cell = (text, winning) => /* @__PURE__ */ (0,
|
|
1336
|
+
const cell = (text, winning) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1303
1337
|
"span",
|
|
1304
1338
|
{
|
|
1305
1339
|
role: "cell",
|
|
1306
1340
|
"data-winning": winning ? "true" : void 0,
|
|
1307
|
-
className: (0,
|
|
1341
|
+
className: (0, import_design_system7.cn)(
|
|
1308
1342
|
"rounded px-1.5 py-0.5 text-right tabular-nums",
|
|
1309
1343
|
winning ? "bg-primary/10 font-medium text-foreground" : "text-muted-foreground"
|
|
1310
1344
|
),
|
|
1311
1345
|
children: text
|
|
1312
1346
|
}
|
|
1313
1347
|
);
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { role: "table", "aria-label": "Layers", className: "text-xs", children: [
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1316
1350
|
"div",
|
|
1317
1351
|
{
|
|
1318
1352
|
role: "row",
|
|
1319
1353
|
className: "grid h-7 grid-cols-[1fr_5rem_5rem] items-center gap-x-2 border-b border-border font-medium text-muted-foreground",
|
|
1320
1354
|
children: [
|
|
1321
|
-
/* @__PURE__ */ (0,
|
|
1322
|
-
/* @__PURE__ */ (0,
|
|
1323
|
-
/* @__PURE__ */ (0,
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { role: "columnheader", children: "Layer" }),
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { role: "columnheader", className: "text-right", children: "Include" }),
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { role: "columnheader", className: "text-right", children: "Inline max" })
|
|
1324
1358
|
]
|
|
1325
1359
|
}
|
|
1326
1360
|
),
|
|
1327
|
-
LAYERS.map((layer) => /* @__PURE__ */ (0,
|
|
1361
|
+
LAYERS.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1328
1362
|
"div",
|
|
1329
1363
|
{
|
|
1330
1364
|
role: "row",
|
|
1331
1365
|
className: "grid h-7 grid-cols-[1fr_5rem_5rem] items-center gap-x-2 border-b border-border/50",
|
|
1332
1366
|
children: [
|
|
1333
|
-
/* @__PURE__ */ (0,
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { role: "cell", children: LAYER_LABEL[layer] }),
|
|
1334
1368
|
cell(cells[layer].include, row.decided_by.include === layer),
|
|
1335
1369
|
cell(cells[layer].limit, row.decided_by.max_inline_chars === layer)
|
|
1336
1370
|
]
|
|
@@ -1349,29 +1383,28 @@ function RowDetail({
|
|
|
1349
1383
|
comfortable,
|
|
1350
1384
|
loadView
|
|
1351
1385
|
}) {
|
|
1352
|
-
return /* @__PURE__ */ (0,
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1355
|
-
/* @__PURE__ */ (0,
|
|
1386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-3 p-3", children: [
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "min-w-0 truncate text-sm font-medium", children: row.label }),
|
|
1389
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: `${formatChars(row.chars)} chars \xB7 ${DELIVERY_LABEL[row.delivery]}` })
|
|
1356
1390
|
] }),
|
|
1357
|
-
mismatches.length > 0 ? /* @__PURE__ */ (0,
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
1391
|
+
mismatches.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start gap-1.5 rounded-md border border-warning/40 bg-warning/10 px-2 py-1.5 text-xs text-warning", children: [
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TriangleAlertIcon, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: describeMismatches(mismatches) })
|
|
1360
1394
|
] }) : null,
|
|
1361
|
-
/* @__PURE__ */ (0,
|
|
1362
|
-
/* @__PURE__ */ (0,
|
|
1363
|
-
/* @__PURE__ */ (0,
|
|
1364
|
-
|
|
1395
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-2 text-xs", children: [
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-muted-foreground", children: "Include" }),
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: (0, import_design_system7.cn)("flex items-center", comfortable ? "h-11" : "h-7"), children: readOnly ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FrozenInclude, { name: row.label, checked: row.include }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1398
|
+
import_design_system7.Switch,
|
|
1365
1399
|
{
|
|
1366
1400
|
size: "sm",
|
|
1367
1401
|
"aria-label": `Include ${row.label}`,
|
|
1368
1402
|
checked: row.include,
|
|
1369
|
-
disabled: readOnly,
|
|
1370
1403
|
onCheckedChange: (next) => onChange(row.key, row.surfaceKey, withInclude(row, next))
|
|
1371
1404
|
}
|
|
1372
1405
|
) }),
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-muted-foreground", children: "Inline max" }),
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1375
1408
|
InlineMaxInput,
|
|
1376
1409
|
{
|
|
1377
1410
|
label: row.label,
|
|
@@ -1385,8 +1418,8 @@ function RowDetail({
|
|
|
1385
1418
|
}
|
|
1386
1419
|
) })
|
|
1387
1420
|
] }),
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1389
|
-
/* @__PURE__ */ (0,
|
|
1421
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LayerTable, { row }),
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContextDeliveredValue, { row, load: loadView }),
|
|
1390
1423
|
renderDetail ? renderDetail(row) : null
|
|
1391
1424
|
] });
|
|
1392
1425
|
}
|
|
@@ -1429,22 +1462,22 @@ function ContextRulesPanelBody({
|
|
|
1429
1462
|
const openedBlock = openBlockId ? (blocks ?? []).find((b) => b.id === openBlockId) ?? null : null;
|
|
1430
1463
|
const selected = !openedBlock && selectedKey ? rows.find((r) => r.key === selectedKey) ?? null : null;
|
|
1431
1464
|
const comfortable = !!isMobile;
|
|
1432
|
-
const search = /* @__PURE__ */ (0,
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1434
|
-
/* @__PURE__ */ (0,
|
|
1435
|
-
|
|
1465
|
+
const search = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "relative shrink-0 border-b border-border p-2", children: [
|
|
1466
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SearchIcon, { className: "pointer-events-none absolute left-4 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
1467
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1468
|
+
import_design_system7.Input,
|
|
1436
1469
|
{
|
|
1437
1470
|
type: "search",
|
|
1438
1471
|
"aria-label": "Search values",
|
|
1439
1472
|
placeholder: "Search",
|
|
1440
1473
|
value: query,
|
|
1441
1474
|
onChange: (e) => setQuery(e.target.value),
|
|
1442
|
-
className: (0,
|
|
1475
|
+
className: (0, import_design_system7.cn)("pl-7 shadow-none", comfortable ? "h-11 text-base" : "h-8 text-xs")
|
|
1443
1476
|
}
|
|
1444
1477
|
)
|
|
1445
1478
|
] });
|
|
1446
|
-
const table = /* @__PURE__ */ (0,
|
|
1447
|
-
/* @__PURE__ */ (0,
|
|
1479
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
1480
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1448
1481
|
ContextRulesTable,
|
|
1449
1482
|
{
|
|
1450
1483
|
rows: visible,
|
|
@@ -1459,7 +1492,7 @@ function ContextRulesPanelBody({
|
|
|
1459
1492
|
...mismatches ? { mismatches } : {}
|
|
1460
1493
|
}
|
|
1461
1494
|
),
|
|
1462
|
-
/* @__PURE__ */ (0,
|
|
1495
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1463
1496
|
ContextReceiptBlocks,
|
|
1464
1497
|
{
|
|
1465
1498
|
blocks: visibleBlocks,
|
|
@@ -1469,7 +1502,7 @@ function ContextRulesPanelBody({
|
|
|
1469
1502
|
}
|
|
1470
1503
|
)
|
|
1471
1504
|
] });
|
|
1472
|
-
const detail = openedBlock ? /* @__PURE__ */ (0,
|
|
1505
|
+
const detail = openedBlock ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContextReceiptBlockDetail, { block: openedBlock, load: loadView }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1473
1506
|
RowDetail,
|
|
1474
1507
|
{
|
|
1475
1508
|
row: selected,
|
|
@@ -1483,31 +1516,31 @@ function ContextRulesPanelBody({
|
|
|
1483
1516
|
}
|
|
1484
1517
|
) : null;
|
|
1485
1518
|
if (isMobile) {
|
|
1486
|
-
return /* @__PURE__ */ (0,
|
|
1487
|
-
/* @__PURE__ */ (0,
|
|
1519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_design_system7.TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: detail ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-12 shrink-0 items-center border-b border-border px-1", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1488
1521
|
"button",
|
|
1489
1522
|
{
|
|
1490
1523
|
type: "button",
|
|
1491
1524
|
onClick: () => select(null),
|
|
1492
1525
|
className: "inline-flex h-11 items-center gap-1 rounded-md px-2 text-sm text-muted-foreground hover:text-foreground",
|
|
1493
1526
|
children: [
|
|
1494
|
-
/* @__PURE__ */ (0,
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChevronLeftIcon, { className: "h-4 w-4" }),
|
|
1495
1528
|
"Back"
|
|
1496
1529
|
]
|
|
1497
1530
|
}
|
|
1498
1531
|
) }),
|
|
1499
|
-
/* @__PURE__ */ (0,
|
|
1500
|
-
] }) : /* @__PURE__ */ (0,
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: detail })
|
|
1533
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1501
1534
|
search,
|
|
1502
1535
|
table
|
|
1503
1536
|
] }) }) });
|
|
1504
1537
|
}
|
|
1505
|
-
return /* @__PURE__ */ (0,
|
|
1506
|
-
/* @__PURE__ */ (0,
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_design_system7.TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0", className), children: [
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("aside", { className: "flex w-[22rem] shrink-0 flex-col border-r border-border", children: [
|
|
1507
1540
|
search,
|
|
1508
1541
|
table
|
|
1509
1542
|
] }),
|
|
1510
|
-
/* @__PURE__ */ (0,
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("section", { className: "min-h-0 min-w-0 flex-1 overflow-y-auto", children: detail ?? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-full items-center justify-center text-xs text-muted-foreground", children: "Select an item" }) })
|
|
1511
1544
|
] }) });
|
|
1512
1545
|
}
|
|
1513
1546
|
//# sourceMappingURL=index.cjs.map
|