@ai-matrx/agents 0.8.0 → 0.9.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.
- package/CHANGELOG.md +243 -0
- package/dist/catalog/index.cjs +101 -15
- package/dist/catalog/index.cjs.map +1 -1
- package/dist/catalog/index.d.cts +86 -616
- package/dist/catalog/index.d.ts +86 -616
- package/dist/catalog/index.js +101 -15
- package/dist/catalog/index.js.map +1 -1
- package/dist/catalog/native/index.cjs +2838 -0
- package/dist/catalog/native/index.cjs.map +1 -0
- package/dist/catalog/native/index.d.cts +660 -0
- package/dist/catalog/native/index.d.ts +660 -0
- package/dist/catalog/native/index.js +2834 -0
- package/dist/catalog/native/index.js.map +1 -0
- package/dist/catalog/react/index.cjs +524 -415
- package/dist/catalog/react/index.cjs.map +1 -1
- package/dist/catalog/react/index.d.cts +69 -26
- package/dist/catalog/react/index.d.ts +69 -26
- package/dist/catalog/react/index.js +408 -299
- package/dist/catalog/react/index.js.map +1 -1
- package/dist/orchestra-CID-rsu8.d.cts +643 -0
- package/dist/orchestra-CID-rsu8.d.ts +643 -0
- package/package.json +22 -2
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
|
|
4
4
|
// catalog/react/context.tsx
|
|
5
|
+
import { useMemo as useMemo2 } from "react";
|
|
6
|
+
|
|
7
|
+
// catalog/shared/context.tsx
|
|
5
8
|
import {
|
|
6
9
|
createContext,
|
|
7
10
|
useCallback,
|
|
@@ -11,17 +14,19 @@ import {
|
|
|
11
14
|
} from "react";
|
|
12
15
|
import { jsx } from "react/jsx-runtime";
|
|
13
16
|
var AgentCatalogContext = createContext(null);
|
|
14
|
-
function
|
|
17
|
+
function AgentCatalogProviderCore({
|
|
15
18
|
catalog,
|
|
19
|
+
platform,
|
|
16
20
|
children,
|
|
17
21
|
...ports
|
|
18
22
|
}) {
|
|
19
23
|
const value = useMemo(
|
|
20
|
-
() => ({ catalog, ...ports }),
|
|
24
|
+
() => ({ catalog, platform, ...ports }),
|
|
21
25
|
// The ports are plain values a host declares once; re-binding on identity
|
|
22
26
|
// change is correct and cheap.
|
|
23
27
|
[
|
|
24
28
|
catalog,
|
|
29
|
+
platform,
|
|
25
30
|
ports.navigate,
|
|
26
31
|
ports.LinkComponent,
|
|
27
32
|
ports.renderModelRef,
|
|
@@ -35,7 +40,7 @@ function useBinding() {
|
|
|
35
40
|
const binding = useContext(AgentCatalogContext);
|
|
36
41
|
if (!binding) {
|
|
37
42
|
throw new Error(
|
|
38
|
-
"@ai-matrx/agents/catalog
|
|
43
|
+
"@ai-matrx/agents/catalog: no <AgentCatalogProvider> is mounted above this component. Create the catalog once with createAgentCatalog({ client, identity }) and mount <AgentCatalogProvider catalog={catalog}> at the top of your tree."
|
|
39
44
|
);
|
|
40
45
|
}
|
|
41
46
|
return binding;
|
|
@@ -45,29 +50,26 @@ function useAgentCatalog() {
|
|
|
45
50
|
}
|
|
46
51
|
function useAgentCatalogUiPorts() {
|
|
47
52
|
const binding = useBinding();
|
|
53
|
+
const hostNavigate = binding.navigate;
|
|
54
|
+
const platformNavigate = binding.platform.navigate;
|
|
48
55
|
const navigate = useCallback(
|
|
49
56
|
(href) => {
|
|
50
|
-
if (
|
|
51
|
-
|
|
57
|
+
if (hostNavigate) {
|
|
58
|
+
hostNavigate(href);
|
|
52
59
|
return;
|
|
53
60
|
}
|
|
54
|
-
|
|
61
|
+
platformNavigate(href);
|
|
55
62
|
},
|
|
56
|
-
[
|
|
63
|
+
[hostNavigate, platformNavigate]
|
|
57
64
|
);
|
|
58
65
|
return {
|
|
59
66
|
navigate,
|
|
60
|
-
LinkComponent: binding.LinkComponent ??
|
|
61
|
-
renderModelRef: binding.renderModelRef ??
|
|
67
|
+
LinkComponent: binding.LinkComponent ?? binding.platform.LinkComponent,
|
|
68
|
+
renderModelRef: binding.renderModelRef ?? binding.platform.renderModelRef,
|
|
62
69
|
openPeek: binding.openPeek,
|
|
63
70
|
popoverContainer: binding.popoverContainer
|
|
64
71
|
};
|
|
65
72
|
}
|
|
66
|
-
var DefaultLink = ({ children, ...props }) => /* @__PURE__ */ jsx("a", { ...props, children });
|
|
67
|
-
var defaultRenderModelRef = ({
|
|
68
|
-
modelId,
|
|
69
|
-
className
|
|
70
|
-
}) => /* @__PURE__ */ jsx("span", { className, children: modelId });
|
|
71
73
|
function useAgentCatalogState(select) {
|
|
72
74
|
const catalog = useAgentCatalog();
|
|
73
75
|
const getSnapshot = useCallback(
|
|
@@ -81,7 +83,39 @@ function useAgentCatalogRows() {
|
|
|
81
83
|
}
|
|
82
84
|
var selectRows = (state) => state.rows;
|
|
83
85
|
|
|
84
|
-
// catalog/react/
|
|
86
|
+
// catalog/react/context.tsx
|
|
87
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
88
|
+
var DefaultLink = ({ children, ...props }) => /* @__PURE__ */ jsx2("a", { ...props, children });
|
|
89
|
+
var defaultRenderModelRef = ({
|
|
90
|
+
modelId,
|
|
91
|
+
className
|
|
92
|
+
}) => /* @__PURE__ */ jsx2("span", { className, children: modelId });
|
|
93
|
+
var webNavigate = (href) => {
|
|
94
|
+
if (typeof window !== "undefined") window.location.assign(href);
|
|
95
|
+
};
|
|
96
|
+
var WEB_PLATFORM_DEFAULTS = {
|
|
97
|
+
navigate: webNavigate,
|
|
98
|
+
LinkComponent: DefaultLink,
|
|
99
|
+
renderModelRef: defaultRenderModelRef
|
|
100
|
+
};
|
|
101
|
+
function AgentCatalogProvider({
|
|
102
|
+
catalog,
|
|
103
|
+
children,
|
|
104
|
+
...ports
|
|
105
|
+
}) {
|
|
106
|
+
const platform = useMemo2(() => WEB_PLATFORM_DEFAULTS, []);
|
|
107
|
+
return /* @__PURE__ */ jsx2(
|
|
108
|
+
AgentCatalogProviderCore,
|
|
109
|
+
{
|
|
110
|
+
catalog,
|
|
111
|
+
platform,
|
|
112
|
+
...ports,
|
|
113
|
+
children
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// catalog/shared/useAgentConsumer.ts
|
|
85
119
|
import { useCallback as useCallback2, useEffect, useRef, useState } from "react";
|
|
86
120
|
|
|
87
121
|
// catalog/types.ts
|
|
@@ -113,7 +147,7 @@ var DEFAULT_AGENT_CONSUMER_STATE = {
|
|
|
113
147
|
deepSearch: false
|
|
114
148
|
};
|
|
115
149
|
|
|
116
|
-
// catalog/
|
|
150
|
+
// catalog/shared/useAgentConsumer.ts
|
|
117
151
|
var DEBOUNCE_MS = 250;
|
|
118
152
|
var MIN_QUERY_LENGTH = 2;
|
|
119
153
|
function useAgentConsumer(consumerId, options) {
|
|
@@ -287,11 +321,11 @@ function useAgentConsumer(consumerId, options) {
|
|
|
287
321
|
};
|
|
288
322
|
}
|
|
289
323
|
|
|
290
|
-
// catalog/
|
|
324
|
+
// catalog/shared/useAgentListCore.ts
|
|
291
325
|
import {
|
|
292
326
|
useCallback as useCallback3,
|
|
293
327
|
useEffect as useEffect2,
|
|
294
|
-
useMemo as
|
|
328
|
+
useMemo as useMemo3,
|
|
295
329
|
useRef as useRef2,
|
|
296
330
|
useState as useState2
|
|
297
331
|
} from "react";
|
|
@@ -388,7 +422,19 @@ function memoize2(fn) {
|
|
|
388
422
|
return last;
|
|
389
423
|
};
|
|
390
424
|
}
|
|
425
|
+
function compareAgentIds(a, b) {
|
|
426
|
+
const idA = a.id ?? "";
|
|
427
|
+
const idB = b.id ?? "";
|
|
428
|
+
if (idA < idB) return -1;
|
|
429
|
+
if (idA > idB) return 1;
|
|
430
|
+
return 0;
|
|
431
|
+
}
|
|
391
432
|
function applyAgentSortComparator(a, b, sortBy) {
|
|
433
|
+
const primary = compareAgentSortKey(a, b, sortBy);
|
|
434
|
+
if (!Number.isFinite(primary) || primary === 0) return compareAgentIds(a, b);
|
|
435
|
+
return primary;
|
|
436
|
+
}
|
|
437
|
+
function compareAgentSortKey(a, b, sortBy) {
|
|
392
438
|
switch (sortBy) {
|
|
393
439
|
case "name-asc":
|
|
394
440
|
return (a.name ?? "").localeCompare(b.name ?? "");
|
|
@@ -564,25 +610,49 @@ var makeSelectFilteredAgents = (includeSystemInAll = false) => memoize2(
|
|
|
564
610
|
return filterUserTypeAgents(userAgents, consumer);
|
|
565
611
|
}
|
|
566
612
|
);
|
|
613
|
+
function agentMatchesArchiveFilter(agent, archFilter) {
|
|
614
|
+
if (archFilter === "active") return !agent.isArchived;
|
|
615
|
+
if (archFilter === "archived") return Boolean(agent.isArchived);
|
|
616
|
+
return true;
|
|
617
|
+
}
|
|
618
|
+
function countUserRows(agents, archFilter, predicate) {
|
|
619
|
+
let n = 0;
|
|
620
|
+
for (const a of agents) {
|
|
621
|
+
if (a.agentType !== "user") continue;
|
|
622
|
+
if (!agentMatchesArchiveFilter(a, archFilter)) continue;
|
|
623
|
+
if (predicate(a)) n += 1;
|
|
624
|
+
}
|
|
625
|
+
return n;
|
|
626
|
+
}
|
|
627
|
+
var isOwned = (a) => a.isOwner === true;
|
|
628
|
+
var isShared = (a) => a.isOwner === false && a.accessLevel != null;
|
|
629
|
+
var isAny = () => true;
|
|
630
|
+
var isFavorite = (a) => Boolean(a.isFavorite);
|
|
631
|
+
var selectAgentTabCounts = memoize2(
|
|
632
|
+
(agents, archFilter) => ({
|
|
633
|
+
mine: countUserRows(agents, archFilter, isOwned),
|
|
634
|
+
shared: countUserRows(agents, archFilter, isShared),
|
|
635
|
+
all: countUserRows(agents, archFilter, isAny),
|
|
636
|
+
system: selectBuiltinTypeAgents(agents).length
|
|
637
|
+
})
|
|
638
|
+
);
|
|
567
639
|
var selectTotalUserAgentsCount = memoize1(
|
|
568
|
-
(agents) =>
|
|
640
|
+
(agents) => countUserRows(agents, "active", isAny)
|
|
569
641
|
);
|
|
570
642
|
var selectTotalOwnedAgentsCount = memoize1(
|
|
571
|
-
(agents) =>
|
|
643
|
+
(agents) => countUserRows(agents, "active", isOwned)
|
|
572
644
|
);
|
|
573
645
|
var selectTotalSharedAgentsCount = memoize1(
|
|
574
|
-
(agents) =>
|
|
575
|
-
(a) => a.isOwner === false && a.accessLevel != null
|
|
576
|
-
).length
|
|
646
|
+
(agents) => countUserRows(agents, "active", isShared)
|
|
577
647
|
);
|
|
578
648
|
var selectTotalBuiltinAgentsCount = memoize1(
|
|
579
649
|
(agents) => selectBuiltinTypeAgents(agents).length
|
|
580
650
|
);
|
|
581
651
|
var selectTotalFavoriteAgentsCount = memoize1(
|
|
582
|
-
(agents) =>
|
|
652
|
+
(agents) => countUserRows(agents, "active", isFavorite)
|
|
583
653
|
);
|
|
584
654
|
|
|
585
|
-
// catalog/
|
|
655
|
+
// catalog/shared/useAgentListCore.ts
|
|
586
656
|
var HOVER_GRACE_MS = 900;
|
|
587
657
|
function coerceVisibleTab(current, allowed, initialTab) {
|
|
588
658
|
if (allowed.length === 0) return null;
|
|
@@ -610,13 +680,14 @@ function useAgentListCore({
|
|
|
610
680
|
const consumer = useAgentConsumer(consumerId, { unregisterOnUnmount: true });
|
|
611
681
|
const rows = useAgentCatalogRows();
|
|
612
682
|
const userId = catalog.getUserIdOrNull();
|
|
613
|
-
const
|
|
614
|
-
const
|
|
683
|
+
const tabCountsForFilter = selectAgentTabCounts(rows, consumer.state.archFilter);
|
|
684
|
+
const ownedCount = tabCountsForFilter.mine;
|
|
685
|
+
const selectFiltered = useMemo3(
|
|
615
686
|
() => makeSelectFilteredAgents(includeSystemInAll),
|
|
616
687
|
[includeSystemInAll]
|
|
617
688
|
);
|
|
618
689
|
const filteredAgents = selectFiltered(rows, consumer.state);
|
|
619
|
-
const excludedAgentIds =
|
|
690
|
+
const excludedAgentIds = useMemo3(
|
|
620
691
|
() => new Set(excludeAgentIds),
|
|
621
692
|
[excludeAgentIds]
|
|
622
693
|
);
|
|
@@ -627,12 +698,7 @@ function useAgentListCore({
|
|
|
627
698
|
const onSystemTab = consumer.tab === "system";
|
|
628
699
|
const allCategories = onSystemTab ? selectAllSystemAgentCategories(rows) : selectAllAgentCategories(rows);
|
|
629
700
|
const allTags = onSystemTab ? selectAllSystemAgentTags(rows) : selectAllAgentTags(rows);
|
|
630
|
-
const tabCounts =
|
|
631
|
-
mine: ownedCount,
|
|
632
|
-
shared: selectTotalSharedAgentsCount(rows),
|
|
633
|
-
all: selectTotalUserAgentsCount(rows),
|
|
634
|
-
system: selectTotalBuiltinAgentsCount(rows)
|
|
635
|
-
};
|
|
701
|
+
const tabCounts = tabCountsForFilter;
|
|
636
702
|
const isLoading = status === "loading";
|
|
637
703
|
const agentsLoaded = status === "succeeded" || status === "failed";
|
|
638
704
|
const ensureLoaded = useCallback3(() => {
|
|
@@ -791,15 +857,111 @@ import {
|
|
|
791
857
|
TooltipTrigger,
|
|
792
858
|
useIsMobile
|
|
793
859
|
} from "@ai-matrx/design-system";
|
|
794
|
-
import { useCallback as useCallback5, useMemo as
|
|
860
|
+
import { useCallback as useCallback5, useMemo as useMemo4, useRef as useRef4, useState as useState3 } from "react";
|
|
795
861
|
|
|
796
862
|
// catalog/react/primitives.tsx
|
|
797
863
|
import { cn } from "@ai-matrx/design-system";
|
|
798
864
|
|
|
865
|
+
// catalog/shared/icon-paths.ts
|
|
866
|
+
var SHAPES = {
|
|
867
|
+
star: {
|
|
868
|
+
paths: [
|
|
869
|
+
"M11.5 3.2a.6.6 0 0 1 1 0l2.3 4.7 5.2.8a.6.6 0 0 1 .3 1l-3.8 3.7.9 5.2a.6.6 0 0 1-.9.6L12 16.8l-4.6 2.4a.6.6 0 0 1-.9-.6l.9-5.2-3.8-3.7a.6.6 0 0 1 .3-1l5.2-.8Z"
|
|
870
|
+
],
|
|
871
|
+
fillable: true
|
|
872
|
+
},
|
|
873
|
+
chevronRight: { paths: ["m9 18 6-6-6-6"] },
|
|
874
|
+
chevronDown: { paths: ["m6 9 6 6 6-6"] },
|
|
875
|
+
search: {
|
|
876
|
+
paths: ["m21 21-4.3-4.3"],
|
|
877
|
+
circles: [{ cx: 11, cy: 11, r: 8 }]
|
|
878
|
+
},
|
|
879
|
+
x: { paths: ["M18 6 6 18", "m6 6 12 12"] },
|
|
880
|
+
check: { paths: ["M20 6 9 17l-5-5"] },
|
|
881
|
+
arrowUpDown: {
|
|
882
|
+
paths: ["m21 16-4 4-4-4", "M17 20V4", "m3 8 4-4 4 4", "M7 4v16"]
|
|
883
|
+
},
|
|
884
|
+
folder: {
|
|
885
|
+
paths: [
|
|
886
|
+
"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"
|
|
887
|
+
]
|
|
888
|
+
},
|
|
889
|
+
tag: {
|
|
890
|
+
paths: [
|
|
891
|
+
"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"
|
|
892
|
+
],
|
|
893
|
+
circles: [{ cx: 7.5, cy: 7.5, r: 0.5, filled: true }]
|
|
894
|
+
},
|
|
895
|
+
rotateCcw: {
|
|
896
|
+
paths: [
|
|
897
|
+
"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
898
|
+
"M3 3v5h5"
|
|
899
|
+
]
|
|
900
|
+
},
|
|
901
|
+
loader: { paths: ["M21 12a9 9 0 1 1-6.219-8.56"] },
|
|
902
|
+
alertTriangle: {
|
|
903
|
+
paths: [
|
|
904
|
+
"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
905
|
+
"M12 9v4",
|
|
906
|
+
"M12 17h.01"
|
|
907
|
+
]
|
|
908
|
+
},
|
|
909
|
+
/**
|
|
910
|
+
* The Orchestra marker (Lucide `music-4`): the glyph the Workflow Studio's
|
|
911
|
+
* picker used for a conductor, kept identical so the same agent wears the
|
|
912
|
+
* same mark in every client.
|
|
913
|
+
*/
|
|
914
|
+
music4: {
|
|
915
|
+
paths: ["M9 18V5l12-2v13", "m9 9 12-2"],
|
|
916
|
+
circles: [
|
|
917
|
+
{ cx: 6, cy: 18, r: 3 },
|
|
918
|
+
{ cx: 18, cy: 16, r: 3 }
|
|
919
|
+
]
|
|
920
|
+
},
|
|
921
|
+
clock: {
|
|
922
|
+
paths: ["M12 6v6l4 2"],
|
|
923
|
+
circles: [{ cx: 12, cy: 12, r: 10 }]
|
|
924
|
+
},
|
|
925
|
+
globe: {
|
|
926
|
+
paths: ["M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", "M2 12h20"],
|
|
927
|
+
circles: [{ cx: 12, cy: 12, r: 10 }]
|
|
928
|
+
},
|
|
929
|
+
users: {
|
|
930
|
+
paths: [
|
|
931
|
+
"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
932
|
+
"M22 21v-2a4 4 0 0 0-3-3.87",
|
|
933
|
+
"M16 3.13a4 4 0 0 1 0 7.75"
|
|
934
|
+
],
|
|
935
|
+
circles: [{ cx: 9, cy: 7, r: 4 }]
|
|
936
|
+
},
|
|
937
|
+
externalLink: {
|
|
938
|
+
paths: [
|
|
939
|
+
"M15 3h6v6",
|
|
940
|
+
"M10 14 21 3",
|
|
941
|
+
"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
942
|
+
]
|
|
943
|
+
},
|
|
944
|
+
messageCircle: { paths: ["M7.9 20A9 9 0 1 0 4 16.1L2 22Z"] },
|
|
945
|
+
rocket: {
|
|
946
|
+
paths: [
|
|
947
|
+
"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91 0",
|
|
948
|
+
"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2",
|
|
949
|
+
"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",
|
|
950
|
+
"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"
|
|
951
|
+
]
|
|
952
|
+
},
|
|
953
|
+
circleCheck: {
|
|
954
|
+
paths: ["m9 12 2 2 4-4"],
|
|
955
|
+
circles: [{ cx: 12, cy: 12, r: 10 }]
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
var ICON_PATHS = SHAPES;
|
|
959
|
+
var ICON_NAMES = Object.keys(ICON_PATHS);
|
|
960
|
+
|
|
799
961
|
// catalog/react/icons.tsx
|
|
800
|
-
import { jsx as
|
|
962
|
+
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
801
963
|
function Svg({ children, ...props }) {
|
|
802
|
-
return /* @__PURE__ */
|
|
964
|
+
return /* @__PURE__ */ jsx3(
|
|
803
965
|
"svg",
|
|
804
966
|
{
|
|
805
967
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -815,133 +977,79 @@ function Svg({ children, ...props }) {
|
|
|
815
977
|
}
|
|
816
978
|
);
|
|
817
979
|
}
|
|
980
|
+
function Shape({ name, filled }) {
|
|
981
|
+
const shape = ICON_PATHS[name];
|
|
982
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
983
|
+
shape.paths.map((d, index) => /* @__PURE__ */ jsx3(
|
|
984
|
+
"path",
|
|
985
|
+
{
|
|
986
|
+
d,
|
|
987
|
+
...filled && shape.fillable ? { fill: "currentColor" } : {}
|
|
988
|
+
},
|
|
989
|
+
`p${index}`
|
|
990
|
+
)),
|
|
991
|
+
(shape.circles ?? []).map((circle, index) => /* @__PURE__ */ jsx3(
|
|
992
|
+
"circle",
|
|
993
|
+
{
|
|
994
|
+
cx: circle.cx,
|
|
995
|
+
cy: circle.cy,
|
|
996
|
+
r: circle.r,
|
|
997
|
+
...circle.filled ? { fill: "currentColor" } : {}
|
|
998
|
+
},
|
|
999
|
+
`c${index}`
|
|
1000
|
+
))
|
|
1001
|
+
] });
|
|
1002
|
+
}
|
|
1003
|
+
function makeIcon(name) {
|
|
1004
|
+
return function Icon(props) {
|
|
1005
|
+
return /* @__PURE__ */ jsx3(Svg, { ...props, children: /* @__PURE__ */ jsx3(Shape, { name, filled: false }) });
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
818
1008
|
function StarIcon({
|
|
819
1009
|
filled = false,
|
|
820
1010
|
...props
|
|
821
1011
|
}) {
|
|
822
|
-
return /* @__PURE__ */
|
|
823
|
-
}
|
|
824
|
-
function ChevronRightIcon(props) {
|
|
825
|
-
return /* @__PURE__ */ jsx2(Svg, { ...props, children: /* @__PURE__ */ jsx2("path", { d: "m9 18 6-6-6-6" }) });
|
|
826
|
-
}
|
|
827
|
-
function ChevronDownIcon(props) {
|
|
828
|
-
return /* @__PURE__ */ jsx2(Svg, { ...props, children: /* @__PURE__ */ jsx2("path", { d: "m6 9 6 6 6-6" }) });
|
|
829
|
-
}
|
|
830
|
-
function SearchIcon(props) {
|
|
831
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
832
|
-
/* @__PURE__ */ jsx2("circle", { cx: "11", cy: "11", r: "8" }),
|
|
833
|
-
/* @__PURE__ */ jsx2("path", { d: "m21 21-4.3-4.3" })
|
|
834
|
-
] });
|
|
835
|
-
}
|
|
836
|
-
function XIcon(props) {
|
|
837
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
838
|
-
/* @__PURE__ */ jsx2("path", { d: "M18 6 6 18" }),
|
|
839
|
-
/* @__PURE__ */ jsx2("path", { d: "m6 6 12 12" })
|
|
840
|
-
] });
|
|
841
|
-
}
|
|
842
|
-
function CheckIcon(props) {
|
|
843
|
-
return /* @__PURE__ */ jsx2(Svg, { ...props, children: /* @__PURE__ */ jsx2("path", { d: "M20 6 9 17l-5-5" }) });
|
|
844
|
-
}
|
|
845
|
-
function ArrowUpDownIcon(props) {
|
|
846
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
847
|
-
/* @__PURE__ */ jsx2("path", { d: "m21 16-4 4-4-4" }),
|
|
848
|
-
/* @__PURE__ */ jsx2("path", { d: "M17 20V4" }),
|
|
849
|
-
/* @__PURE__ */ jsx2("path", { d: "m3 8 4-4 4 4" }),
|
|
850
|
-
/* @__PURE__ */ jsx2("path", { d: "M7 4v16" })
|
|
851
|
-
] });
|
|
852
|
-
}
|
|
853
|
-
function FolderIcon(props) {
|
|
854
|
-
return /* @__PURE__ */ jsx2(Svg, { ...props, children: /* @__PURE__ */ jsx2("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }) });
|
|
855
|
-
}
|
|
856
|
-
function TagIcon(props) {
|
|
857
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
858
|
-
/* @__PURE__ */ jsx2("path", { d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }),
|
|
859
|
-
/* @__PURE__ */ jsx2("circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" })
|
|
860
|
-
] });
|
|
861
|
-
}
|
|
862
|
-
function RotateCcwIcon(props) {
|
|
863
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
864
|
-
/* @__PURE__ */ jsx2("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
865
|
-
/* @__PURE__ */ jsx2("path", { d: "M3 3v5h5" })
|
|
866
|
-
] });
|
|
867
|
-
}
|
|
868
|
-
function LoaderIcon(props) {
|
|
869
|
-
return /* @__PURE__ */ jsx2(Svg, { ...props, children: /* @__PURE__ */ jsx2("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
|
|
1012
|
+
return /* @__PURE__ */ jsx3(Svg, { ...props, fill: filled ? "currentColor" : "none", children: /* @__PURE__ */ jsx3(Shape, { name: "star", filled }) });
|
|
870
1013
|
}
|
|
1014
|
+
var ChevronRightIcon = makeIcon("chevronRight");
|
|
1015
|
+
var ChevronDownIcon = makeIcon("chevronDown");
|
|
1016
|
+
var SearchIcon = makeIcon("search");
|
|
1017
|
+
var XIcon = makeIcon("x");
|
|
1018
|
+
var CheckIcon = makeIcon("check");
|
|
1019
|
+
var ArrowUpDownIcon = makeIcon("arrowUpDown");
|
|
1020
|
+
var FolderIcon = makeIcon("folder");
|
|
1021
|
+
var TagIcon = makeIcon("tag");
|
|
1022
|
+
var RotateCcwIcon = makeIcon("rotateCcw");
|
|
1023
|
+
var LoaderIcon = makeIcon("loader");
|
|
1024
|
+
var UsersIcon = makeIcon("users");
|
|
1025
|
+
var ClockIcon = makeIcon("clock");
|
|
1026
|
+
var GlobeIcon = makeIcon("globe");
|
|
1027
|
+
var ExternalLinkIcon = makeIcon("externalLink");
|
|
1028
|
+
var MessageCircleIcon = makeIcon("messageCircle");
|
|
1029
|
+
var RocketIcon = makeIcon("rocket");
|
|
1030
|
+
var CircleCheckIcon = makeIcon("circleCheck");
|
|
1031
|
+
var AlertTriangleIcon = makeIcon("alertTriangle");
|
|
1032
|
+
var Music4Icon = makeIcon("music4");
|
|
871
1033
|
function MousePointerClickIcon(props) {
|
|
872
1034
|
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
] });
|
|
879
|
-
}
|
|
880
|
-
function UsersIcon(props) {
|
|
881
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
882
|
-
/* @__PURE__ */ jsx2("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
883
|
-
/* @__PURE__ */ jsx2("circle", { cx: "9", cy: "7", r: "4" }),
|
|
884
|
-
/* @__PURE__ */ jsx2("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
885
|
-
/* @__PURE__ */ jsx2("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
886
|
-
] });
|
|
887
|
-
}
|
|
888
|
-
function ClockIcon(props) {
|
|
889
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
890
|
-
/* @__PURE__ */ jsx2("circle", { cx: "12", cy: "12", r: "10" }),
|
|
891
|
-
/* @__PURE__ */ jsx2("path", { d: "M12 6v6l4 2" })
|
|
892
|
-
] });
|
|
893
|
-
}
|
|
894
|
-
function GlobeIcon(props) {
|
|
895
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
896
|
-
/* @__PURE__ */ jsx2("circle", { cx: "12", cy: "12", r: "10" }),
|
|
897
|
-
/* @__PURE__ */ jsx2("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
|
|
898
|
-
/* @__PURE__ */ jsx2("path", { d: "M2 12h20" })
|
|
899
|
-
] });
|
|
900
|
-
}
|
|
901
|
-
function ExternalLinkIcon(props) {
|
|
902
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
903
|
-
/* @__PURE__ */ jsx2("path", { d: "M15 3h6v6" }),
|
|
904
|
-
/* @__PURE__ */ jsx2("path", { d: "M10 14 21 3" }),
|
|
905
|
-
/* @__PURE__ */ jsx2("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
|
|
906
|
-
] });
|
|
907
|
-
}
|
|
908
|
-
function MessageCircleIcon(props) {
|
|
909
|
-
return /* @__PURE__ */ jsx2(Svg, { ...props, children: /* @__PURE__ */ jsx2("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }) });
|
|
910
|
-
}
|
|
911
|
-
function RocketIcon(props) {
|
|
912
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
913
|
-
/* @__PURE__ */ jsx2("path", { d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91 0" }),
|
|
914
|
-
/* @__PURE__ */ jsx2("path", { d: "m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2" }),
|
|
915
|
-
/* @__PURE__ */ jsx2("path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0" }),
|
|
916
|
-
/* @__PURE__ */ jsx2("path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" })
|
|
917
|
-
] });
|
|
918
|
-
}
|
|
919
|
-
function AlertTriangleIcon(props) {
|
|
920
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
921
|
-
/* @__PURE__ */ jsx2("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
922
|
-
/* @__PURE__ */ jsx2("path", { d: "M12 9v4" }),
|
|
923
|
-
/* @__PURE__ */ jsx2("path", { d: "M12 17h.01" })
|
|
924
|
-
] });
|
|
925
|
-
}
|
|
926
|
-
function Music4Icon(props) {
|
|
927
|
-
return /* @__PURE__ */ jsxs(Svg, { ...props, children: [
|
|
928
|
-
/* @__PURE__ */ jsx2("path", { d: "M9 18V5l12-2v13" }),
|
|
929
|
-
/* @__PURE__ */ jsx2("path", { d: "m9 9 12-2" }),
|
|
930
|
-
/* @__PURE__ */ jsx2("circle", { cx: "6", cy: "18", r: "3" }),
|
|
931
|
-
/* @__PURE__ */ jsx2("circle", { cx: "18", cy: "16", r: "3" })
|
|
1035
|
+
/* @__PURE__ */ jsx3("path", { d: "M14 4.1 12 6" }),
|
|
1036
|
+
/* @__PURE__ */ jsx3("path", { d: "m5.1 8-2.9-.8" }),
|
|
1037
|
+
/* @__PURE__ */ jsx3("path", { d: "m6 12-1.9 2" }),
|
|
1038
|
+
/* @__PURE__ */ jsx3("path", { d: "M7.2 2.2 8 5.1" }),
|
|
1039
|
+
/* @__PURE__ */ jsx3("path", { d: "M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z" })
|
|
932
1040
|
] });
|
|
933
1041
|
}
|
|
934
1042
|
|
|
935
1043
|
// catalog/react/primitives.tsx
|
|
936
|
-
import { jsx as
|
|
1044
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
937
1045
|
var SearchInput = ({
|
|
938
1046
|
ref,
|
|
939
1047
|
value,
|
|
940
1048
|
onChange,
|
|
941
1049
|
placeholder
|
|
942
1050
|
}) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1.5 h-7 px-2 rounded-md bg-muted/40 border border-border/50", children: [
|
|
943
|
-
/* @__PURE__ */
|
|
944
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ jsx4(SearchIcon, { className: "w-3 h-3 text-muted-foreground shrink-0" }),
|
|
1052
|
+
/* @__PURE__ */ jsx4(
|
|
945
1053
|
"input",
|
|
946
1054
|
{
|
|
947
1055
|
ref,
|
|
@@ -953,14 +1061,14 @@ var SearchInput = ({
|
|
|
953
1061
|
style: { fontSize: "16px" }
|
|
954
1062
|
}
|
|
955
1063
|
),
|
|
956
|
-
value && /* @__PURE__ */
|
|
1064
|
+
value && /* @__PURE__ */ jsx4(
|
|
957
1065
|
"button",
|
|
958
1066
|
{
|
|
959
1067
|
type: "button",
|
|
960
1068
|
onClick: () => onChange(""),
|
|
961
1069
|
className: "text-muted-foreground hover:text-foreground",
|
|
962
1070
|
"aria-label": "Clear search",
|
|
963
|
-
children: /* @__PURE__ */
|
|
1071
|
+
children: /* @__PURE__ */ jsx4(XIcon, { className: "w-3 h-3" })
|
|
964
1072
|
}
|
|
965
1073
|
)
|
|
966
1074
|
] });
|
|
@@ -981,8 +1089,8 @@ function FilterChip({
|
|
|
981
1089
|
focused ? "bg-primary/15 text-primary border border-primary/30 ring-1 ring-primary/20" : active ? "bg-primary/10 text-primary border border-primary/20" : "text-muted-foreground hover:text-foreground hover:bg-muted/50 border border-transparent"
|
|
982
1090
|
),
|
|
983
1091
|
children: [
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ jsx4(Icon, { className: "w-3 h-3" }),
|
|
1093
|
+
/* @__PURE__ */ jsx4("span", { children: label })
|
|
986
1094
|
]
|
|
987
1095
|
}
|
|
988
1096
|
);
|
|
@@ -1003,8 +1111,8 @@ function OptionRow({
|
|
|
1003
1111
|
selected && "text-primary font-medium"
|
|
1004
1112
|
),
|
|
1005
1113
|
children: [
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
selected && /* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ jsx4("span", { className: "flex-1 text-left", children: label }),
|
|
1115
|
+
selected && /* @__PURE__ */ jsx4(CheckIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" })
|
|
1008
1116
|
]
|
|
1009
1117
|
}
|
|
1010
1118
|
);
|
|
@@ -1021,17 +1129,17 @@ function CheckRow({
|
|
|
1021
1129
|
onClick,
|
|
1022
1130
|
className: "flex items-center gap-2 w-full px-3 py-1.5 text-xs hover:bg-muted/50 active:bg-muted/70 transition-colors",
|
|
1023
1131
|
children: [
|
|
1024
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ jsx4(
|
|
1025
1133
|
"div",
|
|
1026
1134
|
{
|
|
1027
1135
|
className: cn(
|
|
1028
1136
|
"w-3.5 h-3.5 rounded-sm border flex items-center justify-center shrink-0 transition-colors",
|
|
1029
1137
|
checked ? "bg-primary border-primary" : "border-muted-foreground/30"
|
|
1030
1138
|
),
|
|
1031
|
-
children: checked && /* @__PURE__ */
|
|
1139
|
+
children: checked && /* @__PURE__ */ jsx4(CheckIcon, { className: "w-2.5 h-2.5 text-primary-foreground" })
|
|
1032
1140
|
}
|
|
1033
1141
|
),
|
|
1034
|
-
/* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ jsx4("span", { className: "flex-1 text-left truncate", children: label })
|
|
1035
1143
|
]
|
|
1036
1144
|
}
|
|
1037
1145
|
);
|
|
@@ -1041,22 +1149,22 @@ function SidePanelHeader({
|
|
|
1041
1149
|
onClose
|
|
1042
1150
|
}) {
|
|
1043
1151
|
return /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-3 py-2 border-b border-border shrink-0", children: [
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ jsx4("span", { className: "text-xs font-semibold text-foreground", children: title }),
|
|
1153
|
+
/* @__PURE__ */ jsx4(
|
|
1046
1154
|
"button",
|
|
1047
1155
|
{
|
|
1048
1156
|
type: "button",
|
|
1049
1157
|
onClick: onClose,
|
|
1050
1158
|
className: "w-5 h-5 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",
|
|
1051
1159
|
"aria-label": "Close",
|
|
1052
|
-
children: /* @__PURE__ */
|
|
1160
|
+
children: /* @__PURE__ */ jsx4(XIcon, { className: "w-3.5 h-3.5" })
|
|
1053
1161
|
}
|
|
1054
1162
|
)
|
|
1055
1163
|
] });
|
|
1056
1164
|
}
|
|
1057
1165
|
|
|
1058
1166
|
// catalog/react/AgentCategoriesPanel.tsx
|
|
1059
|
-
import { jsx as
|
|
1167
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1060
1168
|
function AgentCategoriesPanel({
|
|
1061
1169
|
consumer,
|
|
1062
1170
|
allCategories,
|
|
@@ -1068,8 +1176,8 @@ function AgentCategoriesPanel({
|
|
|
1068
1176
|
(c) => !search || c.toLowerCase().includes(search.toLowerCase())
|
|
1069
1177
|
);
|
|
1070
1178
|
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col h-full", children: [
|
|
1071
|
-
/* @__PURE__ */
|
|
1072
|
-
/* @__PURE__ */
|
|
1179
|
+
/* @__PURE__ */ jsx5(SidePanelHeader, { title: "Categories", onClose }),
|
|
1180
|
+
/* @__PURE__ */ jsx5("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ jsx5(
|
|
1073
1181
|
SearchInput,
|
|
1074
1182
|
{
|
|
1075
1183
|
value: search,
|
|
@@ -1090,7 +1198,7 @@ function AgentCategoriesPanel({
|
|
|
1090
1198
|
]
|
|
1091
1199
|
}
|
|
1092
1200
|
),
|
|
1093
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ jsx5("div", { className: "overflow-y-auto flex-1", children: filtered.length === 0 ? /* @__PURE__ */ jsx5("p", { className: "text-xs text-muted-foreground text-center py-6", children: "No categories" }) : filtered.map((cat) => /* @__PURE__ */ jsx5(
|
|
1094
1202
|
CheckRow,
|
|
1095
1203
|
{
|
|
1096
1204
|
label: cat,
|
|
@@ -1108,7 +1216,7 @@ import { cn as cn3 } from "@ai-matrx/design-system";
|
|
|
1108
1216
|
// catalog/react/FavoriteAgentButton.tsx
|
|
1109
1217
|
import { cn as cn2 } from "@ai-matrx/design-system";
|
|
1110
1218
|
import { useCallback as useCallback4 } from "react";
|
|
1111
|
-
import { jsx as
|
|
1219
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1112
1220
|
function FavoriteAgentButton({
|
|
1113
1221
|
id,
|
|
1114
1222
|
variant = "card",
|
|
@@ -1120,17 +1228,17 @@ function FavoriteAgentButton({
|
|
|
1120
1228
|
[id]
|
|
1121
1229
|
);
|
|
1122
1230
|
const record = useAgentCatalogState(select);
|
|
1123
|
-
const
|
|
1231
|
+
const isFavorite2 = record?.isFavorite ?? false;
|
|
1124
1232
|
const isOwner = record?.isOwner ?? true;
|
|
1125
1233
|
const handleClick = (e) => {
|
|
1126
1234
|
e.stopPropagation();
|
|
1127
1235
|
if (disabled || !isOwner) return;
|
|
1128
|
-
void catalog.setFavorite(id, !
|
|
1236
|
+
void catalog.setFavorite(id, !isFavorite2).catch(() => {
|
|
1129
1237
|
});
|
|
1130
1238
|
};
|
|
1131
|
-
const title = isOwner ?
|
|
1239
|
+
const title = isOwner ? isFavorite2 ? "Remove from favorites" : "Add to favorites" : "Shared \u2014 cannot favorite";
|
|
1132
1240
|
if (variant === "list") {
|
|
1133
|
-
return /* @__PURE__ */
|
|
1241
|
+
return /* @__PURE__ */ jsx6(
|
|
1134
1242
|
"button",
|
|
1135
1243
|
{
|
|
1136
1244
|
type: "button",
|
|
@@ -1142,21 +1250,21 @@ function FavoriteAgentButton({
|
|
|
1142
1250
|
onClick: handleClick,
|
|
1143
1251
|
disabled: disabled || !isOwner,
|
|
1144
1252
|
title,
|
|
1145
|
-
"aria-label":
|
|
1146
|
-
children: /* @__PURE__ */
|
|
1253
|
+
"aria-label": isFavorite2 ? "Remove from favorites" : "Add to favorites",
|
|
1254
|
+
children: /* @__PURE__ */ jsx6(
|
|
1147
1255
|
StarIcon,
|
|
1148
1256
|
{
|
|
1149
|
-
filled:
|
|
1257
|
+
filled: isFavorite2,
|
|
1150
1258
|
className: cn2(
|
|
1151
1259
|
"h-3.5 w-3.5 transition-all duration-150",
|
|
1152
|
-
|
|
1260
|
+
isFavorite2 ? "matrx-agent-star-on" : "text-muted-foreground/40 hover:matrx-agent-star-on"
|
|
1153
1261
|
)
|
|
1154
1262
|
}
|
|
1155
1263
|
)
|
|
1156
1264
|
}
|
|
1157
1265
|
);
|
|
1158
1266
|
}
|
|
1159
|
-
return /* @__PURE__ */
|
|
1267
|
+
return /* @__PURE__ */ jsx6(
|
|
1160
1268
|
"button",
|
|
1161
1269
|
{
|
|
1162
1270
|
type: "button",
|
|
@@ -1164,13 +1272,13 @@ function FavoriteAgentButton({
|
|
|
1164
1272
|
"absolute top-2.5 right-2.5 z-10 p-0.5 rounded transition-all duration-150",
|
|
1165
1273
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
1166
1274
|
disabled || !isOwner ? "cursor-not-allowed" : "hover:scale-110 cursor-pointer",
|
|
1167
|
-
|
|
1275
|
+
isFavorite2 ? "matrx-agent-star-on" : "text-muted-foreground/40 hover:matrx-agent-star-on"
|
|
1168
1276
|
),
|
|
1169
1277
|
onClick: handleClick,
|
|
1170
1278
|
disabled: disabled || !isOwner,
|
|
1171
1279
|
title,
|
|
1172
|
-
"aria-label":
|
|
1173
|
-
children: /* @__PURE__ */
|
|
1280
|
+
"aria-label": isFavorite2 ? "Remove from favorites" : "Add to favorites",
|
|
1281
|
+
children: /* @__PURE__ */ jsx6(StarIcon, { filled: isFavorite2, className: "w-4 h-4 transition-all duration-150" })
|
|
1174
1282
|
}
|
|
1175
1283
|
);
|
|
1176
1284
|
}
|
|
@@ -1203,7 +1311,7 @@ function orchestraDelegatesLine(badge, limit = 3) {
|
|
|
1203
1311
|
}
|
|
1204
1312
|
|
|
1205
1313
|
// catalog/react/AgentDetailCard.tsx
|
|
1206
|
-
import { Fragment, jsx as
|
|
1314
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1207
1315
|
function AgentDetailCard({ agent, onSelect }) {
|
|
1208
1316
|
const { LinkComponent, renderModelRef, openPeek } = useAgentCatalogUiPorts();
|
|
1209
1317
|
const updatedDate = agent.updatedAt ? new Date(agent.updatedAt) : null;
|
|
@@ -1218,23 +1326,23 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1218
1326
|
});
|
|
1219
1327
|
};
|
|
1220
1328
|
return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col h-full", children: [
|
|
1221
|
-
/* @__PURE__ */
|
|
1222
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ jsx7("div", { className: "px-4 pt-4 pb-3", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-start gap-3", children: [
|
|
1330
|
+
/* @__PURE__ */ jsx7("div", { className: "w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0" }),
|
|
1223
1331
|
/* @__PURE__ */ jsxs4("div", { className: "flex-1 min-w-0", children: [
|
|
1224
|
-
/* @__PURE__ */
|
|
1225
|
-
agent.isFavorite && /* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ jsx7("h3", { className: "text-sm font-semibold text-foreground leading-tight truncate", children: agent.name || "Untitled" }),
|
|
1333
|
+
agent.isFavorite && /* @__PURE__ */ jsx7("div", { className: "flex items-center gap-1 mt-0.5", children: /* @__PURE__ */ jsx7("span", { className: "text-[11px] matrx-agent-star-on", children: "Pinned to favorites" }) })
|
|
1226
1334
|
] }),
|
|
1227
|
-
!isDefaultRow && /* @__PURE__ */
|
|
1335
|
+
!isDefaultRow && /* @__PURE__ */ jsx7(FavoriteAgentButton, { id: agent.id, variant: "list" })
|
|
1228
1336
|
] }) }),
|
|
1229
|
-
/* @__PURE__ */
|
|
1337
|
+
/* @__PURE__ */ jsx7("div", { className: "h-px bg-border mx-3" }),
|
|
1230
1338
|
/* @__PURE__ */ jsxs4("div", { className: "flex-1 overflow-y-auto px-4 py-3 space-y-3", children: [
|
|
1231
1339
|
agent.orchestra && /* @__PURE__ */ jsxs4("div", { className: "rounded-md border border-primary/20 bg-primary/5 px-2.5 py-2", children: [
|
|
1232
1340
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1.5", children: [
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ jsx7(Music4Icon, { className: "w-3.5 h-3.5 text-primary shrink-0" }),
|
|
1342
|
+
/* @__PURE__ */ jsx7("span", { className: "text-[11px] font-medium text-primary", children: orchestraLabel(agent.orchestra) })
|
|
1235
1343
|
] }),
|
|
1236
|
-
agent.orchestra.tagline && /* @__PURE__ */
|
|
1237
|
-
orchestraDelegatesLine(agent.orchestra) && /* @__PURE__ */
|
|
1344
|
+
agent.orchestra.tagline && /* @__PURE__ */ jsx7("p", { className: "mt-1 text-xs text-foreground/80 leading-relaxed", children: agent.orchestra.tagline }),
|
|
1345
|
+
orchestraDelegatesLine(agent.orchestra) && /* @__PURE__ */ jsx7(
|
|
1238
1346
|
"p",
|
|
1239
1347
|
{
|
|
1240
1348
|
className: "mt-1 text-[11px] text-muted-foreground",
|
|
@@ -1242,22 +1350,22 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1242
1350
|
children: orchestraDelegatesLine(agent.orchestra)
|
|
1243
1351
|
}
|
|
1244
1352
|
),
|
|
1245
|
-
orchestraDepthLine(agent.orchestra) && /* @__PURE__ */
|
|
1353
|
+
orchestraDepthLine(agent.orchestra) && /* @__PURE__ */ jsx7("p", { className: "mt-0.5 text-[11px] text-muted-foreground", children: orchestraDepthLine(agent.orchestra) })
|
|
1246
1354
|
] }),
|
|
1247
1355
|
agent.description && /* @__PURE__ */ jsxs4("div", { children: [
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ jsx7("p", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Description" }),
|
|
1357
|
+
/* @__PURE__ */ jsx7("p", { className: "text-xs text-foreground/80 leading-relaxed", children: agent.description })
|
|
1250
1358
|
] }),
|
|
1251
1359
|
agent.category && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ jsx7(FolderIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
|
|
1361
|
+
/* @__PURE__ */ jsx7("span", { className: "text-xs text-foreground/80", children: agent.category })
|
|
1254
1362
|
] }),
|
|
1255
1363
|
agent.tags && agent.tags.length > 0 && /* @__PURE__ */ jsxs4("div", { children: [
|
|
1256
1364
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
1257
|
-
/* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ jsx7(TagIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
|
|
1366
|
+
/* @__PURE__ */ jsx7("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Tags" })
|
|
1259
1367
|
] }),
|
|
1260
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ jsx7("div", { className: "flex flex-wrap gap-1", children: agent.tags.map((tag) => /* @__PURE__ */ jsx7(
|
|
1261
1369
|
"span",
|
|
1262
1370
|
{
|
|
1263
1371
|
className: "inline-flex items-center h-5 px-1.5 rounded text-[10px] font-medium bg-muted text-muted-foreground",
|
|
@@ -1267,29 +1375,29 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1267
1375
|
)) })
|
|
1268
1376
|
] }),
|
|
1269
1377
|
agent.accessLevel && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
1270
|
-
agent.isOwner === false ? /* @__PURE__ */
|
|
1378
|
+
agent.isOwner === false ? /* @__PURE__ */ jsx7(UsersIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ jsx7(GlobeIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
|
|
1271
1379
|
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
|
|
1272
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ jsx7("span", { className: "text-xs text-foreground/80 capitalize", children: agent.accessLevel === "owner" ? "You own this" : `Shared \u2014 ${agent.accessLevel}` }),
|
|
1273
1381
|
agent.sharedByEmail && /* @__PURE__ */ jsxs4("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
1274
1382
|
"by ",
|
|
1275
1383
|
agent.sharedByEmail
|
|
1276
1384
|
] })
|
|
1277
1385
|
] })
|
|
1278
1386
|
] }),
|
|
1279
|
-
agent.modelId && /* @__PURE__ */
|
|
1387
|
+
agent.modelId && /* @__PURE__ */ jsx7("div", { className: "flex items-center gap-2", children: renderModelRef({
|
|
1280
1388
|
modelId: agent.modelId,
|
|
1281
1389
|
className: "max-w-full text-xs text-foreground/80"
|
|
1282
1390
|
}) }),
|
|
1283
1391
|
(updatedDate || createdDate) && /* @__PURE__ */ jsxs4("div", { className: "pt-1 space-y-1", children: [
|
|
1284
1392
|
updatedDate && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
1285
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ jsx7(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
|
|
1286
1394
|
/* @__PURE__ */ jsxs4("span", { className: "text-[11px] text-muted-foreground", children: [
|
|
1287
1395
|
"Updated ",
|
|
1288
1396
|
formatDate(updatedDate)
|
|
1289
1397
|
] })
|
|
1290
1398
|
] }),
|
|
1291
1399
|
createdDate && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
1292
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ jsx7(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground/50 shrink-0" }),
|
|
1293
1401
|
/* @__PURE__ */ jsxs4("span", { className: "text-[11px] text-muted-foreground/70", children: [
|
|
1294
1402
|
"Created ",
|
|
1295
1403
|
formatDate(createdDate)
|
|
@@ -1297,9 +1405,9 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1297
1405
|
] })
|
|
1298
1406
|
] })
|
|
1299
1407
|
] }),
|
|
1300
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ jsx7("div", { className: "h-px bg-border mx-3 mt-auto" }),
|
|
1301
1409
|
/* @__PURE__ */ jsxs4("div", { className: "px-3 py-2 shrink-0 flex items-center gap-1.5", children: [
|
|
1302
|
-
/* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ jsx7(
|
|
1303
1411
|
"button",
|
|
1304
1412
|
{
|
|
1305
1413
|
type: "button",
|
|
@@ -1308,7 +1416,7 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1308
1416
|
children: "Select"
|
|
1309
1417
|
}
|
|
1310
1418
|
),
|
|
1311
|
-
openPeek && /* @__PURE__ */
|
|
1419
|
+
openPeek && /* @__PURE__ */ jsx7(
|
|
1312
1420
|
"button",
|
|
1313
1421
|
{
|
|
1314
1422
|
type: "button",
|
|
@@ -1319,11 +1427,11 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1319
1427
|
title: "Sneak Peek",
|
|
1320
1428
|
"aria-label": "Sneak Peek",
|
|
1321
1429
|
className: iconButtonClass,
|
|
1322
|
-
children: /* @__PURE__ */
|
|
1430
|
+
children: /* @__PURE__ */ jsx7(RocketIcon, { className: "w-3.5 h-3.5" })
|
|
1323
1431
|
}
|
|
1324
1432
|
),
|
|
1325
|
-
!isDefaultRow && /* @__PURE__ */ jsxs4(
|
|
1326
|
-
/* @__PURE__ */
|
|
1433
|
+
!isDefaultRow && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
1434
|
+
/* @__PURE__ */ jsx7(
|
|
1327
1435
|
LinkComponent,
|
|
1328
1436
|
{
|
|
1329
1437
|
href: `/chat/a/${agent.id}`,
|
|
@@ -1331,10 +1439,10 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1331
1439
|
title: "Open in chat",
|
|
1332
1440
|
"aria-label": "Open in chat",
|
|
1333
1441
|
className: iconButtonClass,
|
|
1334
|
-
children: /* @__PURE__ */
|
|
1442
|
+
children: /* @__PURE__ */ jsx7(MessageCircleIcon, { className: "w-3.5 h-3.5" })
|
|
1335
1443
|
}
|
|
1336
1444
|
),
|
|
1337
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ jsx7(
|
|
1338
1446
|
LinkComponent,
|
|
1339
1447
|
{
|
|
1340
1448
|
href: `/agents/go/${agent.id}`,
|
|
@@ -1347,7 +1455,7 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1347
1455
|
iconButtonClass,
|
|
1348
1456
|
"hover:text-foreground"
|
|
1349
1457
|
),
|
|
1350
|
-
children: /* @__PURE__ */
|
|
1458
|
+
children: /* @__PURE__ */ jsx7(ExternalLinkIcon, { className: "w-3.5 h-3.5" })
|
|
1351
1459
|
}
|
|
1352
1460
|
)
|
|
1353
1461
|
] })
|
|
@@ -1364,7 +1472,7 @@ var PANEL_HEIGHT = "528px";
|
|
|
1364
1472
|
var LIST_MAX_HEIGHT = "min(528px, var(--radix-popper-available-height, 528px))";
|
|
1365
1473
|
|
|
1366
1474
|
// catalog/react/AgentFilterBar.tsx
|
|
1367
|
-
import { jsx as
|
|
1475
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1368
1476
|
function AgentFilterBar({
|
|
1369
1477
|
consumer,
|
|
1370
1478
|
allCategories,
|
|
@@ -1376,7 +1484,7 @@ function AgentFilterBar({
|
|
|
1376
1484
|
onReset
|
|
1377
1485
|
}) {
|
|
1378
1486
|
return /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-1 px-2 pb-1.5 overflow-x-auto matrx-agent-scrollbar-none shrink-0", children: [
|
|
1379
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ jsx8(
|
|
1380
1488
|
FilterChip,
|
|
1381
1489
|
{
|
|
1382
1490
|
icon: ArrowUpDownIcon,
|
|
@@ -1386,7 +1494,7 @@ function AgentFilterBar({
|
|
|
1386
1494
|
onClick: () => onFilterChipClick("sort")
|
|
1387
1495
|
}
|
|
1388
1496
|
),
|
|
1389
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ jsx8(
|
|
1390
1498
|
FilterChip,
|
|
1391
1499
|
{
|
|
1392
1500
|
icon: StarIcon,
|
|
@@ -1398,7 +1506,7 @@ function AgentFilterBar({
|
|
|
1398
1506
|
}
|
|
1399
1507
|
}
|
|
1400
1508
|
),
|
|
1401
|
-
allCategories.length > 0 && /* @__PURE__ */
|
|
1509
|
+
allCategories.length > 0 && /* @__PURE__ */ jsx8(
|
|
1402
1510
|
FilterChip,
|
|
1403
1511
|
{
|
|
1404
1512
|
icon: FolderIcon,
|
|
@@ -1408,7 +1516,7 @@ function AgentFilterBar({
|
|
|
1408
1516
|
onClick: () => onFilterChipClick("categories")
|
|
1409
1517
|
}
|
|
1410
1518
|
),
|
|
1411
|
-
allTags.length > 0 && /* @__PURE__ */
|
|
1519
|
+
allTags.length > 0 && /* @__PURE__ */ jsx8(
|
|
1412
1520
|
FilterChip,
|
|
1413
1521
|
{
|
|
1414
1522
|
icon: TagIcon,
|
|
@@ -1418,14 +1526,14 @@ function AgentFilterBar({
|
|
|
1418
1526
|
onClick: () => onFilterChipClick("tags")
|
|
1419
1527
|
}
|
|
1420
1528
|
),
|
|
1421
|
-
activeFilterCount > 0 && /* @__PURE__ */
|
|
1529
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx8(
|
|
1422
1530
|
"button",
|
|
1423
1531
|
{
|
|
1424
1532
|
type: "button",
|
|
1425
1533
|
onClick: onReset,
|
|
1426
1534
|
"aria-label": "Reset filters",
|
|
1427
1535
|
className: "flex items-center gap-0.5 h-6 px-1.5 rounded text-[11px] text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors shrink-0",
|
|
1428
|
-
children: /* @__PURE__ */
|
|
1536
|
+
children: /* @__PURE__ */ jsx8(RotateCcwIcon, { className: "w-3 h-3" })
|
|
1429
1537
|
}
|
|
1430
1538
|
)
|
|
1431
1539
|
] });
|
|
@@ -1433,7 +1541,7 @@ function AgentFilterBar({
|
|
|
1433
1541
|
|
|
1434
1542
|
// catalog/react/AgentListTabs.tsx
|
|
1435
1543
|
import { cn as cn4 } from "@ai-matrx/design-system";
|
|
1436
|
-
import { jsx as
|
|
1544
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1437
1545
|
function AgentListTabs({
|
|
1438
1546
|
consumer,
|
|
1439
1547
|
tabCounts,
|
|
@@ -1447,7 +1555,7 @@ function AgentListTabs({
|
|
|
1447
1555
|
{ value: "all", label: "All", countKey: "all" },
|
|
1448
1556
|
{ value: "system", label: labels.publicTab, countKey: "system" }
|
|
1449
1557
|
];
|
|
1450
|
-
return /* @__PURE__ */
|
|
1558
|
+
return /* @__PURE__ */ jsx9(
|
|
1451
1559
|
"div",
|
|
1452
1560
|
{
|
|
1453
1561
|
className: "flex items-center gap-0.5 px-2 pb-1 overflow-x-auto matrx-agent-scrollbar-none shrink-0",
|
|
@@ -1469,8 +1577,8 @@ function AgentListTabs({
|
|
|
1469
1577
|
active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"
|
|
1470
1578
|
),
|
|
1471
1579
|
children: [
|
|
1472
|
-
/* @__PURE__ */
|
|
1473
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ jsx9("span", { children: label }),
|
|
1581
|
+
/* @__PURE__ */ jsx9(
|
|
1474
1582
|
"span",
|
|
1475
1583
|
{
|
|
1476
1584
|
className: cn4("tabular-nums opacity-70", active && "opacity-90"),
|
|
@@ -1488,7 +1596,7 @@ function AgentListTabs({
|
|
|
1488
1596
|
|
|
1489
1597
|
// catalog/react/AgentRow.tsx
|
|
1490
1598
|
import { cn as cn5 } from "@ai-matrx/design-system";
|
|
1491
|
-
import { jsx as
|
|
1599
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1492
1600
|
function AgentRow({
|
|
1493
1601
|
agent,
|
|
1494
1602
|
isActive,
|
|
@@ -1506,6 +1614,7 @@ function AgentRow({
|
|
|
1506
1614
|
return /* @__PURE__ */ jsxs7(
|
|
1507
1615
|
"div",
|
|
1508
1616
|
{
|
|
1617
|
+
"data-testid": `agent-row-${agent.id}`,
|
|
1509
1618
|
className: cn5(
|
|
1510
1619
|
"flex items-center w-full text-left transition-colors group",
|
|
1511
1620
|
"hover:bg-muted/50 active:bg-muted/70",
|
|
@@ -1526,8 +1635,8 @@ function AgentRow({
|
|
|
1526
1635
|
},
|
|
1527
1636
|
className: "flex items-center gap-2 flex-1 min-w-0 px-3 py-2",
|
|
1528
1637
|
children: [
|
|
1529
|
-
agent.isFavorite && /* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */
|
|
1638
|
+
agent.isFavorite && /* @__PURE__ */ jsx10(StarIcon, { filled: true, className: "w-3 h-3 matrx-agent-star-on shrink-0" }),
|
|
1639
|
+
/* @__PURE__ */ jsx10(
|
|
1531
1640
|
"span",
|
|
1532
1641
|
{
|
|
1533
1642
|
className: cn5(
|
|
@@ -1543,16 +1652,16 @@ function AgentRow({
|
|
|
1543
1652
|
className: "flex shrink-0 items-center gap-0.5 rounded-sm bg-primary/10 px-1 py-px text-[9px] font-medium text-primary",
|
|
1544
1653
|
title: orchestraDelegatesLine(agent.orchestra) ?? orchestraLabel(agent.orchestra),
|
|
1545
1654
|
children: [
|
|
1546
|
-
/* @__PURE__ */
|
|
1655
|
+
/* @__PURE__ */ jsx10(Music4Icon, { className: "w-2.5 h-2.5" }),
|
|
1547
1656
|
agent.orchestra.memberCount
|
|
1548
1657
|
]
|
|
1549
1658
|
}
|
|
1550
1659
|
),
|
|
1551
|
-
agent.agentType === "builtin" ? /* @__PURE__ */
|
|
1660
|
+
agent.agentType === "builtin" ? /* @__PURE__ */ jsx10("span", { className: "text-[9px] font-medium text-primary bg-primary/10 px-1 py-px rounded shrink-0 ml-auto", children: labels.systemBadge }) : agent.isOwner === false ? /* @__PURE__ */ jsx10("span", { className: "text-[9px] text-muted-foreground bg-muted px-1 py-px rounded shrink-0 ml-auto", children: "shared" }) : null
|
|
1552
1661
|
]
|
|
1553
1662
|
}
|
|
1554
1663
|
),
|
|
1555
|
-
isMobile && /* @__PURE__ */
|
|
1664
|
+
isMobile && /* @__PURE__ */ jsx10(
|
|
1556
1665
|
"button",
|
|
1557
1666
|
{
|
|
1558
1667
|
type: "button",
|
|
@@ -1562,7 +1671,7 @@ function AgentRow({
|
|
|
1562
1671
|
onDetailPress();
|
|
1563
1672
|
},
|
|
1564
1673
|
className: "flex items-center justify-center w-10 h-full shrink-0 text-muted-foreground/40 active:text-muted-foreground",
|
|
1565
|
-
children: /* @__PURE__ */
|
|
1674
|
+
children: /* @__PURE__ */ jsx10(ChevronRightIcon, { className: "w-4 h-4" })
|
|
1566
1675
|
}
|
|
1567
1676
|
)
|
|
1568
1677
|
]
|
|
@@ -1571,7 +1680,7 @@ function AgentRow({
|
|
|
1571
1680
|
}
|
|
1572
1681
|
|
|
1573
1682
|
// catalog/react/AgentListContent.tsx
|
|
1574
|
-
import { Fragment as
|
|
1683
|
+
import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1575
1684
|
function AgentListContent({
|
|
1576
1685
|
agents,
|
|
1577
1686
|
isLoading,
|
|
@@ -1609,7 +1718,7 @@ function AgentListContent({
|
|
|
1609
1718
|
const emptyLabel = agentListEmptyLabel(consumer.tab, labels);
|
|
1610
1719
|
const defaultAgent = defaultRow?.row ?? null;
|
|
1611
1720
|
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col h-full", children: [
|
|
1612
|
-
/* @__PURE__ */
|
|
1721
|
+
/* @__PURE__ */ jsx11("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ jsx11(
|
|
1613
1722
|
SearchInput,
|
|
1614
1723
|
{
|
|
1615
1724
|
ref: inputRef,
|
|
@@ -1618,7 +1727,7 @@ function AgentListContent({
|
|
|
1618
1727
|
placeholder: labels.searchPlaceholder
|
|
1619
1728
|
}
|
|
1620
1729
|
) }),
|
|
1621
|
-
/* @__PURE__ */
|
|
1730
|
+
/* @__PURE__ */ jsx11(
|
|
1622
1731
|
AgentListTabs,
|
|
1623
1732
|
{
|
|
1624
1733
|
consumer,
|
|
@@ -1627,7 +1736,7 @@ function AgentListContent({
|
|
|
1627
1736
|
visibleTabs
|
|
1628
1737
|
}
|
|
1629
1738
|
),
|
|
1630
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ jsx11(
|
|
1631
1740
|
AgentFilterBar,
|
|
1632
1741
|
{
|
|
1633
1742
|
consumer,
|
|
@@ -1646,16 +1755,16 @@ function AgentListContent({
|
|
|
1646
1755
|
role: "status",
|
|
1647
1756
|
className: "matrx-agent-drift-banner mx-2 mb-1.5 flex items-start gap-2 rounded-md px-2 py-1.5 shrink-0",
|
|
1648
1757
|
children: [
|
|
1649
|
-
/* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ jsx11(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
|
|
1759
|
+
/* @__PURE__ */ jsx11("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.drift }),
|
|
1760
|
+
/* @__PURE__ */ jsx11(
|
|
1652
1761
|
"button",
|
|
1653
1762
|
{
|
|
1654
1763
|
type: "button",
|
|
1655
1764
|
"aria-label": "Dismiss",
|
|
1656
1765
|
onClick: () => catalog.dismissDefaultRowDrift(defaultRow.mandateKey),
|
|
1657
1766
|
className: "shrink-0 opacity-70 hover:opacity-100",
|
|
1658
|
-
children: /* @__PURE__ */
|
|
1767
|
+
children: /* @__PURE__ */ jsx11(XIcon, { className: "w-3 h-3" })
|
|
1659
1768
|
}
|
|
1660
1769
|
)
|
|
1661
1770
|
]
|
|
@@ -1667,19 +1776,19 @@ function AgentListContent({
|
|
|
1667
1776
|
role: "alert",
|
|
1668
1777
|
className: "matrx-agent-drift-banner mx-2 mb-1.5 flex items-start gap-2 rounded-md px-2 py-1.5 shrink-0",
|
|
1669
1778
|
children: [
|
|
1670
|
-
/* @__PURE__ */
|
|
1671
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ jsx11(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
|
|
1780
|
+
/* @__PURE__ */ jsx11("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.error })
|
|
1672
1781
|
]
|
|
1673
1782
|
}
|
|
1674
1783
|
),
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
/* @__PURE__ */
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
] }) : agents.length === 0 && !pinnedAgent && !defaultAgent ? /* @__PURE__ */
|
|
1680
|
-
defaultAgent && /* @__PURE__ */ jsxs8(
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1784
|
+
/* @__PURE__ */ jsx11("div", { className: "h-px bg-border shrink-0" }),
|
|
1785
|
+
/* @__PURE__ */ jsx11("div", { ref: listScrollRef, className: "overflow-y-auto flex-1 min-h-0", children: isLoading ? /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-center py-8 gap-2 text-muted-foreground", children: [
|
|
1786
|
+
/* @__PURE__ */ jsx11(LoaderIcon, { className: "w-4 h-4 matrx-agent-spin" }),
|
|
1787
|
+
/* @__PURE__ */ jsx11("span", { className: "text-xs", children: labels.loading })
|
|
1788
|
+
] }) : agents.length === 0 && !pinnedAgent && !defaultAgent ? /* @__PURE__ */ jsx11("div", { className: "flex flex-col items-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx11("span", { className: "text-xs", children: emptyLabel }) }) : /* @__PURE__ */ jsxs8("div", { className: "py-0.5", children: [
|
|
1789
|
+
defaultAgent && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
1790
|
+
/* @__PURE__ */ jsx11("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ jsx11("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: "Default" }) }),
|
|
1791
|
+
/* @__PURE__ */ jsx11(
|
|
1683
1792
|
AgentRow,
|
|
1684
1793
|
{
|
|
1685
1794
|
agent: defaultAgent,
|
|
@@ -1694,11 +1803,11 @@ function AgentListContent({
|
|
|
1694
1803
|
},
|
|
1695
1804
|
`default-${defaultAgent.id}`
|
|
1696
1805
|
),
|
|
1697
|
-
/* @__PURE__ */
|
|
1806
|
+
/* @__PURE__ */ jsx11("div", { className: "mx-2 my-0.5 h-px bg-border" })
|
|
1698
1807
|
] }),
|
|
1699
|
-
pinnedAgent && /* @__PURE__ */ jsxs8(
|
|
1700
|
-
/* @__PURE__ */
|
|
1701
|
-
/* @__PURE__ */
|
|
1808
|
+
pinnedAgent && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
1809
|
+
/* @__PURE__ */ jsx11("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ jsx11("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: labels.currentAgentHeading }) }),
|
|
1810
|
+
/* @__PURE__ */ jsx11(
|
|
1702
1811
|
AgentRow,
|
|
1703
1812
|
{
|
|
1704
1813
|
agent: pinnedAgent,
|
|
@@ -1713,9 +1822,9 @@ function AgentListContent({
|
|
|
1713
1822
|
},
|
|
1714
1823
|
`pinned-${pinnedAgent.id}`
|
|
1715
1824
|
),
|
|
1716
|
-
/* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ jsx11("div", { className: "mx-2 my-0.5 h-px bg-border" })
|
|
1717
1826
|
] }),
|
|
1718
|
-
agents.map((agent) => /* @__PURE__ */
|
|
1827
|
+
agents.map((agent) => /* @__PURE__ */ jsx11(
|
|
1719
1828
|
AgentRow,
|
|
1720
1829
|
{
|
|
1721
1830
|
agent,
|
|
@@ -1730,16 +1839,16 @@ function AgentListContent({
|
|
|
1730
1839
|
},
|
|
1731
1840
|
agent.id
|
|
1732
1841
|
)),
|
|
1733
|
-
agents.length === 0 && (pinnedAgent || defaultAgent) && /* @__PURE__ */
|
|
1842
|
+
agents.length === 0 && (pinnedAgent || defaultAgent) && /* @__PURE__ */ jsx11("div", { className: "flex flex-col items-center py-4 text-muted-foreground", children: /* @__PURE__ */ jsx11("span", { className: "text-xs", children: emptyLabel }) })
|
|
1734
1843
|
] }) }),
|
|
1735
|
-
/* @__PURE__ */
|
|
1844
|
+
/* @__PURE__ */ jsx11("div", { className: "h-px bg-border shrink-0" }),
|
|
1736
1845
|
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between px-2.5 py-1.5 shrink-0", children: [
|
|
1737
1846
|
/* @__PURE__ */ jsxs8("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: [
|
|
1738
1847
|
agents.length,
|
|
1739
1848
|
" agent",
|
|
1740
1849
|
agents.length !== 1 ? "s" : ""
|
|
1741
1850
|
] }),
|
|
1742
|
-
consumer.searchTerm && /* @__PURE__ */
|
|
1851
|
+
consumer.searchTerm && /* @__PURE__ */ jsx11(
|
|
1743
1852
|
"button",
|
|
1744
1853
|
{
|
|
1745
1854
|
type: "button",
|
|
@@ -1753,7 +1862,7 @@ function AgentListContent({
|
|
|
1753
1862
|
}
|
|
1754
1863
|
|
|
1755
1864
|
// catalog/react/AgentMobileSubView.tsx
|
|
1756
|
-
import { Fragment as
|
|
1865
|
+
import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1757
1866
|
function AgentMobileSubView({
|
|
1758
1867
|
view,
|
|
1759
1868
|
consumer,
|
|
@@ -1774,12 +1883,12 @@ function AgentMobileSubView({
|
|
|
1774
1883
|
onClick: onBack,
|
|
1775
1884
|
className: "flex items-center gap-1.5 px-3 py-2.5 text-sm font-medium text-primary hover:bg-muted/30 transition-colors border-b border-border shrink-0",
|
|
1776
1885
|
children: [
|
|
1777
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ jsx12(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
|
|
1778
1887
|
title
|
|
1779
1888
|
]
|
|
1780
1889
|
}
|
|
1781
1890
|
),
|
|
1782
|
-
view === "sort" && SORT_OPTIONS.map((opt) => /* @__PURE__ */
|
|
1891
|
+
view === "sort" && SORT_OPTIONS.map((opt) => /* @__PURE__ */ jsx12(
|
|
1783
1892
|
OptionRow,
|
|
1784
1893
|
{
|
|
1785
1894
|
label: opt.label,
|
|
@@ -1791,8 +1900,8 @@ function AgentMobileSubView({
|
|
|
1791
1900
|
},
|
|
1792
1901
|
opt.value
|
|
1793
1902
|
)),
|
|
1794
|
-
view === "categories" && /* @__PURE__ */ jsxs9(
|
|
1795
|
-
/* @__PURE__ */
|
|
1903
|
+
view === "categories" && /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
1904
|
+
/* @__PURE__ */ jsx12("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ jsx12(
|
|
1796
1905
|
SearchInput,
|
|
1797
1906
|
{
|
|
1798
1907
|
value: catSearch,
|
|
@@ -1813,9 +1922,9 @@ function AgentMobileSubView({
|
|
|
1813
1922
|
]
|
|
1814
1923
|
}
|
|
1815
1924
|
),
|
|
1816
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ jsx12("div", { className: "overflow-y-auto max-h-[300px]", children: allCategories.filter(
|
|
1817
1926
|
(c) => !catSearch || c.toLowerCase().includes(catSearch.toLowerCase())
|
|
1818
|
-
).map((cat) => /* @__PURE__ */
|
|
1927
|
+
).map((cat) => /* @__PURE__ */ jsx12(
|
|
1819
1928
|
CheckRow,
|
|
1820
1929
|
{
|
|
1821
1930
|
label: cat,
|
|
@@ -1825,8 +1934,8 @@ function AgentMobileSubView({
|
|
|
1825
1934
|
cat
|
|
1826
1935
|
)) })
|
|
1827
1936
|
] }),
|
|
1828
|
-
view === "tags" && /* @__PURE__ */ jsxs9(
|
|
1829
|
-
/* @__PURE__ */
|
|
1937
|
+
view === "tags" && /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
1938
|
+
/* @__PURE__ */ jsx12("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ jsx12(
|
|
1830
1939
|
SearchInput,
|
|
1831
1940
|
{
|
|
1832
1941
|
value: tagSearch,
|
|
@@ -1847,9 +1956,9 @@ function AgentMobileSubView({
|
|
|
1847
1956
|
]
|
|
1848
1957
|
}
|
|
1849
1958
|
),
|
|
1850
|
-
/* @__PURE__ */
|
|
1959
|
+
/* @__PURE__ */ jsx12("div", { className: "overflow-y-auto max-h-[300px]", children: allTags.filter(
|
|
1851
1960
|
(t) => !tagSearch || t.toLowerCase().includes(tagSearch.toLowerCase())
|
|
1852
|
-
).map((tag) => /* @__PURE__ */
|
|
1961
|
+
).map((tag) => /* @__PURE__ */ jsx12(
|
|
1853
1962
|
CheckRow,
|
|
1854
1963
|
{
|
|
1855
1964
|
label: tag,
|
|
@@ -1863,11 +1972,11 @@ function AgentMobileSubView({
|
|
|
1863
1972
|
}
|
|
1864
1973
|
|
|
1865
1974
|
// catalog/react/AgentSortPanel.tsx
|
|
1866
|
-
import { jsx as
|
|
1975
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1867
1976
|
function AgentSortPanel({ consumer, onClose }) {
|
|
1868
1977
|
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col h-full", children: [
|
|
1869
|
-
/* @__PURE__ */
|
|
1870
|
-
/* @__PURE__ */
|
|
1978
|
+
/* @__PURE__ */ jsx13(SidePanelHeader, { title: "Sort By", onClose }),
|
|
1979
|
+
/* @__PURE__ */ jsx13("div", { className: "overflow-y-auto flex-1", children: SORT_OPTIONS.map((opt) => /* @__PURE__ */ jsx13(
|
|
1871
1980
|
OptionRow,
|
|
1872
1981
|
{
|
|
1873
1982
|
label: opt.label,
|
|
@@ -1880,7 +1989,7 @@ function AgentSortPanel({ consumer, onClose }) {
|
|
|
1880
1989
|
}
|
|
1881
1990
|
|
|
1882
1991
|
// catalog/react/AgentTagsPanel.tsx
|
|
1883
|
-
import { jsx as
|
|
1992
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1884
1993
|
function AgentTagsPanel({
|
|
1885
1994
|
consumer,
|
|
1886
1995
|
allTags,
|
|
@@ -1892,8 +2001,8 @@ function AgentTagsPanel({
|
|
|
1892
2001
|
(t) => !search || t.toLowerCase().includes(search.toLowerCase())
|
|
1893
2002
|
);
|
|
1894
2003
|
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col h-full", children: [
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ jsx14(SidePanelHeader, { title: "Tags", onClose }),
|
|
2005
|
+
/* @__PURE__ */ jsx14("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ jsx14(
|
|
1897
2006
|
SearchInput,
|
|
1898
2007
|
{
|
|
1899
2008
|
value: search,
|
|
@@ -1914,7 +2023,7 @@ function AgentTagsPanel({
|
|
|
1914
2023
|
]
|
|
1915
2024
|
}
|
|
1916
2025
|
),
|
|
1917
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ jsx14("div", { className: "overflow-y-auto flex-1", children: filtered.length === 0 ? /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground text-center py-6", children: "No tags" }) : filtered.map((tag) => /* @__PURE__ */ jsx14(
|
|
1918
2027
|
CheckRow,
|
|
1919
2028
|
{
|
|
1920
2029
|
label: tag,
|
|
@@ -1927,7 +2036,7 @@ function AgentTagsPanel({
|
|
|
1927
2036
|
}
|
|
1928
2037
|
|
|
1929
2038
|
// catalog/react/AgentListDropdown.tsx
|
|
1930
|
-
import { jsx as
|
|
2039
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1931
2040
|
var CONSUMER_ID = "agent-list-dropdown";
|
|
1932
2041
|
function AgentListDropdown({
|
|
1933
2042
|
onSelect,
|
|
@@ -2041,7 +2150,7 @@ function AgentListDropdown({
|
|
|
2041
2150
|
const handleDetailPanelMouseLeave = useCallback5(() => {
|
|
2042
2151
|
coreDetailMouseLeave(() => setRightPanel(null));
|
|
2043
2152
|
}, [coreDetailMouseLeave]);
|
|
2044
|
-
const resolveAgentHref =
|
|
2153
|
+
const resolveAgentHref = useMemo4(() => {
|
|
2045
2154
|
if (resolveAgentHrefProp) return resolveAgentHrefProp;
|
|
2046
2155
|
if (!navigateTo) return void 0;
|
|
2047
2156
|
return (agent) => navigateTo.replace("{id}", agent.id);
|
|
@@ -2059,22 +2168,22 @@ function AgentListDropdown({
|
|
|
2059
2168
|
className
|
|
2060
2169
|
),
|
|
2061
2170
|
children: [
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
activeFilterCount > 0 && /* @__PURE__ */
|
|
2064
|
-
/* @__PURE__ */
|
|
2171
|
+
/* @__PURE__ */ jsx15("span", { className: "min-w-0 max-w-[200px] flex-1 truncate text-left", children: displayLabel }),
|
|
2172
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx15("span", { className: "flex items-center justify-center w-4 h-4 rounded-md bg-primary text-primary-foreground text-[10px]", children: activeFilterCount }),
|
|
2173
|
+
/* @__PURE__ */ jsx15(ChevronDownIcon, { className: "w-3 h-3 text-muted-foreground/60" })
|
|
2065
2174
|
]
|
|
2066
2175
|
}
|
|
2067
2176
|
);
|
|
2068
2177
|
const wrapTrigger = (Trigger) => {
|
|
2069
2178
|
if (!showAssignedTooltip) {
|
|
2070
|
-
return /* @__PURE__ */
|
|
2179
|
+
return /* @__PURE__ */ jsx15(Trigger, { asChild: true, children: triggerButton });
|
|
2071
2180
|
}
|
|
2072
2181
|
return /* @__PURE__ */ jsxs12(Tooltip, { ...open ? { open: false } : {}, children: [
|
|
2073
|
-
/* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2182
|
+
/* @__PURE__ */ jsx15(Trigger, { asChild: true, children: /* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: triggerButton }) }),
|
|
2183
|
+
/* @__PURE__ */ jsx15(TooltipContent, { side: "bottom", className: "max-w-xs", children: displayLabel })
|
|
2075
2184
|
] });
|
|
2076
2185
|
};
|
|
2077
|
-
const listPanel = /* @__PURE__ */
|
|
2186
|
+
const listPanel = /* @__PURE__ */ jsx15(
|
|
2078
2187
|
AgentListContent,
|
|
2079
2188
|
{
|
|
2080
2189
|
agents,
|
|
@@ -2109,8 +2218,8 @@ function AgentListDropdown({
|
|
|
2109
2218
|
return /* @__PURE__ */ jsxs12(Drawer, { open, onOpenChange: handleOpen, children: [
|
|
2110
2219
|
wrapTrigger(DrawerTrigger),
|
|
2111
2220
|
/* @__PURE__ */ jsxs12(DrawerContent, { className: "h-[85dvh]", children: [
|
|
2112
|
-
/* @__PURE__ */
|
|
2113
|
-
/* @__PURE__ */
|
|
2221
|
+
/* @__PURE__ */ jsx15(DrawerTitle, { className: "sr-only", children: "Select Agent" }),
|
|
2222
|
+
/* @__PURE__ */ jsx15("div", { className: "flex flex-col overflow-hidden flex-1 min-h-0", children: mobileDetailAgent ? /* @__PURE__ */ jsxs12("div", { className: "flex flex-col overflow-hidden", children: [
|
|
2114
2223
|
/* @__PURE__ */ jsxs12(
|
|
2115
2224
|
"button",
|
|
2116
2225
|
{
|
|
@@ -2118,19 +2227,19 @@ function AgentListDropdown({
|
|
|
2118
2227
|
onClick: () => setMobileDetailAgent(null),
|
|
2119
2228
|
className: "flex items-center gap-1.5 px-3 py-2.5 text-sm font-medium text-primary hover:bg-muted/30 transition-colors border-b border-border shrink-0",
|
|
2120
2229
|
children: [
|
|
2121
|
-
/* @__PURE__ */
|
|
2230
|
+
/* @__PURE__ */ jsx15(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
|
|
2122
2231
|
"Back"
|
|
2123
2232
|
]
|
|
2124
2233
|
}
|
|
2125
2234
|
),
|
|
2126
|
-
/* @__PURE__ */
|
|
2235
|
+
/* @__PURE__ */ jsx15("div", { className: "overflow-y-auto", children: /* @__PURE__ */ jsx15(
|
|
2127
2236
|
AgentDetailCard,
|
|
2128
2237
|
{
|
|
2129
2238
|
agent: mobileDetailAgent,
|
|
2130
2239
|
onSelect: () => handleSelectAgent(mobileDetailAgent)
|
|
2131
2240
|
}
|
|
2132
2241
|
) })
|
|
2133
|
-
] }) : mobileSubView ? /* @__PURE__ */
|
|
2242
|
+
] }) : mobileSubView ? /* @__PURE__ */ jsx15(
|
|
2134
2243
|
AgentMobileSubView,
|
|
2135
2244
|
{
|
|
2136
2245
|
view: mobileSubView,
|
|
@@ -2153,7 +2262,7 @@ function AgentListDropdown({
|
|
|
2153
2262
|
}
|
|
2154
2263
|
return /* @__PURE__ */ jsxs12(Popover, { open, onOpenChange: handleOpen, modal: false, children: [
|
|
2155
2264
|
wrapTrigger(PopoverTrigger),
|
|
2156
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx15(
|
|
2157
2266
|
PopoverContent,
|
|
2158
2267
|
{
|
|
2159
2268
|
...contentSide ? { side: contentSide } : {},
|
|
@@ -2165,7 +2274,7 @@ function AgentListDropdown({
|
|
|
2165
2274
|
className: "p-0 overflow-hidden w-[680px]",
|
|
2166
2275
|
style: { height: PANEL_HEIGHT, maxHeight: LIST_MAX_HEIGHT },
|
|
2167
2276
|
children: /* @__PURE__ */ jsxs12("div", { className: "flex h-full", children: [
|
|
2168
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ jsx15("div", { className: "flex flex-col min-w-0 w-[340px] shrink-0 border-r border-border", children: listPanel }),
|
|
2169
2278
|
/* @__PURE__ */ jsxs12(
|
|
2170
2279
|
"div",
|
|
2171
2280
|
{
|
|
@@ -2173,21 +2282,21 @@ function AgentListDropdown({
|
|
|
2173
2282
|
onMouseEnter: rightPanel === "detail" ? handleDetailPanelMouseEnter : void 0,
|
|
2174
2283
|
onMouseLeave: rightPanel === "detail" ? handleDetailPanelMouseLeave : void 0,
|
|
2175
2284
|
children: [
|
|
2176
|
-
rightPanel === "detail" && hoveredAgent && /* @__PURE__ */
|
|
2285
|
+
rightPanel === "detail" && hoveredAgent && /* @__PURE__ */ jsx15("div", { className: "h-full matrx-agent-fade-in", children: /* @__PURE__ */ jsx15(
|
|
2177
2286
|
AgentDetailCard,
|
|
2178
2287
|
{
|
|
2179
2288
|
agent: hoveredAgent,
|
|
2180
2289
|
onSelect: () => handleSelectAgent(hoveredAgent)
|
|
2181
2290
|
}
|
|
2182
2291
|
) }, hoveredAgent.id),
|
|
2183
|
-
rightPanel === "sort" && /* @__PURE__ */
|
|
2292
|
+
rightPanel === "sort" && /* @__PURE__ */ jsx15(
|
|
2184
2293
|
AgentSortPanel,
|
|
2185
2294
|
{
|
|
2186
2295
|
consumer,
|
|
2187
2296
|
onClose: () => setRightPanel(null)
|
|
2188
2297
|
}
|
|
2189
2298
|
),
|
|
2190
|
-
rightPanel === "categories" && /* @__PURE__ */
|
|
2299
|
+
rightPanel === "categories" && /* @__PURE__ */ jsx15(
|
|
2191
2300
|
AgentCategoriesPanel,
|
|
2192
2301
|
{
|
|
2193
2302
|
consumer,
|
|
@@ -2200,7 +2309,7 @@ function AgentListDropdown({
|
|
|
2200
2309
|
}
|
|
2201
2310
|
}
|
|
2202
2311
|
),
|
|
2203
|
-
rightPanel === "tags" && /* @__PURE__ */
|
|
2312
|
+
rightPanel === "tags" && /* @__PURE__ */ jsx15(
|
|
2204
2313
|
AgentTagsPanel,
|
|
2205
2314
|
{
|
|
2206
2315
|
consumer,
|
|
@@ -2214,8 +2323,8 @@ function AgentListDropdown({
|
|
|
2214
2323
|
}
|
|
2215
2324
|
),
|
|
2216
2325
|
!hasRightPanel && /* @__PURE__ */ jsxs12("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center", children: [
|
|
2217
|
-
/* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2326
|
+
/* @__PURE__ */ jsx15(MousePointerClickIcon, { className: "h-6 w-6 text-muted-foreground/40" }),
|
|
2327
|
+
/* @__PURE__ */ jsx15("p", { className: "text-xs text-muted-foreground/70 leading-relaxed", children: labels.hoverHint })
|
|
2219
2328
|
] })
|
|
2220
2329
|
]
|
|
2221
2330
|
}
|
|
@@ -2229,7 +2338,7 @@ function AgentListDropdown({
|
|
|
2229
2338
|
// catalog/react/AgentListInlinePicker.tsx
|
|
2230
2339
|
import { cn as cn7 } from "@ai-matrx/design-system";
|
|
2231
2340
|
import { useEffect as useEffect4, useRef as useRef5, useState as useState4 } from "react";
|
|
2232
|
-
import { jsx as
|
|
2341
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2233
2342
|
function AgentListInlinePicker({
|
|
2234
2343
|
consumerId,
|
|
2235
2344
|
onSelect,
|
|
@@ -2301,12 +2410,12 @@ function AgentListInlinePicker({
|
|
|
2301
2410
|
onClick: () => setMobileDetailAgent(null),
|
|
2302
2411
|
className: "flex shrink-0 items-center gap-1.5 border-b border-border px-3 py-2 text-sm font-medium text-primary transition-colors hover:bg-muted/30",
|
|
2303
2412
|
children: [
|
|
2304
|
-
/* @__PURE__ */
|
|
2413
|
+
/* @__PURE__ */ jsx16(ChevronRightIcon, { className: "h-4 w-4 rotate-180" }),
|
|
2305
2414
|
"Back"
|
|
2306
2415
|
]
|
|
2307
2416
|
}
|
|
2308
2417
|
),
|
|
2309
|
-
/* @__PURE__ */
|
|
2418
|
+
/* @__PURE__ */ jsx16("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx16(
|
|
2310
2419
|
AgentDetailCard,
|
|
2311
2420
|
{
|
|
2312
2421
|
agent: mobileDetailAgent,
|
|
@@ -2316,7 +2425,7 @@ function AgentListInlinePicker({
|
|
|
2316
2425
|
] });
|
|
2317
2426
|
}
|
|
2318
2427
|
if (mobileSubView) {
|
|
2319
|
-
return /* @__PURE__ */
|
|
2428
|
+
return /* @__PURE__ */ jsx16("div", { className: cn7("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ jsx16(
|
|
2320
2429
|
AgentMobileSubView,
|
|
2321
2430
|
{
|
|
2322
2431
|
view: mobileSubView,
|
|
@@ -2335,7 +2444,7 @@ function AgentListInlinePicker({
|
|
|
2335
2444
|
}
|
|
2336
2445
|
) });
|
|
2337
2446
|
}
|
|
2338
|
-
return /* @__PURE__ */
|
|
2447
|
+
return /* @__PURE__ */ jsx16("div", { className: cn7("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ jsx16(
|
|
2339
2448
|
AgentListContent,
|
|
2340
2449
|
{
|
|
2341
2450
|
agents,
|