@ai-matrx/agents 0.59.230 → 0.59.232
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 +25 -1
- package/dist/catalog/react/index.cjs +215 -64
- package/dist/catalog/react/index.d.cts +6 -2
- package/dist/catalog/react/index.d.ts +6 -2
- package/dist/catalog/react/index.js +246 -95
- package/dist/content-transfer/index.cjs +5 -654
- package/dist/content-transfer/index.js +15 -652
- package/dist/content-transfer/react/index.cjs +5 -654
- package/dist/content-transfer/react/index.js +15 -652
- package/dist/generated/provision-offers.cjs +3 -0
- package/dist/generated/provision-offers.d.cts +86 -1
- package/dist/generated/provision-offers.d.ts +86 -1
- package/dist/generated/provision-offers.js +3 -0
- package/dist/mandates/index.cjs +12 -797
- package/dist/mandates/index.d.cts +5 -740
- package/dist/mandates/index.d.ts +5 -740
- package/dist/mandates/index.js +17 -788
- package/package.json +5 -5
|
@@ -973,7 +973,7 @@ var selectStatus = (state) => state.status;
|
|
|
973
973
|
|
|
974
974
|
// catalog/react/AgentListDropdown.tsx
|
|
975
975
|
import {
|
|
976
|
-
cn as
|
|
976
|
+
cn as cn6,
|
|
977
977
|
Drawer,
|
|
978
978
|
DrawerContent,
|
|
979
979
|
DrawerTitle,
|
|
@@ -986,11 +986,11 @@ import {
|
|
|
986
986
|
TooltipTrigger,
|
|
987
987
|
useIsMobile as useIsMobile2
|
|
988
988
|
} from "@ai-matrx/design-system";
|
|
989
|
-
import { useMemo as useMemo5, useRef as useRef5, useState as
|
|
989
|
+
import { useMemo as useMemo5, useRef as useRef5, useState as useState5 } from "react";
|
|
990
990
|
|
|
991
991
|
// catalog/react/AgentListPanel.tsx
|
|
992
|
-
import { cn as
|
|
993
|
-
import { useCallback as useCallback5, useEffect as useEffect5, useMemo as useMemo4, useRef as useRef4, useState as
|
|
992
|
+
import { cn as cn5, useIsMobile } from "@ai-matrx/design-system";
|
|
993
|
+
import { useCallback as useCallback5, useEffect as useEffect5, useMemo as useMemo4, useRef as useRef4, useState as useState4 } from "react";
|
|
994
994
|
|
|
995
995
|
// catalog/react/primitives.tsx
|
|
996
996
|
import { cn } from "@ai-matrx/design-system";
|
|
@@ -1000,7 +1000,9 @@ var SearchInput = ({
|
|
|
1000
1000
|
ref,
|
|
1001
1001
|
value,
|
|
1002
1002
|
onChange,
|
|
1003
|
-
placeholder
|
|
1003
|
+
placeholder,
|
|
1004
|
+
onKeyDown,
|
|
1005
|
+
inputProps
|
|
1004
1006
|
}) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 h-7 px-2 rounded-md bg-muted/40 border border-border/50", children: [
|
|
1005
1007
|
/* @__PURE__ */ jsx3(SearchIcon, { className: "w-3 h-3 text-muted-foreground shrink-0" }),
|
|
1006
1008
|
/* @__PURE__ */ jsx3(
|
|
@@ -1010,6 +1012,8 @@ var SearchInput = ({
|
|
|
1010
1012
|
type: "text",
|
|
1011
1013
|
value,
|
|
1012
1014
|
onChange: (e) => onChange(e.target.value),
|
|
1015
|
+
onKeyDown,
|
|
1016
|
+
...inputProps,
|
|
1013
1017
|
placeholder,
|
|
1014
1018
|
className: "flex-1 bg-transparent text-xs text-foreground placeholder:text-muted-foreground/50 outline-none min-w-0",
|
|
1015
1019
|
style: { fontSize: "16px" }
|
|
@@ -1464,8 +1468,9 @@ function AgentDetailCard({ agent, onSelect, duplicate, onHoldChange }) {
|
|
|
1464
1468
|
}
|
|
1465
1469
|
|
|
1466
1470
|
// catalog/react/AgentListContent.tsx
|
|
1467
|
-
import { ErrorBox } from "@ai-matrx/design-system";
|
|
1468
|
-
import {
|
|
1471
|
+
import { cn as cn4, ErrorBox } from "@ai-matrx/design-system";
|
|
1472
|
+
import { computeWindow } from "@ai-matrx/design-system/data-table/virtual-window";
|
|
1473
|
+
import { useEffect as useEffect4, useId, useLayoutEffect, useRef as useRef3, useState as useState3 } from "react";
|
|
1469
1474
|
|
|
1470
1475
|
// catalog/react/AgentFilterBar.tsx
|
|
1471
1476
|
import { ArchiveIcon, StarIcon } from "@ai-matrx/design-system/icons";
|
|
@@ -1735,6 +1740,10 @@ function AgentRow({
|
|
|
1735
1740
|
// catalog/react/AgentListContent.tsx
|
|
1736
1741
|
import { XIcon as XIcon2 } from "@ai-matrx/design-system/icons";
|
|
1737
1742
|
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1743
|
+
var AGENT_ROW_HEIGHT = 36;
|
|
1744
|
+
var UNMEASURED_VIEWPORT = 480;
|
|
1745
|
+
var ROW_OVERSCAN = 8;
|
|
1746
|
+
var WINDOW_ABOVE = 50;
|
|
1738
1747
|
function AgentListContent({
|
|
1739
1748
|
agents,
|
|
1740
1749
|
isLoading,
|
|
@@ -1766,11 +1775,104 @@ function AgentListContent({
|
|
|
1766
1775
|
}) {
|
|
1767
1776
|
const catalog = useAgentCatalog();
|
|
1768
1777
|
const listScrollRef = useRef3(null);
|
|
1778
|
+
const windowRef = useRef3(null);
|
|
1779
|
+
const listboxId = useId();
|
|
1780
|
+
const [scrollTop, setScrollTop] = useState3(0);
|
|
1781
|
+
const [viewport, setViewport] = useState3(0);
|
|
1782
|
+
const [listStart, setListStart] = useState3(0);
|
|
1783
|
+
const [activeIndex, setActiveIndex] = useState3(-1);
|
|
1784
|
+
const [resetKey, setResetKey] = useState3(
|
|
1785
|
+
`${consumer.tab}\0${consumer.searchTerm}`
|
|
1786
|
+
);
|
|
1787
|
+
const nextResetKey = `${consumer.tab}\0${consumer.searchTerm}`;
|
|
1788
|
+
if (nextResetKey !== resetKey) {
|
|
1789
|
+
setResetKey(nextResetKey);
|
|
1790
|
+
setActiveIndex(-1);
|
|
1791
|
+
}
|
|
1792
|
+
const defaultAgentId = defaultRow?.row?.id ?? null;
|
|
1793
|
+
useLayoutEffect(() => {
|
|
1794
|
+
const scroller = listScrollRef.current;
|
|
1795
|
+
if (!scroller) return void 0;
|
|
1796
|
+
const measure = () => {
|
|
1797
|
+
setViewport(scroller.clientHeight);
|
|
1798
|
+
setListStart(windowRef.current?.offsetTop ?? 0);
|
|
1799
|
+
};
|
|
1800
|
+
measure();
|
|
1801
|
+
if (typeof ResizeObserver === "undefined") return void 0;
|
|
1802
|
+
const observer = new ResizeObserver(measure);
|
|
1803
|
+
observer.observe(scroller);
|
|
1804
|
+
return () => observer.disconnect();
|
|
1805
|
+
}, [isLoading, pinnedAgent?.id, defaultAgentId, agents.length === 0]);
|
|
1769
1806
|
useEffect4(() => {
|
|
1770
|
-
|
|
1771
|
-
|
|
1807
|
+
const scroller = listScrollRef.current;
|
|
1808
|
+
if (!listOpen || !scroller) return;
|
|
1809
|
+
if (pinnedAgent) {
|
|
1810
|
+
scroller.scrollTo({ top: 0 });
|
|
1811
|
+
return;
|
|
1772
1812
|
}
|
|
1773
|
-
|
|
1813
|
+
const index = activeAgentId ? agents.findIndex((a) => a.id === activeAgentId) : -1;
|
|
1814
|
+
if (index < 0) return;
|
|
1815
|
+
const view = scroller.clientHeight || UNMEASURED_VIEWPORT;
|
|
1816
|
+
const top = Math.max(
|
|
1817
|
+
0,
|
|
1818
|
+
(windowRef.current?.offsetTop ?? 0) + index * AGENT_ROW_HEIGHT - (view - AGENT_ROW_HEIGHT) / 2
|
|
1819
|
+
);
|
|
1820
|
+
scroller.scrollTo({ top });
|
|
1821
|
+
setScrollTop(top);
|
|
1822
|
+
}, [listOpen, pinnedAgent?.id, activeAgentId, isLoading]);
|
|
1823
|
+
const win = agents.length <= WINDOW_ABOVE ? { start: 0, end: agents.length, padStart: 0, padEnd: 0 } : computeWindow({
|
|
1824
|
+
count: agents.length,
|
|
1825
|
+
itemSize: AGENT_ROW_HEIGHT,
|
|
1826
|
+
viewport: viewport > 0 ? viewport : UNMEASURED_VIEWPORT,
|
|
1827
|
+
offset: Math.max(0, scrollTop - listStart),
|
|
1828
|
+
overscan: ROW_OVERSCAN
|
|
1829
|
+
});
|
|
1830
|
+
const visibleAgents = agents.slice(win.start, win.end);
|
|
1831
|
+
const optionId = (index) => `${listboxId}-option-${index}`;
|
|
1832
|
+
const revealIndex = (index) => {
|
|
1833
|
+
const scroller = listScrollRef.current;
|
|
1834
|
+
if (!scroller) return;
|
|
1835
|
+
const view = scroller.clientHeight || UNMEASURED_VIEWPORT;
|
|
1836
|
+
const top = listStart + index * AGENT_ROW_HEIGHT;
|
|
1837
|
+
const bottom = top + AGENT_ROW_HEIGHT;
|
|
1838
|
+
let next = null;
|
|
1839
|
+
if (top < scroller.scrollTop) next = top;
|
|
1840
|
+
else if (bottom > scroller.scrollTop + view) next = bottom - view;
|
|
1841
|
+
if (next === null) return;
|
|
1842
|
+
scroller.scrollTop = next;
|
|
1843
|
+
setScrollTop(next);
|
|
1844
|
+
};
|
|
1845
|
+
const handleListKeyDown = (event) => {
|
|
1846
|
+
if (agents.length === 0) return;
|
|
1847
|
+
const last = agents.length - 1;
|
|
1848
|
+
let next = null;
|
|
1849
|
+
switch (event.key) {
|
|
1850
|
+
case "ArrowDown":
|
|
1851
|
+
next = activeIndex < 0 ? 0 : Math.min(last, activeIndex + 1);
|
|
1852
|
+
break;
|
|
1853
|
+
case "ArrowUp":
|
|
1854
|
+
next = activeIndex <= 0 ? 0 : activeIndex - 1;
|
|
1855
|
+
break;
|
|
1856
|
+
case "PageDown":
|
|
1857
|
+
next = Math.min(last, Math.max(0, activeIndex) + 10);
|
|
1858
|
+
break;
|
|
1859
|
+
case "PageUp":
|
|
1860
|
+
next = Math.max(0, activeIndex - 10);
|
|
1861
|
+
break;
|
|
1862
|
+
case "Enter": {
|
|
1863
|
+
const agent = activeIndex >= 0 ? agents[activeIndex] : void 0;
|
|
1864
|
+
if (!agent) return;
|
|
1865
|
+
event.preventDefault();
|
|
1866
|
+
onSelectAgent(agent);
|
|
1867
|
+
return;
|
|
1868
|
+
}
|
|
1869
|
+
default:
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1872
|
+
event.preventDefault();
|
|
1873
|
+
setActiveIndex(next);
|
|
1874
|
+
revealIndex(next);
|
|
1875
|
+
};
|
|
1774
1876
|
const { labels } = catalog;
|
|
1775
1877
|
const emptyLabel = catalog.getUserIdOrNull() === null ? labels.emptySignedOut : agentListEmptyLabel(consumer.tab, labels);
|
|
1776
1878
|
const defaultAgent = defaultRow?.row ?? null;
|
|
@@ -1781,7 +1883,15 @@ function AgentListContent({
|
|
|
1781
1883
|
ref: inputRef,
|
|
1782
1884
|
value: consumer.searchTerm,
|
|
1783
1885
|
onChange: consumer.setSearchTerm,
|
|
1784
|
-
placeholder: labels.searchPlaceholder
|
|
1886
|
+
placeholder: labels.searchPlaceholder,
|
|
1887
|
+
onKeyDown: handleListKeyDown,
|
|
1888
|
+
inputProps: {
|
|
1889
|
+
role: "combobox",
|
|
1890
|
+
"aria-controls": listboxId,
|
|
1891
|
+
"aria-expanded": true,
|
|
1892
|
+
"aria-autocomplete": "list",
|
|
1893
|
+
...activeIndex >= 0 && activeIndex < agents.length ? { "aria-activedescendant": optionId(activeIndex) } : {}
|
|
1894
|
+
}
|
|
1785
1895
|
}
|
|
1786
1896
|
) }),
|
|
1787
1897
|
/* @__PURE__ */ jsx10(
|
|
@@ -1870,65 +1980,106 @@ function AgentListContent({
|
|
|
1870
1980
|
}
|
|
1871
1981
|
),
|
|
1872
1982
|
/* @__PURE__ */ jsx10("div", { className: "h-px bg-border shrink-0" }),
|
|
1873
|
-
/* @__PURE__ */ jsx10(
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
{
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1983
|
+
/* @__PURE__ */ jsx10(
|
|
1984
|
+
"div",
|
|
1985
|
+
{
|
|
1986
|
+
ref: listScrollRef,
|
|
1987
|
+
"data-agent-list-scroll": "",
|
|
1988
|
+
onScroll: (e) => setScrollTop(e.currentTarget.scrollTop),
|
|
1989
|
+
className: "relative overflow-y-auto flex-1 min-h-0",
|
|
1990
|
+
children: isLoading ? /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-center py-8 gap-2 text-muted-foreground", children: [
|
|
1991
|
+
/* @__PURE__ */ jsx10(LoaderIcon, { className: "w-4 h-4 matrx-agent-spin" }),
|
|
1992
|
+
/* @__PURE__ */ jsx10("span", { className: "text-xs", children: labels.loading })
|
|
1993
|
+
] }) : agents.length === 0 && !pinnedAgent && !defaultAgent ? /* @__PURE__ */ jsx10("div", { className: "flex flex-col items-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx10("span", { className: "text-xs", children: emptyLabel }) }) : /* @__PURE__ */ jsxs7("div", { className: "py-0.5", children: [
|
|
1994
|
+
defaultAgent && /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
1995
|
+
/* @__PURE__ */ jsx10("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ jsx10("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: "Default" }) }),
|
|
1996
|
+
/* @__PURE__ */ jsx10(
|
|
1997
|
+
AgentRow,
|
|
1998
|
+
{
|
|
1999
|
+
agent: defaultAgent,
|
|
2000
|
+
isActive: defaultAgent.id === activeAgentId,
|
|
2001
|
+
isHovered: hoveredAgent?.id === defaultAgent.id,
|
|
2002
|
+
isMobile,
|
|
2003
|
+
onClick: () => onSelectAgent(defaultAgent),
|
|
2004
|
+
href: resolveAgentHref?.(defaultAgent),
|
|
2005
|
+
onHover: () => onAgentHover(defaultAgent),
|
|
2006
|
+
onHoverEnd: () => onAgentHoverEnd(defaultAgent),
|
|
2007
|
+
onDetailPress: () => onDetailPress(defaultAgent)
|
|
2008
|
+
},
|
|
2009
|
+
`default-${defaultAgent.id}`
|
|
2010
|
+
),
|
|
2011
|
+
/* @__PURE__ */ jsx10("div", { className: "mx-2 my-0.5 h-px bg-border" })
|
|
2012
|
+
] }),
|
|
2013
|
+
pinnedAgent && /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
2014
|
+
/* @__PURE__ */ jsx10("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ jsx10("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: labels.currentAgentHeading }) }),
|
|
2015
|
+
/* @__PURE__ */ jsx10(
|
|
2016
|
+
AgentRow,
|
|
2017
|
+
{
|
|
2018
|
+
agent: pinnedAgent,
|
|
2019
|
+
isActive: true,
|
|
2020
|
+
isHovered: hoveredAgent?.id === pinnedAgent.id,
|
|
2021
|
+
isMobile,
|
|
2022
|
+
onClick: () => onSelectAgent(pinnedAgent),
|
|
2023
|
+
href: resolveAgentHref?.(pinnedAgent),
|
|
2024
|
+
onHover: () => onAgentHover(pinnedAgent),
|
|
2025
|
+
onHoverEnd: () => onAgentHoverEnd(pinnedAgent),
|
|
2026
|
+
onDetailPress: () => onDetailPress(pinnedAgent)
|
|
2027
|
+
},
|
|
2028
|
+
`pinned-${pinnedAgent.id}`
|
|
2029
|
+
),
|
|
2030
|
+
/* @__PURE__ */ jsx10("div", { className: "mx-2 my-0.5 h-px bg-border" })
|
|
2031
|
+
] }),
|
|
2032
|
+
/* @__PURE__ */ jsxs7(
|
|
2033
|
+
"div",
|
|
2034
|
+
{
|
|
2035
|
+
ref: windowRef,
|
|
2036
|
+
id: listboxId,
|
|
2037
|
+
role: "listbox",
|
|
2038
|
+
"aria-label": labels.searchPlaceholder,
|
|
2039
|
+
children: [
|
|
2040
|
+
win.padStart > 0 && /* @__PURE__ */ jsx10("div", { "aria-hidden": true, style: { height: win.padStart } }),
|
|
2041
|
+
visibleAgents.map((agent, offset) => {
|
|
2042
|
+
const index = win.start + offset;
|
|
2043
|
+
return /* @__PURE__ */ jsx10(
|
|
2044
|
+
"div",
|
|
2045
|
+
{
|
|
2046
|
+
id: optionId(index),
|
|
2047
|
+
role: "option",
|
|
2048
|
+
"aria-selected": agent.id === activeAgentId,
|
|
2049
|
+
"aria-posinset": index + 1,
|
|
2050
|
+
"aria-setsize": agents.length,
|
|
2051
|
+
"data-agent-index": index,
|
|
2052
|
+
style: { height: AGENT_ROW_HEIGHT },
|
|
2053
|
+
className: cn4(
|
|
2054
|
+
"flex overflow-hidden",
|
|
2055
|
+
index === activeIndex && "bg-muted/60"
|
|
2056
|
+
),
|
|
2057
|
+
children: /* @__PURE__ */ jsx10(
|
|
2058
|
+
AgentRow,
|
|
2059
|
+
{
|
|
2060
|
+
agent,
|
|
2061
|
+
isActive: agent.id === activeAgentId,
|
|
2062
|
+
isHovered: hoveredAgent?.id === agent.id,
|
|
2063
|
+
isMobile,
|
|
2064
|
+
onClick: () => onSelectAgent(agent),
|
|
2065
|
+
href: resolveAgentHref?.(agent),
|
|
2066
|
+
onHover: () => onAgentHover(agent),
|
|
2067
|
+
onHoverEnd: () => onAgentHoverEnd(agent),
|
|
2068
|
+
onDetailPress: () => onDetailPress(agent)
|
|
2069
|
+
}
|
|
2070
|
+
)
|
|
2071
|
+
},
|
|
2072
|
+
agent.id
|
|
2073
|
+
);
|
|
2074
|
+
}),
|
|
2075
|
+
win.padEnd > 0 && /* @__PURE__ */ jsx10("div", { "aria-hidden": true, style: { height: win.padEnd } })
|
|
2076
|
+
]
|
|
2077
|
+
}
|
|
2078
|
+
),
|
|
2079
|
+
agents.length === 0 && (pinnedAgent || defaultAgent) && /* @__PURE__ */ jsx10("div", { className: "flex flex-col items-center py-4 text-muted-foreground", children: /* @__PURE__ */ jsx10("span", { className: "text-xs", children: emptyLabel }) })
|
|
2080
|
+
] })
|
|
2081
|
+
}
|
|
2082
|
+
),
|
|
1932
2083
|
/* @__PURE__ */ jsx10("div", { className: "h-px bg-border shrink-0" }),
|
|
1933
2084
|
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between px-2.5 py-1.5 shrink-0", children: [
|
|
1934
2085
|
/* @__PURE__ */ jsx10(
|
|
@@ -2148,11 +2299,11 @@ function AgentListPanelBody({
|
|
|
2148
2299
|
}) {
|
|
2149
2300
|
const isMobile = useIsMobile();
|
|
2150
2301
|
const { labels } = useAgentCatalog();
|
|
2151
|
-
const [rightPanel, setRightPanel] =
|
|
2152
|
-
const [catSearch, setCatSearch] =
|
|
2153
|
-
const [tagSearch, setTagSearch] =
|
|
2154
|
-
const [mobileDetailAgent, setMobileDetailAgent] =
|
|
2155
|
-
const [mobileSubView, setMobileSubView] =
|
|
2302
|
+
const [rightPanel, setRightPanel] = useState4(null);
|
|
2303
|
+
const [catSearch, setCatSearch] = useState4("");
|
|
2304
|
+
const [tagSearch, setTagSearch] = useState4("");
|
|
2305
|
+
const [mobileDetailAgent, setMobileDetailAgent] = useState4(null);
|
|
2306
|
+
const [mobileSubView, setMobileSubView] = useState4(null);
|
|
2156
2307
|
const inputRef = useRef4(null);
|
|
2157
2308
|
const {
|
|
2158
2309
|
agents,
|
|
@@ -2274,7 +2425,7 @@ function AgentListPanelBody({
|
|
|
2274
2425
|
}
|
|
2275
2426
|
);
|
|
2276
2427
|
if (isMobile) {
|
|
2277
|
-
return /* @__PURE__ */ jsx14("div", { className:
|
|
2428
|
+
return /* @__PURE__ */ jsx14("div", { className: cn5("flex min-h-0 flex-1 flex-col overflow-hidden", className), children: mobileDetailAgent ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-col overflow-hidden", children: [
|
|
2278
2429
|
/* @__PURE__ */ jsxs11(
|
|
2279
2430
|
"button",
|
|
2280
2431
|
{
|
|
@@ -2313,7 +2464,7 @@ function AgentListPanelBody({
|
|
|
2313
2464
|
}
|
|
2314
2465
|
) : listPanel });
|
|
2315
2466
|
}
|
|
2316
|
-
return /* @__PURE__ */ jsxs11("div", { className:
|
|
2467
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn5("flex h-full", className), children: [
|
|
2317
2468
|
/* @__PURE__ */ jsx14("div", { className: "flex flex-col min-w-[340px] flex-1 border-r border-border", children: listPanel }),
|
|
2318
2469
|
/* @__PURE__ */ jsxs11(
|
|
2319
2470
|
"div",
|
|
@@ -2414,7 +2565,7 @@ function AgentListPanel({
|
|
|
2414
2565
|
return /* @__PURE__ */ jsx14(
|
|
2415
2566
|
"div",
|
|
2416
2567
|
{
|
|
2417
|
-
className:
|
|
2568
|
+
className: cn5("flex min-h-0 flex-col overflow-hidden", (isMobile || fill) && "h-full w-full", className),
|
|
2418
2569
|
style: isMobile || fill ? void 0 : { width: PANEL_WIDTH, height: PANEL_HEIGHT },
|
|
2419
2570
|
children: /* @__PURE__ */ jsx14(
|
|
2420
2571
|
AgentListPanelBody,
|
|
@@ -2460,10 +2611,10 @@ function AgentListDropdown({
|
|
|
2460
2611
|
const isMobile = useIsMobile2();
|
|
2461
2612
|
const { labels } = useAgentCatalog();
|
|
2462
2613
|
const { popoverContainer } = useAgentCatalogUiPorts();
|
|
2463
|
-
const [open, setOpen] =
|
|
2614
|
+
const [open, setOpen] = useState5(false);
|
|
2464
2615
|
const triggerRef = useRef5(null);
|
|
2465
|
-
const [fitHeight, setFitHeight] =
|
|
2466
|
-
const [openSide, setOpenSide] =
|
|
2616
|
+
const [fitHeight, setFitHeight] = useState5(null);
|
|
2617
|
+
const [openSide, setOpenSide] = useState5(contentSide);
|
|
2467
2618
|
const core = useAgentListCore({
|
|
2468
2619
|
consumerId,
|
|
2469
2620
|
...onSelect ? { onSelect } : {},
|
|
@@ -2504,7 +2655,7 @@ function AgentListDropdown({
|
|
|
2504
2655
|
"button",
|
|
2505
2656
|
{
|
|
2506
2657
|
type: "button",
|
|
2507
|
-
className:
|
|
2658
|
+
className: cn6(
|
|
2508
2659
|
"inline-flex items-center rounded-md text-xs font-medium transition-colors",
|
|
2509
2660
|
"bg-background hover:bg-muted/50 text-foreground/80 hover:text-foreground",
|
|
2510
2661
|
compact ? "h-5 gap-1 px-1.5" : "h-7 gap-1.5 px-2.5",
|
|
@@ -2568,8 +2719,8 @@ function AgentListDropdown({
|
|
|
2568
2719
|
}
|
|
2569
2720
|
|
|
2570
2721
|
// catalog/react/AgentListInlinePicker.tsx
|
|
2571
|
-
import { cn as
|
|
2572
|
-
import { useEffect as useEffect6, useRef as useRef6, useState as
|
|
2722
|
+
import { cn as cn7 } from "@ai-matrx/design-system";
|
|
2723
|
+
import { useEffect as useEffect6, useRef as useRef6, useState as useState6 } from "react";
|
|
2573
2724
|
import { ChevronRightIcon as ChevronRightIcon4 } from "@ai-matrx/design-system/icons";
|
|
2574
2725
|
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2575
2726
|
function AgentListInlinePicker({
|
|
@@ -2590,10 +2741,10 @@ function AgentListInlinePicker({
|
|
|
2590
2741
|
includeQuickAgents
|
|
2591
2742
|
}) {
|
|
2592
2743
|
const inputRef = useRef6(null);
|
|
2593
|
-
const [catSearch, setCatSearch] =
|
|
2594
|
-
const [tagSearch, setTagSearch] =
|
|
2595
|
-
const [mobileDetailAgent, setMobileDetailAgent] =
|
|
2596
|
-
const [mobileSubView, setMobileSubView] =
|
|
2744
|
+
const [catSearch, setCatSearch] = useState6("");
|
|
2745
|
+
const [tagSearch, setTagSearch] = useState6("");
|
|
2746
|
+
const [mobileDetailAgent, setMobileDetailAgent] = useState6(null);
|
|
2747
|
+
const [mobileSubView, setMobileSubView] = useState6(null);
|
|
2597
2748
|
const {
|
|
2598
2749
|
agents,
|
|
2599
2750
|
archivedHiddenCount,
|
|
@@ -2642,7 +2793,7 @@ function AgentListInlinePicker({
|
|
|
2642
2793
|
};
|
|
2643
2794
|
const isMobile = true;
|
|
2644
2795
|
if (mobileDetailAgent) {
|
|
2645
|
-
return /* @__PURE__ */ jsxs13("div", { className:
|
|
2796
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn7("flex h-full min-h-0 flex-col", className), children: [
|
|
2646
2797
|
/* @__PURE__ */ jsxs13(
|
|
2647
2798
|
"button",
|
|
2648
2799
|
{
|
|
@@ -2665,7 +2816,7 @@ function AgentListInlinePicker({
|
|
|
2665
2816
|
] });
|
|
2666
2817
|
}
|
|
2667
2818
|
if (mobileSubView) {
|
|
2668
|
-
return /* @__PURE__ */ jsx16("div", { className:
|
|
2819
|
+
return /* @__PURE__ */ jsx16("div", { className: cn7("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ jsx16(
|
|
2669
2820
|
AgentMobileSubView,
|
|
2670
2821
|
{
|
|
2671
2822
|
view: mobileSubView,
|
|
@@ -2684,7 +2835,7 @@ function AgentListInlinePicker({
|
|
|
2684
2835
|
}
|
|
2685
2836
|
) });
|
|
2686
2837
|
}
|
|
2687
|
-
return /* @__PURE__ */ jsx16("div", { className:
|
|
2838
|
+
return /* @__PURE__ */ jsx16("div", { className: cn7("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ jsx16(
|
|
2688
2839
|
AgentListContent,
|
|
2689
2840
|
{
|
|
2690
2841
|
agents,
|
|
@@ -2722,7 +2873,7 @@ function AgentListInlinePicker({
|
|
|
2722
2873
|
}
|
|
2723
2874
|
|
|
2724
2875
|
// catalog/react/FavoriteAgentButton.tsx
|
|
2725
|
-
import { cn as
|
|
2876
|
+
import { cn as cn8 } from "@ai-matrx/design-system";
|
|
2726
2877
|
import { useCallback as useCallback6 } from "react";
|
|
2727
2878
|
import { StarIcon as StarIcon3 } from "@ai-matrx/design-system/icons";
|
|
2728
2879
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
@@ -2750,7 +2901,7 @@ function FavoriteAgentButton({
|
|
|
2750
2901
|
"button",
|
|
2751
2902
|
{
|
|
2752
2903
|
type: "button",
|
|
2753
|
-
className:
|
|
2904
|
+
className: cn8(
|
|
2754
2905
|
"flex-shrink-0 p-0.5 rounded transition-all duration-150",
|
|
2755
2906
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
2756
2907
|
disabled ? "cursor-not-allowed" : "hover:scale-110 cursor-pointer"
|
|
@@ -2763,7 +2914,7 @@ function FavoriteAgentButton({
|
|
|
2763
2914
|
StarIcon3,
|
|
2764
2915
|
{
|
|
2765
2916
|
fill: isFavorite2 ? "currentColor" : "none",
|
|
2766
|
-
className:
|
|
2917
|
+
className: cn8(
|
|
2767
2918
|
"h-3.5 w-3.5 transition-all duration-150",
|
|
2768
2919
|
isFavorite2 ? "matrx-agent-star-on" : "text-muted-foreground/40 hover:matrx-agent-star-on"
|
|
2769
2920
|
)
|
|
@@ -2776,7 +2927,7 @@ function FavoriteAgentButton({
|
|
|
2776
2927
|
"button",
|
|
2777
2928
|
{
|
|
2778
2929
|
type: "button",
|
|
2779
|
-
className:
|
|
2930
|
+
className: cn8(
|
|
2780
2931
|
"absolute top-2.5 right-2.5 z-10 p-0.5 rounded transition-all duration-150",
|
|
2781
2932
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
2782
2933
|
disabled ? "cursor-not-allowed" : "hover:scale-110 cursor-pointer",
|