@axiom-lattice/react-sdk 4.1.4 → 4.2.0
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/dist/{AgentDetailSideApp-KVL27KAF.mjs → AgentDetailSideApp-ETXLLXP2.mjs} +9 -9
- package/dist/AgentGovernanceWorkbench-D47KUMAA.mjs +20 -0
- package/dist/{MessageGraph-LOSAZQ2V.mjs → MessageGraph-PVOC7XW4.mjs} +3 -3
- package/dist/{ReactChart-NDLIHCJJ.mjs → ReactChart-BZTCD4P7.mjs} +3 -3
- package/dist/{SkillFlow-OVKEKBOL.mjs → SkillFlow-TBKF765E.mjs} +4 -4
- package/dist/{TasksSideApp-37YKH7HV.mjs → TasksSideApp-NNFCW65B.mjs} +4 -4
- package/dist/{TeamWorkspace-EAFZU3KS.mjs → TeamWorkspace-GS7C7E4X.mjs} +3 -3
- package/dist/{TopologyRuntimeView-53OCKDYA.mjs → TopologyRuntimeView-VWGYRX74.mjs} +4 -4
- package/dist/{WorkflowAutomationView-R4EHXT7I.mjs → WorkflowAutomationView-T4YKEPSP.mjs} +6 -6
- package/dist/agent-chat-loader.js +1 -1
- package/dist/{chunk-SLXJAOF2.mjs → chunk-7DCDRNN5.mjs} +2 -2
- package/dist/{chunk-DTZKYPER.mjs → chunk-7QQKL657.mjs} +5 -2
- package/dist/chunk-7QQKL657.mjs.map +1 -0
- package/dist/{chunk-YYP5ASCR.mjs → chunk-AYNHFB6M.mjs} +5 -5
- package/dist/{chunk-LEEQPRDB.mjs → chunk-HMBSH53V.mjs} +102 -33
- package/dist/chunk-HMBSH53V.mjs.map +1 -0
- package/dist/{chunk-NHD2XFH4.mjs → chunk-K7WBURGK.mjs} +3 -3
- package/dist/{chunk-AMIVRDYB.mjs → chunk-MFAPAXZ2.mjs} +2 -2
- package/dist/{chunk-FKK4AXDU.mjs → chunk-NHWTNX7F.mjs} +5 -5
- package/dist/{chunk-WQBBDRPU.mjs → chunk-NLN5EB7R.mjs} +3730 -3080
- package/dist/chunk-NLN5EB7R.mjs.map +1 -0
- package/dist/{chunk-N4C7TX7T.mjs → chunk-NQK7AVBH.mjs} +3 -3
- package/dist/{chunk-EWLXRAWY.mjs → chunk-QPF4RBTJ.mjs} +240 -299
- package/dist/chunk-QPF4RBTJ.mjs.map +1 -0
- package/dist/{chunk-OT7IZRSM.mjs → chunk-THWLCTFU.mjs} +2 -2
- package/dist/{embed-page-AgentDetailSideApp-3LBCEKFU.js → embed-page-AgentDetailSideApp-7FH2JSZI.js} +1 -1
- package/dist/{embed-page-AgentGovernanceWorkbench-K3JUQNBW.js → embed-page-AgentGovernanceWorkbench-Y5F3ZPYC.js} +1 -1
- package/dist/{embed-page-MessageGraph-3X4ROEN6.js → embed-page-MessageGraph-ONODQPG4.js} +1 -1
- package/dist/{embed-page-ReactChart-F6VYCIYY.js → embed-page-ReactChart-GZQSKCUG.js} +1 -1
- package/dist/{embed-page-SkillFlow-3CF7R3CW.js → embed-page-SkillFlow-TPESM4DI.js} +1 -1
- package/dist/{embed-page-TasksSideApp-3WRDBZU3.js → embed-page-TasksSideApp-HYKCJ356.js} +1 -1
- package/dist/{embed-page-TeamWorkspace-6JSMZYUF.js → embed-page-TeamWorkspace-IOHS4RJV.js} +1 -1
- package/dist/{embed-page-TopologyRuntimeView-YDFENLHH.js → embed-page-TopologyRuntimeView-QLMZ4OE7.js} +1 -1
- package/dist/{embed-page-WorkflowAutomationView-MP5B7Q2Q.js → embed-page-WorkflowAutomationView-FJJSGY7Z.js} +1 -1
- package/dist/{embed-page-chunk-QEYWJHEK.js → embed-page-chunk-6LL6YULZ.js} +1 -1
- package/dist/{embed-page-chunk-UOL6CUAL.js → embed-page-chunk-D3NRIME3.js} +1 -1
- package/dist/embed-page-chunk-EMPMOO53.js +466 -0
- package/dist/{embed-page-chunk-GDTBDOUE.js → embed-page-chunk-FXTSVMPN.js} +89 -38
- package/dist/embed-page-chunk-KFUAWYJ7.js +5 -0
- package/dist/{embed-page-chunk-IRP6JSSX.js → embed-page-chunk-L7RMIQ7C.js} +9 -9
- package/dist/{embed-page-chunk-YMJGPA3F.js → embed-page-chunk-MCUFFMAW.js} +116 -124
- package/dist/{embed-page-chunk-PAJ5NG2Z.js → embed-page-chunk-SMQZEZYG.js} +1 -1
- package/dist/{embed-page-chunk-FFO7CAYL.js → embed-page-chunk-VVYB3C4O.js} +1 -1
- package/dist/{embed-page-chunk-RVXX5HKF.js → embed-page-chunk-ZTRCHYWV.js} +1 -1
- package/dist/embed-page.js +3 -3
- package/dist/index.d.mts +44 -7
- package/dist/index.d.ts +44 -7
- package/dist/index.js +5705 -4998
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -15
- package/dist/index.mjs.map +1 -1
- package/dist/web-app.js +4 -1
- package/dist/web-app.js.map +1 -1
- package/dist/web-app.mjs +1 -1
- package/package.json +3 -3
- package/dist/AgentGovernanceWorkbench-I6S4XU3T.mjs +0 -20
- package/dist/chunk-DTZKYPER.mjs.map +0 -1
- package/dist/chunk-EWLXRAWY.mjs.map +0 -1
- package/dist/chunk-LEEQPRDB.mjs.map +0 -1
- package/dist/chunk-WQBBDRPU.mjs.map +0 -1
- package/dist/embed-page-chunk-B2E2XOH2.js +0 -467
- package/dist/embed-page-chunk-URNZX66S.js +0 -5
- /package/dist/{AgentDetailSideApp-KVL27KAF.mjs.map → AgentDetailSideApp-ETXLLXP2.mjs.map} +0 -0
- /package/dist/{AgentGovernanceWorkbench-I6S4XU3T.mjs.map → AgentGovernanceWorkbench-D47KUMAA.mjs.map} +0 -0
- /package/dist/{MessageGraph-LOSAZQ2V.mjs.map → MessageGraph-PVOC7XW4.mjs.map} +0 -0
- /package/dist/{ReactChart-NDLIHCJJ.mjs.map → ReactChart-BZTCD4P7.mjs.map} +0 -0
- /package/dist/{SkillFlow-OVKEKBOL.mjs.map → SkillFlow-TBKF765E.mjs.map} +0 -0
- /package/dist/{TasksSideApp-37YKH7HV.mjs.map → TasksSideApp-NNFCW65B.mjs.map} +0 -0
- /package/dist/{TeamWorkspace-EAFZU3KS.mjs.map → TeamWorkspace-GS7C7E4X.mjs.map} +0 -0
- /package/dist/{TopologyRuntimeView-53OCKDYA.mjs.map → TopologyRuntimeView-VWGYRX74.mjs.map} +0 -0
- /package/dist/{WorkflowAutomationView-R4EHXT7I.mjs.map → WorkflowAutomationView-T4YKEPSP.mjs.map} +0 -0
- /package/dist/{chunk-SLXJAOF2.mjs.map → chunk-7DCDRNN5.mjs.map} +0 -0
- /package/dist/{chunk-YYP5ASCR.mjs.map → chunk-AYNHFB6M.mjs.map} +0 -0
- /package/dist/{chunk-NHD2XFH4.mjs.map → chunk-K7WBURGK.mjs.map} +0 -0
- /package/dist/{chunk-AMIVRDYB.mjs.map → chunk-MFAPAXZ2.mjs.map} +0 -0
- /package/dist/{chunk-FKK4AXDU.mjs.map → chunk-NHWTNX7F.mjs.map} +0 -0
- /package/dist/{chunk-N4C7TX7T.mjs.map → chunk-NQK7AVBH.mjs.map} +0 -0
- /package/dist/{chunk-OT7IZRSM.mjs.map → chunk-THWLCTFU.mjs.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
useAuthOptional,
|
|
10
10
|
useClient,
|
|
11
11
|
useLatticeChatShellContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HMBSH53V.mjs";
|
|
13
13
|
|
|
14
14
|
// src/hooks/useChat.ts
|
|
15
15
|
import { useState, useCallback, useEffect, useRef } from "react";
|
|
@@ -1527,31 +1527,13 @@ function useTenantBranding() {
|
|
|
1527
1527
|
}
|
|
1528
1528
|
|
|
1529
1529
|
// src/components/Auth/TenantSelector.tsx
|
|
1530
|
-
import { useState as useState5, useEffect as useEffect4, useMemo as useMemo2,
|
|
1531
|
-
import { Button as Button3, Input as Input2,
|
|
1530
|
+
import { useState as useState5, useEffect as useEffect4, useMemo as useMemo2, useCallback as useCallback3 } from "react";
|
|
1531
|
+
import { Button as Button3, Input as Input2, Spin as Spin2, theme } from "antd";
|
|
1532
1532
|
import { createStyles as createStyles2 } from "antd-style";
|
|
1533
1533
|
import { X, Search, ArrowRight, LogOut as LogOut2 } from "lucide-react";
|
|
1534
1534
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1535
1535
|
var { useToken } = theme;
|
|
1536
|
-
var
|
|
1537
|
-
var STATUS_OPTIONS = [
|
|
1538
|
-
{ value: "active", label: "Active" },
|
|
1539
|
-
{ value: "inactive", label: "Inactive" },
|
|
1540
|
-
{ value: "suspended", label: "Suspended" },
|
|
1541
|
-
{ value: "all", label: "All tenants" }
|
|
1542
|
-
];
|
|
1543
|
-
var getStatusConfig = (status, token) => {
|
|
1544
|
-
switch (status) {
|
|
1545
|
-
case "active":
|
|
1546
|
-
return { color: token.colorSuccess, text: "Active" };
|
|
1547
|
-
case "inactive":
|
|
1548
|
-
return { color: token.colorTextTertiary, text: "Inactive" };
|
|
1549
|
-
case "suspended":
|
|
1550
|
-
return { color: token.colorError, text: "Suspended" };
|
|
1551
|
-
default:
|
|
1552
|
-
return { color: token.colorTextTertiary, text: status };
|
|
1553
|
-
}
|
|
1554
|
-
};
|
|
1536
|
+
var TWO_COLUMN_THRESHOLD = 6;
|
|
1555
1537
|
var useStyles = createStyles2(({ token, css }) => ({
|
|
1556
1538
|
surface: css`
|
|
1557
1539
|
position: relative;
|
|
@@ -1659,9 +1641,14 @@ var useStyles = createStyles2(({ token, css }) => ({
|
|
|
1659
1641
|
`,
|
|
1660
1642
|
grid: css`
|
|
1661
1643
|
display: grid;
|
|
1662
|
-
grid-template-columns: repeat(${GRID_COLUMNS}, minmax(0, 1fr));
|
|
1663
1644
|
gap: ${token.marginSM}px;
|
|
1664
1645
|
padding-bottom: 4px;
|
|
1646
|
+
`,
|
|
1647
|
+
gridOne: css`
|
|
1648
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1649
|
+
`,
|
|
1650
|
+
gridTwo: css`
|
|
1651
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1665
1652
|
|
|
1666
1653
|
@media (max-width: 480px) {
|
|
1667
1654
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -1739,20 +1726,6 @@ var useStyles = createStyles2(({ token, css }) => ({
|
|
|
1739
1726
|
overflow: hidden;
|
|
1740
1727
|
text-overflow: ellipsis;
|
|
1741
1728
|
`,
|
|
1742
|
-
status: css`
|
|
1743
|
-
display: flex;
|
|
1744
|
-
align-items: center;
|
|
1745
|
-
gap: 5px;
|
|
1746
|
-
flex-shrink: 0;
|
|
1747
|
-
font-size: ${token.fontSizeSM}px;
|
|
1748
|
-
line-height: 1;
|
|
1749
|
-
`,
|
|
1750
|
-
statusDot: css`
|
|
1751
|
-
width: 6px;
|
|
1752
|
-
height: 6px;
|
|
1753
|
-
border-radius: 50%;
|
|
1754
|
-
flex-shrink: 0;
|
|
1755
|
-
`,
|
|
1756
1729
|
// ============================================
|
|
1757
1730
|
// Empty / loading states
|
|
1758
1731
|
// ============================================
|
|
@@ -1811,34 +1784,21 @@ var TenantSelector = ({
|
|
|
1811
1784
|
const { styles } = useStyles();
|
|
1812
1785
|
const { token } = useToken();
|
|
1813
1786
|
const { logout } = useAuth();
|
|
1814
|
-
const currentTenant = useMemo2(
|
|
1815
|
-
() => tenants.find((t) => t.id === currentTenantId) ?? null,
|
|
1816
|
-
[tenants, currentTenantId]
|
|
1817
|
-
);
|
|
1818
1787
|
const [selectedId, setSelectedId] = useState5(currentTenantId ?? null);
|
|
1819
1788
|
const [search, setSearch] = useState5("");
|
|
1820
|
-
const [statusFilter, setStatusFilter] = useState5(
|
|
1821
|
-
() => currentTenant && currentTenant.status !== "active" ? "all" : "active"
|
|
1822
|
-
);
|
|
1823
1789
|
const [isSubmitting, setIsSubmitting] = useState5(false);
|
|
1824
|
-
const filterTouchedRef = useRef3(false);
|
|
1825
1790
|
useEffect4(() => {
|
|
1826
1791
|
setSelectedId(currentTenantId ?? null);
|
|
1827
1792
|
}, [currentTenantId]);
|
|
1828
|
-
useEffect4(() => {
|
|
1829
|
-
if (filterTouchedRef.current) return;
|
|
1830
|
-
if (currentTenant && currentTenant.status !== "active") setStatusFilter("all");
|
|
1831
|
-
}, [currentTenant?.id, currentTenant?.status]);
|
|
1832
1793
|
const filtered = useMemo2(() => {
|
|
1833
1794
|
const query = search.trim().toLowerCase();
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
}, [tenants, search, statusFilter]);
|
|
1795
|
+
if (!query) return tenants;
|
|
1796
|
+
return tenants.filter(
|
|
1797
|
+
(tenant) => tenant.name.toLowerCase().includes(query) || (tenant.description ?? "").toLowerCase().includes(query)
|
|
1798
|
+
);
|
|
1799
|
+
}, [tenants, search]);
|
|
1840
1800
|
const canConfirm = !!selectedId && tenants.some((t) => t.id === selectedId);
|
|
1841
|
-
const isFiltering = search.trim().length > 0
|
|
1801
|
+
const isFiltering = search.trim().length > 0;
|
|
1842
1802
|
const handleContinue = useCallback3(async () => {
|
|
1843
1803
|
const tenant = tenants.find((t) => t.id === selectedId);
|
|
1844
1804
|
if (!tenant) return;
|
|
@@ -1853,10 +1813,8 @@ var TenantSelector = ({
|
|
|
1853
1813
|
logout();
|
|
1854
1814
|
onLogout?.();
|
|
1855
1815
|
}, [logout, onLogout]);
|
|
1856
|
-
const
|
|
1816
|
+
const handleResetSearch = useCallback3(() => {
|
|
1857
1817
|
setSearch("");
|
|
1858
|
-
filterTouchedRef.current = true;
|
|
1859
|
-
setStatusFilter("all");
|
|
1860
1818
|
}, []);
|
|
1861
1819
|
const selectedTenant = tenants.find((t) => t.id === selectedId);
|
|
1862
1820
|
const headerLogoUrl = getLogoSrc(selectedTenant?.metadata);
|
|
@@ -1911,38 +1869,22 @@ var TenantSelector = ({
|
|
|
1911
1869
|
/* @__PURE__ */ jsx5("h2", { className: styles.title, children: title }),
|
|
1912
1870
|
/* @__PURE__ */ jsx5("p", { className: styles.subtitle, children: description })
|
|
1913
1871
|
] }),
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
{
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
),
|
|
1931
|
-
/* @__PURE__ */ jsx5(
|
|
1932
|
-
Select,
|
|
1933
|
-
{
|
|
1934
|
-
"data-testid": "tenant-status-filter",
|
|
1935
|
-
"aria-label": "Filter by status",
|
|
1936
|
-
style: { width: 150 },
|
|
1937
|
-
value: statusFilter,
|
|
1938
|
-
onChange: (value) => {
|
|
1939
|
-
filterTouchedRef.current = true;
|
|
1940
|
-
setStatusFilter(value);
|
|
1941
|
-
},
|
|
1942
|
-
options: STATUS_OPTIONS
|
|
1943
|
-
}
|
|
1944
|
-
)
|
|
1945
|
-
] }),
|
|
1872
|
+
/* @__PURE__ */ jsx5("div", { className: styles.toolbar, children: /* @__PURE__ */ jsx5(
|
|
1873
|
+
Input2,
|
|
1874
|
+
{
|
|
1875
|
+
style: { flex: 1, minWidth: 0 },
|
|
1876
|
+
placeholder: "Search tenant...",
|
|
1877
|
+
"aria-label": "Search tenants",
|
|
1878
|
+
value: search,
|
|
1879
|
+
onChange: (e) => setSearch(e.target.value),
|
|
1880
|
+
onPressEnter: () => {
|
|
1881
|
+
if (canConfirm) handleContinue();
|
|
1882
|
+
},
|
|
1883
|
+
prefix: /* @__PURE__ */ jsx5(Search, { size: 16, style: { color: token.colorTextTertiary } }),
|
|
1884
|
+
allowClear: true,
|
|
1885
|
+
autoFocus: true
|
|
1886
|
+
}
|
|
1887
|
+
) }),
|
|
1946
1888
|
/* @__PURE__ */ jsxs3("div", { className: styles.scrollRegion, children: [
|
|
1947
1889
|
/* @__PURE__ */ jsxs3("span", { className: styles.srOnly, "aria-live": "polite", children: [
|
|
1948
1890
|
filtered.length,
|
|
@@ -1951,60 +1893,57 @@ var TenantSelector = ({
|
|
|
1951
1893
|
] }),
|
|
1952
1894
|
filtered.length === 0 ? /* @__PURE__ */ jsxs3("div", { className: styles.centeredBody, children: [
|
|
1953
1895
|
/* @__PURE__ */ jsx5("span", { className: styles.emptyTitle, children: "No tenants match" }),
|
|
1954
|
-
/* @__PURE__ */ jsx5("span", { children: "Try a different search
|
|
1955
|
-
isFiltering && /* @__PURE__ */ jsx5(Button3, { size: "small", onClick:
|
|
1956
|
-
] }) : /* @__PURE__ */ jsx5(
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
{
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
"
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
children: logoSrc ? /* @__PURE__ */ jsx5(TenantLogo, { logoUrl: logoSrc, size: 28 }) : /* @__PURE__ */ jsx5(
|
|
1979
|
-
"span",
|
|
1896
|
+
/* @__PURE__ */ jsx5("span", { children: "Try a different search." }),
|
|
1897
|
+
isFiltering && /* @__PURE__ */ jsx5(Button3, { size: "small", onClick: handleResetSearch, children: "Show all tenants" })
|
|
1898
|
+
] }) : /* @__PURE__ */ jsx5(
|
|
1899
|
+
"div",
|
|
1900
|
+
{
|
|
1901
|
+
"data-testid": "tenant-grid",
|
|
1902
|
+
"data-columns": filtered.length >= TWO_COLUMN_THRESHOLD ? 2 : 1,
|
|
1903
|
+
className: `${styles.grid} ${filtered.length >= TWO_COLUMN_THRESHOLD ? styles.gridTwo : styles.gridOne}`,
|
|
1904
|
+
children: filtered.map((tenant) => {
|
|
1905
|
+
const isSelected = selectedId === tenant.id;
|
|
1906
|
+
const logoSrc = getLogoSrc(tenant.metadata);
|
|
1907
|
+
return /* @__PURE__ */ jsxs3(
|
|
1908
|
+
"button",
|
|
1909
|
+
{
|
|
1910
|
+
type: "button",
|
|
1911
|
+
"aria-pressed": isSelected,
|
|
1912
|
+
"data-testid": "tenant-option",
|
|
1913
|
+
"data-tenant-id": tenant.id,
|
|
1914
|
+
"data-tenant-name": tenant.name,
|
|
1915
|
+
className: styles.card,
|
|
1916
|
+
onClick: () => setSelectedId(tenant.id),
|
|
1917
|
+
children: [
|
|
1918
|
+
/* @__PURE__ */ jsx5(
|
|
1919
|
+
"div",
|
|
1980
1920
|
{
|
|
1921
|
+
className: styles.avatar,
|
|
1981
1922
|
style: {
|
|
1982
|
-
|
|
1923
|
+
background: logoSrc ? "transparent" : isSelected ? token.colorPrimary : token.colorFillSecondary
|
|
1983
1924
|
},
|
|
1984
|
-
children:
|
|
1925
|
+
children: logoSrc ? /* @__PURE__ */ jsx5(TenantLogo, { logoUrl: logoSrc, size: 28 }) : /* @__PURE__ */ jsx5(
|
|
1926
|
+
"span",
|
|
1927
|
+
{
|
|
1928
|
+
style: {
|
|
1929
|
+
color: isSelected ? "white" : token.colorTextSecondary
|
|
1930
|
+
},
|
|
1931
|
+
children: tenant.name.charAt(0).toUpperCase() || "?"
|
|
1932
|
+
}
|
|
1933
|
+
)
|
|
1985
1934
|
}
|
|
1986
|
-
)
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
style: { background: statusConfig.color }
|
|
1999
|
-
}
|
|
2000
|
-
),
|
|
2001
|
-
/* @__PURE__ */ jsx5("span", { style: { color: statusConfig.color }, children: statusConfig.text })
|
|
2002
|
-
] })
|
|
2003
|
-
]
|
|
2004
|
-
},
|
|
2005
|
-
tenant.id
|
|
2006
|
-
);
|
|
2007
|
-
}) })
|
|
1935
|
+
),
|
|
1936
|
+
/* @__PURE__ */ jsxs3("div", { className: styles.cardBody, children: [
|
|
1937
|
+
/* @__PURE__ */ jsx5("p", { className: styles.cardName, children: tenant.name }),
|
|
1938
|
+
tenant.description && /* @__PURE__ */ jsx5("p", { className: styles.cardDescription, children: tenant.description })
|
|
1939
|
+
] })
|
|
1940
|
+
]
|
|
1941
|
+
},
|
|
1942
|
+
tenant.id
|
|
1943
|
+
);
|
|
1944
|
+
})
|
|
1945
|
+
}
|
|
1946
|
+
)
|
|
2008
1947
|
] }),
|
|
2009
1948
|
/* @__PURE__ */ jsxs3("div", { className: styles.footer, children: [
|
|
2010
1949
|
onCancel ? /* @__PURE__ */ jsx5(Button3, { onClick: onCancel, children: "Cancel" }) : onLogout ? /* @__PURE__ */ jsx5(Button3, { onClick: handleLogout, icon: /* @__PURE__ */ jsx5(LogOut2, { size: 16 }), children: "Log Out" }) : /* @__PURE__ */ jsx5("span", {}),
|
|
@@ -2275,9 +2214,10 @@ import React5, {
|
|
|
2275
2214
|
useCallback as useCallback5,
|
|
2276
2215
|
useEffect as useEffect6,
|
|
2277
2216
|
useLayoutEffect,
|
|
2278
|
-
useRef as
|
|
2217
|
+
useRef as useRef3
|
|
2279
2218
|
} from "react";
|
|
2280
2219
|
import { WorkspaceClient, Client } from "@axiom-lattice/client-sdk";
|
|
2220
|
+
import { WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX } from "@axiom-lattice/protocols";
|
|
2281
2221
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
2282
2222
|
var WorkspaceContext = createContext2(null);
|
|
2283
2223
|
var useWorkspaceContext = () => {
|
|
@@ -2373,7 +2313,7 @@ var WorkspaceContextProvider = ({
|
|
|
2373
2313
|
setError(null);
|
|
2374
2314
|
try {
|
|
2375
2315
|
const data = await client.listProjects(targetWorkspaceId);
|
|
2376
|
-
setProjects(data.filter((p) => p.kind !== "training" && p.kind !== "personal" && p.
|
|
2316
|
+
setProjects(data.filter((p) => p.kind !== "training" && p.kind !== "personal" && !p.id.startsWith(WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX)));
|
|
2377
2317
|
setTrainingProjects(data.filter((p) => p.kind === "training"));
|
|
2378
2318
|
setPersonalProjects(data.filter((p) => p.kind === "personal"));
|
|
2379
2319
|
} catch (e) {
|
|
@@ -2403,7 +2343,7 @@ var WorkspaceContextProvider = ({
|
|
|
2403
2343
|
setWorkspaceId(firstWorkspace.id);
|
|
2404
2344
|
}
|
|
2405
2345
|
}, [workspaces, workspaceId]);
|
|
2406
|
-
const prevWorkspaceId =
|
|
2346
|
+
const prevWorkspaceId = useRef3(workspaceId);
|
|
2407
2347
|
useEffect6(() => {
|
|
2408
2348
|
if (workspaceId) {
|
|
2409
2349
|
refreshProjects(workspaceId);
|
|
@@ -2687,7 +2627,7 @@ import {
|
|
|
2687
2627
|
useContext as useContext3,
|
|
2688
2628
|
useEffect as useEffect7,
|
|
2689
2629
|
useMemo as useMemo3,
|
|
2690
|
-
useRef as
|
|
2630
|
+
useRef as useRef4,
|
|
2691
2631
|
useState as useState9
|
|
2692
2632
|
} from "react";
|
|
2693
2633
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
@@ -2726,11 +2666,11 @@ var ConversationContextProvider = ({
|
|
|
2726
2666
|
const [isLoading, setIsLoading] = useState9(false);
|
|
2727
2667
|
const [error, setError] = useState9(null);
|
|
2728
2668
|
const [customRunConfig, setCustomRunConfig] = useState9({});
|
|
2729
|
-
const loadedAssistantIdRef =
|
|
2730
|
-
const prevAssistantIdRef =
|
|
2731
|
-
const isLoadingRef =
|
|
2732
|
-
const loadRequestIdRef =
|
|
2733
|
-
const clientRef =
|
|
2669
|
+
const loadedAssistantIdRef = useRef4(null);
|
|
2670
|
+
const prevAssistantIdRef = useRef4(null);
|
|
2671
|
+
const isLoadingRef = useRef4(false);
|
|
2672
|
+
const loadRequestIdRef = useRef4(0);
|
|
2673
|
+
const clientRef = useRef4(client);
|
|
2734
2674
|
useEffect7(() => {
|
|
2735
2675
|
clientRef.current = client;
|
|
2736
2676
|
}, [client]);
|
|
@@ -2837,7 +2777,7 @@ var ConversationContextProvider = ({
|
|
|
2837
2777
|
}, [assistantId, loadThreads]);
|
|
2838
2778
|
const workspaceCtx = useContext3(WorkspaceContext);
|
|
2839
2779
|
const scopeKey = `${workspaceCtx?.workspaceId ?? ""}:${workspaceCtx?.projectId ?? ""}`;
|
|
2840
|
-
const prevScopeKeyRef =
|
|
2780
|
+
const prevScopeKeyRef = useRef4(scopeKey);
|
|
2841
2781
|
useEffect7(() => {
|
|
2842
2782
|
const currentClient = clientRef.current;
|
|
2843
2783
|
if (!assistantId || !currentClient.assistantId) return;
|
|
@@ -3032,7 +2972,7 @@ import {
|
|
|
3032
2972
|
useEffect as useEffect8,
|
|
3033
2973
|
useLayoutEffect as useLayoutEffect2,
|
|
3034
2974
|
useMemo as useMemo4,
|
|
3035
|
-
useRef as
|
|
2975
|
+
useRef as useRef5,
|
|
3036
2976
|
useTransition
|
|
3037
2977
|
} from "react";
|
|
3038
2978
|
import {
|
|
@@ -3196,26 +3136,26 @@ function AgentThreadProvider({
|
|
|
3196
3136
|
threadId
|
|
3197
3137
|
}));
|
|
3198
3138
|
}, [clientAssistantId, tenantId, threadId]);
|
|
3199
|
-
const threadStreamRef =
|
|
3200
|
-
const chunkMessageMerger =
|
|
3201
|
-
const lastAgentStateCreatedAtRef =
|
|
3202
|
-
const streamEndedByInterruptRef =
|
|
3203
|
-
const currentThreadIdRef =
|
|
3139
|
+
const threadStreamRef = useRef5(null);
|
|
3140
|
+
const chunkMessageMerger = useRef5(createSimpleMessageMerger2());
|
|
3141
|
+
const lastAgentStateCreatedAtRef = useRef5(null);
|
|
3142
|
+
const streamEndedByInterruptRef = useRef5(false);
|
|
3143
|
+
const currentThreadIdRef = useRef5(threadId);
|
|
3204
3144
|
currentThreadIdRef.current = threadId;
|
|
3205
|
-
const messageCountRef =
|
|
3206
|
-
const onToolCompletedRef =
|
|
3145
|
+
const messageCountRef = useRef5(0);
|
|
3146
|
+
const onToolCompletedRef = useRef5(onToolCompleted);
|
|
3207
3147
|
onToolCompletedRef.current = onToolCompleted;
|
|
3208
|
-
const onStreamCompletedRef =
|
|
3148
|
+
const onStreamCompletedRef = useRef5(onStreamCompleted);
|
|
3209
3149
|
onStreamCompletedRef.current = onStreamCompleted;
|
|
3210
|
-
const pendingIdsRef =
|
|
3211
|
-
const inFlightRef =
|
|
3212
|
-
const historyLoadingRef =
|
|
3213
|
-
const streamActiveRef =
|
|
3214
|
-
const historyGenerationRef =
|
|
3215
|
-
const messageActivityGenerationRef =
|
|
3216
|
-
const streamStopGenerationRef =
|
|
3217
|
-
const threadEpochRef =
|
|
3218
|
-
const ownershipThreadIdRef =
|
|
3150
|
+
const pendingIdsRef = useRef5(/* @__PURE__ */ new Set());
|
|
3151
|
+
const inFlightRef = useRef5(0);
|
|
3152
|
+
const historyLoadingRef = useRef5(false);
|
|
3153
|
+
const streamActiveRef = useRef5(false);
|
|
3154
|
+
const historyGenerationRef = useRef5(0);
|
|
3155
|
+
const messageActivityGenerationRef = useRef5(0);
|
|
3156
|
+
const streamStopGenerationRef = useRef5(0);
|
|
3157
|
+
const threadEpochRef = useRef5(0);
|
|
3158
|
+
const ownershipThreadIdRef = useRef5(threadId);
|
|
3219
3159
|
if (ownershipThreadIdRef.current !== threadId) {
|
|
3220
3160
|
ownershipThreadIdRef.current = threadId;
|
|
3221
3161
|
threadEpochRef.current += 1;
|
|
@@ -3225,7 +3165,7 @@ function AgentThreadProvider({
|
|
|
3225
3165
|
inFlightRef.current = 0;
|
|
3226
3166
|
streamActiveRef.current = false;
|
|
3227
3167
|
}
|
|
3228
|
-
const isLoadingRef =
|
|
3168
|
+
const isLoadingRef = useRef5(state.isLoading);
|
|
3229
3169
|
isLoadingRef.current = state.isLoading;
|
|
3230
3170
|
const getOwnedLoading = useCallback7(() => historyLoadingRef.current || inFlightRef.current > 0 || streamActiveRef.current, []);
|
|
3231
3171
|
useEffect8(() => {
|
|
@@ -3394,7 +3334,7 @@ function AgentThreadProvider({
|
|
|
3394
3334
|
},
|
|
3395
3335
|
[getOwnedLoading, startTransition, threadId]
|
|
3396
3336
|
);
|
|
3397
|
-
const handleStreamEventRef =
|
|
3337
|
+
const handleStreamEventRef = useRef5(handleStreamEvent);
|
|
3398
3338
|
handleStreamEventRef.current = handleStreamEvent;
|
|
3399
3339
|
const sendMessage = useCallback7(
|
|
3400
3340
|
async (data) => {
|
|
@@ -3838,15 +3778,15 @@ function useAgentChat(options) {
|
|
|
3838
3778
|
}
|
|
3839
3779
|
|
|
3840
3780
|
// src/hooks/useAgentState.ts
|
|
3841
|
-
import { useState as useState11, useCallback as useCallback8, useEffect as useEffect9, useRef as
|
|
3781
|
+
import { useState as useState11, useCallback as useCallback8, useEffect as useEffect9, useRef as useRef6 } from "react";
|
|
3842
3782
|
function useAgentState(threadId, assistantId, options = {}) {
|
|
3843
3783
|
const client = useClient(assistantId);
|
|
3844
3784
|
const [agentState, setAgentState] = useState11(null);
|
|
3845
3785
|
const [isLoading, setIsLoading] = useState11(false);
|
|
3846
3786
|
const [error, setError] = useState11(null);
|
|
3847
|
-
const pollingIntervalRef =
|
|
3848
|
-
const pollingTimeoutRef =
|
|
3849
|
-
const hasFetchedRef =
|
|
3787
|
+
const pollingIntervalRef = useRef6(null);
|
|
3788
|
+
const pollingTimeoutRef = useRef6(null);
|
|
3789
|
+
const hasFetchedRef = useRef6(false);
|
|
3850
3790
|
const {
|
|
3851
3791
|
pollingInterval = 2e3,
|
|
3852
3792
|
// 2 seconds by default
|
|
@@ -3991,7 +3931,7 @@ function useEvalProjects() {
|
|
|
3991
3931
|
}
|
|
3992
3932
|
|
|
3993
3933
|
// src/hooks/eval/useEvalSuites.ts
|
|
3994
|
-
import { useState as useState14, useEffect as useEffect11, useCallback as useCallback11, useRef as
|
|
3934
|
+
import { useState as useState14, useEffect as useEffect11, useCallback as useCallback11, useRef as useRef7 } from "react";
|
|
3995
3935
|
|
|
3996
3936
|
// src/hooks/eval/evalGuards.ts
|
|
3997
3937
|
var RUN_STATUSES = /* @__PURE__ */ new Set(["running", "completed", "failed", "aborted"]);
|
|
@@ -4067,9 +4007,9 @@ function useEvalSuites(projectId) {
|
|
|
4067
4007
|
});
|
|
4068
4008
|
const [loading, setLoading] = useState14(Boolean(projectId));
|
|
4069
4009
|
const [error, setError] = useState14(null);
|
|
4070
|
-
const mountedRef =
|
|
4071
|
-
const projectIdRef =
|
|
4072
|
-
const requestTokenRef =
|
|
4010
|
+
const mountedRef = useRef7(false);
|
|
4011
|
+
const projectIdRef = useRef7(projectId);
|
|
4012
|
+
const requestTokenRef = useRef7(0);
|
|
4073
4013
|
projectIdRef.current = projectId;
|
|
4074
4014
|
const fetchSuites = useCallback11(async () => {
|
|
4075
4015
|
const requestedProjectId = projectId;
|
|
@@ -4196,7 +4136,7 @@ function useEvalCases(projectId, suiteId) {
|
|
|
4196
4136
|
}
|
|
4197
4137
|
|
|
4198
4138
|
// src/hooks/eval/useEvalRuns.ts
|
|
4199
|
-
import { useState as useState16, useEffect as useEffect13, useCallback as useCallback13, useRef as
|
|
4139
|
+
import { useState as useState16, useEffect as useEffect13, useCallback as useCallback13, useRef as useRef8 } from "react";
|
|
4200
4140
|
function normalizeError2(reason) {
|
|
4201
4141
|
if (reason instanceof Error) return reason;
|
|
4202
4142
|
if (typeof reason === "string") return new Error(reason);
|
|
@@ -4214,9 +4154,9 @@ function useEvalRuns(projectId) {
|
|
|
4214
4154
|
});
|
|
4215
4155
|
const [loading, setLoading] = useState16(false);
|
|
4216
4156
|
const [error, setError] = useState16(null);
|
|
4217
|
-
const mountedRef =
|
|
4218
|
-
const projectIdRef =
|
|
4219
|
-
const requestTokenRef =
|
|
4157
|
+
const mountedRef = useRef8(false);
|
|
4158
|
+
const projectIdRef = useRef8(projectId);
|
|
4159
|
+
const requestTokenRef = useRef8(0);
|
|
4220
4160
|
projectIdRef.current = projectId;
|
|
4221
4161
|
const fetchRuns = useCallback13(async () => {
|
|
4222
4162
|
const requestedProjectId = projectId;
|
|
@@ -4293,7 +4233,7 @@ function useEvalRuns(projectId) {
|
|
|
4293
4233
|
}
|
|
4294
4234
|
|
|
4295
4235
|
// src/hooks/eval/useEvalRunStream.ts
|
|
4296
|
-
import { useCallback as useCallback14, useEffect as useEffect14, useRef as
|
|
4236
|
+
import { useCallback as useCallback14, useEffect as useEffect14, useRef as useRef9, useState as useState17 } from "react";
|
|
4297
4237
|
var EMPTY_PROGRESS = { completed: 0, total: 0, passed: 0, failed: 0 };
|
|
4298
4238
|
function isNonnegativeInteger(value) {
|
|
4299
4239
|
return typeof value === "number" && Number.isFinite(value) && Number.isInteger(value) && value >= 0;
|
|
@@ -4348,14 +4288,14 @@ function useEvalRunStream(runId) {
|
|
|
4348
4288
|
const [error, setError] = useState17(null);
|
|
4349
4289
|
const [lastUpdatedAt, setLastUpdatedAt] = useState17(null);
|
|
4350
4290
|
const [subscription, setSubscription] = useState17(0);
|
|
4351
|
-
const abortRef =
|
|
4352
|
-
const generationRef =
|
|
4353
|
-
const runIdRef =
|
|
4354
|
-
const previousRunIdRef =
|
|
4355
|
-
const caseIndexesRef =
|
|
4356
|
-
const casesRef =
|
|
4357
|
-
const progressRef =
|
|
4358
|
-
const manuallyStoppedRunIdRef =
|
|
4291
|
+
const abortRef = useRef9(null);
|
|
4292
|
+
const generationRef = useRef9(0);
|
|
4293
|
+
const runIdRef = useRef9(runId);
|
|
4294
|
+
const previousRunIdRef = useRef9(void 0);
|
|
4295
|
+
const caseIndexesRef = useRef9(/* @__PURE__ */ new Map());
|
|
4296
|
+
const casesRef = useRef9([]);
|
|
4297
|
+
const progressRef = useRef9(EMPTY_PROGRESS);
|
|
4298
|
+
const manuallyStoppedRunIdRef = useRef9(null);
|
|
4359
4299
|
runIdRef.current = runId;
|
|
4360
4300
|
const stopStreaming = useCallback14(() => {
|
|
4361
4301
|
generationRef.current += 1;
|
|
@@ -4756,7 +4696,7 @@ var useSideAppOpener = () => {
|
|
|
4756
4696
|
import { Table, Typography as Typography42, Button as Button41, Flex as Flex6, Space as Space30 } from "antd";
|
|
4757
4697
|
|
|
4758
4698
|
// src/components/GenUI/MDResponse.tsx
|
|
4759
|
-
import React56, { useRef as
|
|
4699
|
+
import React56, { useRef as useRef28, useState as useState59, useMemo as useMemo22, useDeferredValue as useDeferredValue3 } from "react";
|
|
4760
4700
|
import { createStyles as createStyles37 } from "antd-style";
|
|
4761
4701
|
|
|
4762
4702
|
// src/components/GenUI/Code.tsx
|
|
@@ -4805,13 +4745,13 @@ function useCollections() {
|
|
|
4805
4745
|
}
|
|
4806
4746
|
|
|
4807
4747
|
// src/hooks/useExportImport.ts
|
|
4808
|
-
import { useState as useState20, useCallback as useCallback17, useRef as
|
|
4748
|
+
import { useState as useState20, useCallback as useCallback17, useRef as useRef10 } from "react";
|
|
4809
4749
|
function useExportImport() {
|
|
4810
4750
|
const api = useApi();
|
|
4811
4751
|
const client = useClient("__GLOBAL__");
|
|
4812
4752
|
const { currentTenant } = useAuth();
|
|
4813
4753
|
const tenantId = currentTenant?.id ?? "_";
|
|
4814
|
-
const archiveRef =
|
|
4754
|
+
const archiveRef = useRef10(null);
|
|
4815
4755
|
const [state, setState] = useState20({
|
|
4816
4756
|
exportableTypes: [],
|
|
4817
4757
|
selectedTypes: [],
|
|
@@ -4958,7 +4898,7 @@ function useExportImport() {
|
|
|
4958
4898
|
}
|
|
4959
4899
|
|
|
4960
4900
|
// src/hooks/useVoiceRecorder.ts
|
|
4961
|
-
import { useState as useState21, useRef as
|
|
4901
|
+
import { useState as useState21, useRef as useRef11, useCallback as useCallback18, useEffect as useEffect16 } from "react";
|
|
4962
4902
|
function useVoiceRecorder(options) {
|
|
4963
4903
|
const {
|
|
4964
4904
|
mode: initialMode = "auto",
|
|
@@ -4976,31 +4916,31 @@ function useVoiceRecorder(options) {
|
|
|
4976
4916
|
partialTexts: []
|
|
4977
4917
|
});
|
|
4978
4918
|
const client = useClient("__GLOBAL__");
|
|
4979
|
-
const onTranscriptionRef =
|
|
4919
|
+
const onTranscriptionRef = useRef11(onTranscription);
|
|
4980
4920
|
onTranscriptionRef.current = onTranscription;
|
|
4981
|
-
const statusRef =
|
|
4921
|
+
const statusRef = useRef11(state.status);
|
|
4982
4922
|
useEffect16(() => {
|
|
4983
4923
|
statusRef.current = state.status;
|
|
4984
4924
|
}, [state.status]);
|
|
4985
|
-
const cleanedRef =
|
|
4986
|
-
const volIntervalRef =
|
|
4987
|
-
const isCancellingRef =
|
|
4988
|
-
const mediaRecorderRef =
|
|
4989
|
-
const chunksRef =
|
|
4990
|
-
const streamRef =
|
|
4991
|
-
const analyserRef =
|
|
4992
|
-
const audioContextRef =
|
|
4993
|
-
const timerRef =
|
|
4994
|
-
const durationRef =
|
|
4995
|
-
const lastBlobRef =
|
|
4996
|
-
const modeRef =
|
|
4997
|
-
const vadSilenceStartRef =
|
|
4998
|
-
const vadSpeechBufferRef =
|
|
4999
|
-
const vadNoiseRef =
|
|
5000
|
-
const vadHadSpeechRef =
|
|
5001
|
-
const vadSpeechStartRef =
|
|
5002
|
-
const stopSafetyTimerRef =
|
|
5003
|
-
const isStoppingRef =
|
|
4925
|
+
const cleanedRef = useRef11(false);
|
|
4926
|
+
const volIntervalRef = useRef11(null);
|
|
4927
|
+
const isCancellingRef = useRef11(false);
|
|
4928
|
+
const mediaRecorderRef = useRef11(null);
|
|
4929
|
+
const chunksRef = useRef11([]);
|
|
4930
|
+
const streamRef = useRef11(null);
|
|
4931
|
+
const analyserRef = useRef11(null);
|
|
4932
|
+
const audioContextRef = useRef11(null);
|
|
4933
|
+
const timerRef = useRef11(null);
|
|
4934
|
+
const durationRef = useRef11(0);
|
|
4935
|
+
const lastBlobRef = useRef11(null);
|
|
4936
|
+
const modeRef = useRef11(initialMode);
|
|
4937
|
+
const vadSilenceStartRef = useRef11(null);
|
|
4938
|
+
const vadSpeechBufferRef = useRef11([]);
|
|
4939
|
+
const vadNoiseRef = useRef11(0.1);
|
|
4940
|
+
const vadHadSpeechRef = useRef11(false);
|
|
4941
|
+
const vadSpeechStartRef = useRef11(null);
|
|
4942
|
+
const stopSafetyTimerRef = useRef11(null);
|
|
4943
|
+
const isStoppingRef = useRef11(false);
|
|
5004
4944
|
const minSpeechDuration = 1500;
|
|
5005
4945
|
const cleanupAudio = useCallback18(() => {
|
|
5006
4946
|
if (cleanedRef.current) return;
|
|
@@ -6888,7 +6828,7 @@ var EvalSuiteCardList = ({ projectId, onSelectSuite, onEvalInvalidated }) => {
|
|
|
6888
6828
|
// src/components/Eval/EvalSuiteDetail.tsx
|
|
6889
6829
|
import { useState as useState27, useEffect as useEffect18 } from "react";
|
|
6890
6830
|
import { createStyles as createStyles13 } from "antd-style";
|
|
6891
|
-
import { Button as Button8, Typography as Typography11, Modal as Modal3, Form as Form3, Input as Input6, Select as
|
|
6831
|
+
import { Button as Button8, Typography as Typography11, Modal as Modal3, Form as Form3, Input as Input6, Select as Select2, message as message2 } from "antd";
|
|
6892
6832
|
import { Play, Trash2 as Trash23, Bot, FlaskConical as FlaskConical2 } from "lucide-react";
|
|
6893
6833
|
|
|
6894
6834
|
// src/components/EntityList/EntityListView.tsx
|
|
@@ -7714,7 +7654,7 @@ import { Modal as Modal2, Typography as Typography10, message } from "antd";
|
|
|
7714
7654
|
import { useEffect as useEffect17 } from "react";
|
|
7715
7655
|
|
|
7716
7656
|
// src/components/EntityList/FilterSelect.tsx
|
|
7717
|
-
import { Select
|
|
7657
|
+
import { Select } from "antd";
|
|
7718
7658
|
import { createStyles as createStyles12 } from "antd-style";
|
|
7719
7659
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
7720
7660
|
var useStyles9 = createStyles12(({ token, css }) => ({
|
|
@@ -7768,7 +7708,7 @@ var FilterSelect = ({
|
|
|
7768
7708
|
...options
|
|
7769
7709
|
];
|
|
7770
7710
|
return /* @__PURE__ */ jsx26(
|
|
7771
|
-
|
|
7711
|
+
Select,
|
|
7772
7712
|
{
|
|
7773
7713
|
className: borderless ? `${styles.select} ${styles.borderless}` : styles.select,
|
|
7774
7714
|
dropdownClassName,
|
|
@@ -8095,7 +8035,7 @@ var EvalSuiteDetail = ({ projectId, suiteId, onBack, onRun, onEvalInvalidated })
|
|
|
8095
8035
|
children: /* @__PURE__ */ jsxs18(Form3, { form, layout: "vertical", onFinish: handleSubmit, children: [
|
|
8096
8036
|
/* @__PURE__ */ jsx29(Form3.Item, { name: "inputMessage", label: "Input Message", rules: [{ required: true }], children: /* @__PURE__ */ jsx29(TextArea, { rows: 2, placeholder: "What to send to the agent" }) }),
|
|
8097
8037
|
/* @__PURE__ */ jsx29(Form3.Item, { name: "agentId", label: "Agent", rules: [{ required: true }], children: /* @__PURE__ */ jsx29(
|
|
8098
|
-
|
|
8038
|
+
Select2,
|
|
8099
8039
|
{
|
|
8100
8040
|
placeholder: "Select agent",
|
|
8101
8041
|
showSearch: true,
|
|
@@ -8107,7 +8047,7 @@ var EvalSuiteDetail = ({ projectId, suiteId, onBack, onRun, onEvalInvalidated })
|
|
|
8107
8047
|
}))
|
|
8108
8048
|
}
|
|
8109
8049
|
) }),
|
|
8110
|
-
/* @__PURE__ */ jsx29(Form3.Item, { name: "outputType", label: "Output Type", initialValue: "message_content", children: /* @__PURE__ */ jsx29(
|
|
8050
|
+
/* @__PURE__ */ jsx29(Form3.Item, { name: "outputType", label: "Output Type", initialValue: "message_content", children: /* @__PURE__ */ jsx29(Select2, { options: [
|
|
8111
8051
|
{ value: "message_content", label: "Message Content" },
|
|
8112
8052
|
{ value: "file_content", label: "File Content" }
|
|
8113
8053
|
] }) }),
|
|
@@ -8152,13 +8092,13 @@ var EvalSuiteDetail = ({ projectId, suiteId, onBack, onRun, onEvalInvalidated })
|
|
|
8152
8092
|
};
|
|
8153
8093
|
|
|
8154
8094
|
// src/components/Eval/EvalRunResults.tsx
|
|
8155
|
-
import { useEffect as useEffect20, useRef as
|
|
8095
|
+
import { useEffect as useEffect20, useRef as useRef13, useState as useState29 } from "react";
|
|
8156
8096
|
import { createStyles as createStyles14 } from "antd-style";
|
|
8157
8097
|
import { Alert as Alert3, App, Button as Button9, Typography as Typography12, Progress, Tag as Tag2, Popconfirm as Popconfirm2 } from "antd";
|
|
8158
8098
|
import { CheckCircle, XCircle, Trash2 as Trash24, FolderGit2 } from "lucide-react";
|
|
8159
8099
|
|
|
8160
8100
|
// src/hooks/eval/useEvalRunDetail.ts
|
|
8161
|
-
import { useCallback as useCallback20, useEffect as useEffect19, useRef as
|
|
8101
|
+
import { useCallback as useCallback20, useEffect as useEffect19, useRef as useRef12, useState as useState28 } from "react";
|
|
8162
8102
|
function normalizeError4(error) {
|
|
8163
8103
|
return error instanceof Error ? error : new Error(String(error));
|
|
8164
8104
|
}
|
|
@@ -8168,10 +8108,10 @@ function useEvalRunDetail(runId) {
|
|
|
8168
8108
|
const [loading, setLoading] = useState28(false);
|
|
8169
8109
|
const [refreshing, setRefreshing] = useState28(false);
|
|
8170
8110
|
const [error, setError] = useState28(null);
|
|
8171
|
-
const runIdRef =
|
|
8172
|
-
const runRef =
|
|
8173
|
-
const requestTokenRef =
|
|
8174
|
-
const mountedRef =
|
|
8111
|
+
const runIdRef = useRef12(runId);
|
|
8112
|
+
const runRef = useRef12(null);
|
|
8113
|
+
const requestTokenRef = useRef12(0);
|
|
8114
|
+
const mountedRef = useRef12(true);
|
|
8175
8115
|
runIdRef.current = runId;
|
|
8176
8116
|
const refresh = useCallback20(async () => {
|
|
8177
8117
|
const currentRunId = runIdRef.current;
|
|
@@ -8326,10 +8266,10 @@ var EvalRunResults = ({ runId, onBack, onRunSettled }) => {
|
|
|
8326
8266
|
terminal,
|
|
8327
8267
|
reconnect
|
|
8328
8268
|
} = useEvalRunStream(runId);
|
|
8329
|
-
const refreshRef =
|
|
8330
|
-
const onRunSettledRef =
|
|
8331
|
-
const refreshedTerminalRef =
|
|
8332
|
-
const refreshGenerationRef =
|
|
8269
|
+
const refreshRef = useRef13(refresh);
|
|
8270
|
+
const onRunSettledRef = useRef13(onRunSettled);
|
|
8271
|
+
const refreshedTerminalRef = useRef13(null);
|
|
8272
|
+
const refreshGenerationRef = useRef13(0);
|
|
8333
8273
|
const [finalizingKey, setFinalizingKey] = useState29(null);
|
|
8334
8274
|
const [deleting, setDeleting] = useState29(false);
|
|
8335
8275
|
refreshRef.current = refresh;
|
|
@@ -10058,7 +9998,7 @@ import {
|
|
|
10058
9998
|
import { createStyles as createStyles21 } from "antd-style";
|
|
10059
9999
|
|
|
10060
10000
|
// src/components/GenUI/MarkdownViewer.tsx
|
|
10061
|
-
import React20, { useState as useState33, useEffect as useEffect23, useRef as
|
|
10001
|
+
import React20, { useState as useState33, useEffect as useEffect23, useRef as useRef14 } from "react";
|
|
10062
10002
|
import { Button as Button12, Tooltip as Tooltip4, message as message4 } from "antd";
|
|
10063
10003
|
import {
|
|
10064
10004
|
CopyOutlined,
|
|
@@ -10333,7 +10273,7 @@ var MarkdownViewer = ({
|
|
|
10333
10273
|
}) => {
|
|
10334
10274
|
const { styles, cx } = useStyles13();
|
|
10335
10275
|
const [copied, setCopied] = useState33(false);
|
|
10336
|
-
const contentRef =
|
|
10276
|
+
const contentRef = useRef14(null);
|
|
10337
10277
|
const downloadFileName = fileName.split("/").pop() || fileName;
|
|
10338
10278
|
useEffect23(() => {
|
|
10339
10279
|
if (copied) {
|
|
@@ -11310,7 +11250,7 @@ import { LinkOutlined as LinkOutlined2, DownloadOutlined as DownloadOutlined2 }
|
|
|
11310
11250
|
|
|
11311
11251
|
// src/components/GenUI/ShareModal.tsx
|
|
11312
11252
|
import { useState as useState37, useEffect as useEffect26, useCallback as useCallback21 } from "react";
|
|
11313
|
-
import { Modal as Modal5, Input as Input7, Select as
|
|
11253
|
+
import { Modal as Modal5, Input as Input7, Select as Select3, InputNumber, Button as Button16, Space as Space10, Typography as Typography20, message as message6, List as List4, Tag as Tag5, Popconfirm as Popconfirm4 } from "antd";
|
|
11314
11254
|
import { CopyOutlined as CopyOutlined2, LinkOutlined, StopOutlined, PlusOutlined } from "@ant-design/icons";
|
|
11315
11255
|
import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
11316
11256
|
var { Text: Text18, Title: Title4 } = Typography20;
|
|
@@ -11496,9 +11436,9 @@ ${pwdText}`.trim());
|
|
|
11496
11436
|
] }),
|
|
11497
11437
|
/* @__PURE__ */ jsxs30("div", { children: [
|
|
11498
11438
|
/* @__PURE__ */ jsx44(Text18, { type: "secondary", style: { fontSize: 12 }, children: "Visibility" }),
|
|
11499
|
-
/* @__PURE__ */ jsxs30(
|
|
11500
|
-
/* @__PURE__ */ jsx44(
|
|
11501
|
-
/* @__PURE__ */ jsx44(
|
|
11439
|
+
/* @__PURE__ */ jsxs30(Select3, { value: visibility, onChange: setVisibility, style: { width: "100%" }, children: [
|
|
11440
|
+
/* @__PURE__ */ jsx44(Select3.Option, { value: "public", children: "Public" }),
|
|
11441
|
+
/* @__PURE__ */ jsx44(Select3.Option, { value: "password", children: "Password" })
|
|
11502
11442
|
] })
|
|
11503
11443
|
] }),
|
|
11504
11444
|
visibility === "password" && /* @__PURE__ */ jsxs30("div", { children: [
|
|
@@ -11507,7 +11447,7 @@ ${pwdText}`.trim());
|
|
|
11507
11447
|
] }),
|
|
11508
11448
|
/* @__PURE__ */ jsxs30("div", { children: [
|
|
11509
11449
|
/* @__PURE__ */ jsx44(Text18, { type: "secondary", style: { fontSize: 12 }, children: "Expires" }),
|
|
11510
|
-
/* @__PURE__ */ jsx44(
|
|
11450
|
+
/* @__PURE__ */ jsx44(Select3, { value: expiry, onChange: setExpiry, style: { width: "100%" }, children: EXPIRY_OPTIONS.map((opt) => /* @__PURE__ */ jsx44(Select3.Option, { value: opt.value, children: opt.label }, opt.label)) })
|
|
11511
11451
|
] }),
|
|
11512
11452
|
/* @__PURE__ */ jsxs30("div", { children: [
|
|
11513
11453
|
/* @__PURE__ */ jsx44(Text18, { type: "secondary", style: { fontSize: 12 }, children: "Max accesses (empty = unlimited)" }),
|
|
@@ -11638,7 +11578,7 @@ function AttachmentsViewerSideApp({
|
|
|
11638
11578
|
import { Button as Button18, Space as Space12, Typography as Typography21 } from "antd";
|
|
11639
11579
|
|
|
11640
11580
|
// src/components/GenUI/elements/ContentPreviewCollapse.tsx
|
|
11641
|
-
import { useRef as
|
|
11581
|
+
import { useRef as useRef15, useState as useState39, useEffect as useEffect28, useCallback as useCallback22 } from "react";
|
|
11642
11582
|
import { Collapse as Collapse5 } from "antd";
|
|
11643
11583
|
import { createStyles as createStyles23 } from "antd-style";
|
|
11644
11584
|
import { DownOutlined as DownOutlined3, UpOutlined as UpOutlined2 } from "@ant-design/icons";
|
|
@@ -11710,7 +11650,7 @@ var ContentPreviewCollapse = ({
|
|
|
11710
11650
|
}) => {
|
|
11711
11651
|
const [showFullContent, setShowFullContent] = useState39(false);
|
|
11712
11652
|
const [isOverflowing, setIsOverflowing] = useState39(false);
|
|
11713
|
-
const contentRef =
|
|
11653
|
+
const contentRef = useRef15(null);
|
|
11714
11654
|
const showShadow = isOverflowing && !showFullContent;
|
|
11715
11655
|
const { styles, cx } = useStyle7({ showShadow });
|
|
11716
11656
|
const checkOverflow = useCallback22(() => {
|
|
@@ -13947,7 +13887,7 @@ var TaskCard = ({
|
|
|
13947
13887
|
new_assistant_id = assistantId + "-general-purpose";
|
|
13948
13888
|
}
|
|
13949
13889
|
const subagent_thread_id = (threadId || "") + "____" + new_assistant_id + "_" + toolCallData.id;
|
|
13950
|
-
const
|
|
13890
|
+
const getStatusConfig = (status2) => {
|
|
13951
13891
|
switch (status2) {
|
|
13952
13892
|
case "success":
|
|
13953
13893
|
return {
|
|
@@ -13973,7 +13913,7 @@ var TaskCard = ({
|
|
|
13973
13913
|
};
|
|
13974
13914
|
}
|
|
13975
13915
|
};
|
|
13976
|
-
const statusConfig =
|
|
13916
|
+
const statusConfig = getStatusConfig(status);
|
|
13977
13917
|
const showResponse = status === "success" && response;
|
|
13978
13918
|
const handleCardClick = () => {
|
|
13979
13919
|
openSideApp({
|
|
@@ -14090,7 +14030,7 @@ import {
|
|
|
14090
14030
|
useCallback as useCallback24,
|
|
14091
14031
|
useEffect as useEffect29,
|
|
14092
14032
|
useMemo as useMemo11,
|
|
14093
|
-
useRef as
|
|
14033
|
+
useRef as useRef16,
|
|
14094
14034
|
useState as useState41,
|
|
14095
14035
|
useDeferredValue
|
|
14096
14036
|
} from "react";
|
|
@@ -15027,7 +14967,7 @@ var LazyBubble = ({
|
|
|
15027
14967
|
renderContent,
|
|
15028
14968
|
autoLoadRightPanel
|
|
15029
14969
|
}) => {
|
|
15030
|
-
const ref =
|
|
14970
|
+
const ref = useRef16(null);
|
|
15031
14971
|
const [isVisible, setIsVisible] = useState41(false);
|
|
15032
14972
|
const [wasEverVisible, setWasEverVisible] = useState41(false);
|
|
15033
14973
|
useEffect29(() => {
|
|
@@ -15086,7 +15026,7 @@ var MessageList = ({
|
|
|
15086
15026
|
const openSideApp = useSideAppOpener();
|
|
15087
15027
|
const rawDeferred = useDeferredValue(messages);
|
|
15088
15028
|
const deferredMessages = isLoading ? rawDeferred : messages;
|
|
15089
|
-
const messageLengthRef =
|
|
15029
|
+
const messageLengthRef = useRef16(deferredMessages?.length ?? 0);
|
|
15090
15030
|
useEffect29(() => {
|
|
15091
15031
|
if (deferredMessages?.length) {
|
|
15092
15032
|
messageLengthRef.current = deferredMessages?.length;
|
|
@@ -15223,7 +15163,7 @@ ${JSON.stringify(
|
|
|
15223
15163
|
// src/components/Chat/MessageViewPanel.tsx
|
|
15224
15164
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
15225
15165
|
var MessageGraph = React29.lazy(
|
|
15226
|
-
() => import("./MessageGraph-
|
|
15166
|
+
() => import("./MessageGraph-PVOC7XW4.mjs").then((m) => ({ default: m.MessageGraph }))
|
|
15227
15167
|
);
|
|
15228
15168
|
var MessageViewPanel = ({
|
|
15229
15169
|
messages,
|
|
@@ -15427,7 +15367,7 @@ import {
|
|
|
15427
15367
|
Space as Space22,
|
|
15428
15368
|
Typography as Typography31
|
|
15429
15369
|
} from "antd";
|
|
15430
|
-
import React43, { useCallback as useCallback30, useContext as useContext10, useDeferredValue as useDeferredValue2, useEffect as useEffect39, useLayoutEffect as useLayoutEffect4, useMemo as useMemo14, useRef as
|
|
15370
|
+
import React43, { useCallback as useCallback30, useContext as useContext10, useDeferredValue as useDeferredValue2, useEffect as useEffect39, useLayoutEffect as useLayoutEffect4, useMemo as useMemo14, useRef as useRef25, useState as useState53 } from "react";
|
|
15431
15371
|
import { BrainCircuit as BrainCircuit3 } from "lucide-react";
|
|
15432
15372
|
|
|
15433
15373
|
// src/components/GenUI/HITLContainer.tsx
|
|
@@ -16334,7 +16274,7 @@ var AgentLoadingSpinner = () => {
|
|
|
16334
16274
|
import { MessageOutlined, NodeIndexOutlined } from "@ant-design/icons";
|
|
16335
16275
|
|
|
16336
16276
|
// src/components/shared/SegmentedToggle.tsx
|
|
16337
|
-
import React31, { useCallback as useCallback26, useEffect as useEffect31, useLayoutEffect as useLayoutEffect3, useRef as
|
|
16277
|
+
import React31, { useCallback as useCallback26, useEffect as useEffect31, useLayoutEffect as useLayoutEffect3, useRef as useRef17, useState as useState44 } from "react";
|
|
16338
16278
|
import { Tooltip as Tooltip12, theme as theme4 } from "antd";
|
|
16339
16279
|
import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
16340
16280
|
function SegmentedToggle({
|
|
@@ -16348,7 +16288,7 @@ function SegmentedToggle({
|
|
|
16348
16288
|
style
|
|
16349
16289
|
}) {
|
|
16350
16290
|
const { token } = theme4.useToken();
|
|
16351
|
-
const itemRefs =
|
|
16291
|
+
const itemRefs = useRef17([]);
|
|
16352
16292
|
const [thumb, setThumb] = useState44({ left: 0, width: 0 });
|
|
16353
16293
|
const activeIndex = Math.max(
|
|
16354
16294
|
0,
|
|
@@ -16648,7 +16588,7 @@ var ThreadManagementButtons = () => {
|
|
|
16648
16588
|
};
|
|
16649
16589
|
|
|
16650
16590
|
// src/components/Chat/DatabasePicker.tsx
|
|
16651
|
-
import { useRef as
|
|
16591
|
+
import { useRef as useRef18, useState as useState45 } from "react";
|
|
16652
16592
|
import { Modal as Modal6, List as List5, Checkbox as Checkbox2, Spin as Spin8, Empty as Empty4, Typography as Typography25, Button as Button26, Space as Space18, Tooltip as Tooltip14 } from "antd";
|
|
16653
16593
|
import { Database } from "lucide-react";
|
|
16654
16594
|
import { Fragment as Fragment13, jsx as jsx68, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
@@ -16658,7 +16598,7 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
16658
16598
|
const [loading, setLoading] = useState45(false);
|
|
16659
16599
|
const [selectedDatabases, setSelectedDatabases] = useState45([]);
|
|
16660
16600
|
const { get } = useApi();
|
|
16661
|
-
const fetchedRef =
|
|
16601
|
+
const fetchedRef = useRef18(false);
|
|
16662
16602
|
const loadDatabases = async () => {
|
|
16663
16603
|
setLoading(true);
|
|
16664
16604
|
try {
|
|
@@ -16798,7 +16738,7 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
16798
16738
|
};
|
|
16799
16739
|
|
|
16800
16740
|
// src/components/Chat/SkillPicker.tsx
|
|
16801
|
-
import { useRef as
|
|
16741
|
+
import { useRef as useRef19, useState as useState46 } from "react";
|
|
16802
16742
|
import { Modal as Modal7, List as List6, Checkbox as Checkbox3, Spin as Spin9, Empty as Empty5, Typography as Typography26, Button as Button27, Space as Space19, Tooltip as Tooltip15 } from "antd";
|
|
16803
16743
|
import { BrainCircuit } from "lucide-react";
|
|
16804
16744
|
import { Fragment as Fragment14, jsx as jsx69, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
@@ -16808,7 +16748,7 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
|
16808
16748
|
const [loading, setLoading] = useState46(false);
|
|
16809
16749
|
const [selectedSkills, setSelectedSkills] = useState46([]);
|
|
16810
16750
|
const { get } = useApi();
|
|
16811
|
-
const fetchedRef =
|
|
16751
|
+
const fetchedRef = useRef19(false);
|
|
16812
16752
|
const loadSkills = async () => {
|
|
16813
16753
|
setLoading(true);
|
|
16814
16754
|
try {
|
|
@@ -17078,7 +17018,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
17078
17018
|
};
|
|
17079
17019
|
|
|
17080
17020
|
// src/components/Chat/MetricsDataSourcePicker.tsx
|
|
17081
|
-
import { useEffect as useEffect33, useState as useState48, useRef as
|
|
17021
|
+
import { useEffect as useEffect33, useState as useState48, useRef as useRef20 } from "react";
|
|
17082
17022
|
import { Modal as Modal9, List as List8, Spin as Spin11, Empty as Empty7, Typography as Typography28, Button as Button29, Tag as Tag8, Tooltip as Tooltip17 } from "antd";
|
|
17083
17023
|
import { Database as Database2, Check, Server as Server2 } from "lucide-react";
|
|
17084
17024
|
import { Fragment as Fragment16, jsx as jsx71, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
@@ -17093,7 +17033,7 @@ var MetricsDataSourcePicker = ({
|
|
|
17093
17033
|
const { config } = useLatticeChatShellContext();
|
|
17094
17034
|
const { customRunConfig, updateCustomRunConfig } = useConversationContext();
|
|
17095
17035
|
const { get } = useApi();
|
|
17096
|
-
const hasInitializedRef =
|
|
17036
|
+
const hasInitializedRef = useRef20(false);
|
|
17097
17037
|
const loadDataSources = async () => {
|
|
17098
17038
|
setLoading(true);
|
|
17099
17039
|
try {
|
|
@@ -17418,8 +17358,8 @@ var MetricsDataSourcePicker = ({
|
|
|
17418
17358
|
};
|
|
17419
17359
|
|
|
17420
17360
|
// src/components/Chat/ModelSelector.tsx
|
|
17421
|
-
import { useState as useState49, useEffect as useEffect34, useCallback as useCallback28, useRef as
|
|
17422
|
-
import { Select as
|
|
17361
|
+
import { useState as useState49, useEffect as useEffect34, useCallback as useCallback28, useRef as useRef21 } from "react";
|
|
17362
|
+
import { Select as Select4 } from "antd";
|
|
17423
17363
|
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
17424
17364
|
var STORAGE_KEY = "axiom-lattice:selected-model";
|
|
17425
17365
|
var getStoredModelKey = () => {
|
|
@@ -17446,8 +17386,8 @@ var ModelSelector = ({
|
|
|
17446
17386
|
const [internalValue, setInternalValue] = useState49(null);
|
|
17447
17387
|
const [dropdownOpen, setDropdownOpen] = useState49(false);
|
|
17448
17388
|
const [isHovered, setIsHovered] = useState49(false);
|
|
17449
|
-
const hasFetchedRef =
|
|
17450
|
-
const hasSetDefaultRef =
|
|
17389
|
+
const hasFetchedRef = useRef21(false);
|
|
17390
|
+
const hasSetDefaultRef = useRef21(false);
|
|
17451
17391
|
const { get } = useApi();
|
|
17452
17392
|
const selectedModelConfig = value !== void 0 ? value : internalValue;
|
|
17453
17393
|
const setSelectedModelConfig = useCallback28((config) => {
|
|
@@ -17507,7 +17447,7 @@ var ModelSelector = ({
|
|
|
17507
17447
|
transition: "background-color 0.2s ease"
|
|
17508
17448
|
},
|
|
17509
17449
|
children: /* @__PURE__ */ jsx72(
|
|
17510
|
-
|
|
17450
|
+
Select4,
|
|
17511
17451
|
{
|
|
17512
17452
|
variant: "borderless",
|
|
17513
17453
|
value: selectedModelConfig?.modelKey,
|
|
@@ -18181,7 +18121,7 @@ var BusinessAnalysisPrompts = ({
|
|
|
18181
18121
|
};
|
|
18182
18122
|
|
|
18183
18123
|
// src/components/Chat/VoiceInputButton.tsx
|
|
18184
|
-
import React40, { useCallback as useCallback29, useEffect as useEffect36, useRef as
|
|
18124
|
+
import React40, { useCallback as useCallback29, useEffect as useEffect36, useRef as useRef22, useState as useState52 } from "react";
|
|
18185
18125
|
import { Button as Button30, message as message9 } from "antd";
|
|
18186
18126
|
import { AudioLines, Loader2, AlertCircle } from "lucide-react";
|
|
18187
18127
|
import { createStyles as createStyles30 } from "antd-style";
|
|
@@ -18280,7 +18220,7 @@ var VoiceInputButton = ({
|
|
|
18280
18220
|
const isIdle = state.status === "idle";
|
|
18281
18221
|
const hasError = !!state.error;
|
|
18282
18222
|
const isAutoMode = state.mode === "auto";
|
|
18283
|
-
const lastErrorRef =
|
|
18223
|
+
const lastErrorRef = useRef22("");
|
|
18284
18224
|
React40.useEffect(() => {
|
|
18285
18225
|
if (state.error) {
|
|
18286
18226
|
const errorKey = `${state.error.type}:${state.error.message}`;
|
|
@@ -18418,17 +18358,17 @@ function buildReplaceChars(content, triggerChar) {
|
|
|
18418
18358
|
}
|
|
18419
18359
|
|
|
18420
18360
|
// src/components/Chat/InitialMessageSubmitter.tsx
|
|
18421
|
-
import { useEffect as useEffect37, useRef as
|
|
18361
|
+
import { useEffect as useEffect37, useRef as useRef23 } from "react";
|
|
18422
18362
|
function InitialMessageSubmitter({
|
|
18423
18363
|
request,
|
|
18424
18364
|
onSubmitted,
|
|
18425
18365
|
attemptedRequestIdsRef
|
|
18426
18366
|
}) {
|
|
18427
18367
|
const { isLoading, sendMessage, threadId } = useAgentChat();
|
|
18428
|
-
const localAttemptedRequestIdsRef =
|
|
18368
|
+
const localAttemptedRequestIdsRef = useRef23(/* @__PURE__ */ new Set());
|
|
18429
18369
|
const requestRegistryRef = attemptedRequestIdsRef ?? localAttemptedRequestIdsRef;
|
|
18430
|
-
const sendMessageRef =
|
|
18431
|
-
const onSubmittedRef =
|
|
18370
|
+
const sendMessageRef = useRef23(sendMessage);
|
|
18371
|
+
const onSubmittedRef = useRef23(onSubmitted);
|
|
18432
18372
|
useEffect37(() => {
|
|
18433
18373
|
sendMessageRef.current = sendMessage;
|
|
18434
18374
|
}, [sendMessage]);
|
|
@@ -18461,16 +18401,16 @@ function InitialMessageSubmitter({
|
|
|
18461
18401
|
}
|
|
18462
18402
|
|
|
18463
18403
|
// src/components/Chat/EmbedChatBridge.tsx
|
|
18464
|
-
import { useEffect as useEffect38, useRef as
|
|
18404
|
+
import { useEffect as useEffect38, useRef as useRef24 } from "react";
|
|
18465
18405
|
function EmbedChatBridge({ onReady, onMessage }) {
|
|
18466
18406
|
const { messages, isLoading, sendMessage, threadId } = useAgentChat();
|
|
18467
|
-
const sendMessageRef =
|
|
18407
|
+
const sendMessageRef = useRef24(sendMessage);
|
|
18468
18408
|
sendMessageRef.current = sendMessage;
|
|
18469
|
-
const onReadyRef =
|
|
18409
|
+
const onReadyRef = useRef24(onReady);
|
|
18470
18410
|
onReadyRef.current = onReady;
|
|
18471
|
-
const onMessageRef =
|
|
18411
|
+
const onMessageRef = useRef24(onMessage);
|
|
18472
18412
|
onMessageRef.current = onMessage;
|
|
18473
|
-
const readyAnnouncedRef =
|
|
18413
|
+
const readyAnnouncedRef = useRef24(false);
|
|
18474
18414
|
useEffect38(() => {
|
|
18475
18415
|
if (readyAnnouncedRef.current || !threadId) return;
|
|
18476
18416
|
readyAnnouncedRef.current = true;
|
|
@@ -18486,11 +18426,11 @@ function EmbedChatBridge({ onReady, onMessage }) {
|
|
|
18486
18426
|
}
|
|
18487
18427
|
});
|
|
18488
18428
|
}, [threadId]);
|
|
18489
|
-
const lastThreadIdRef =
|
|
18490
|
-
const seenIdsRef =
|
|
18491
|
-
const pendingAiIdsRef =
|
|
18492
|
-
const suppressingRef =
|
|
18493
|
-
const prevLoadingRef =
|
|
18429
|
+
const lastThreadIdRef = useRef24(null);
|
|
18430
|
+
const seenIdsRef = useRef24(/* @__PURE__ */ new Set());
|
|
18431
|
+
const pendingAiIdsRef = useRef24(/* @__PURE__ */ new Set());
|
|
18432
|
+
const suppressingRef = useRef24(true);
|
|
18433
|
+
const prevLoadingRef = useRef24(false);
|
|
18494
18434
|
useEffect38(() => {
|
|
18495
18435
|
if (lastThreadIdRef.current !== threadId) {
|
|
18496
18436
|
lastThreadIdRef.current = threadId;
|
|
@@ -18541,10 +18481,10 @@ function LegacyInitialMessageSubmitter({
|
|
|
18541
18481
|
onInitialMessageSent,
|
|
18542
18482
|
threadId
|
|
18543
18483
|
}) {
|
|
18544
|
-
const occurrenceRef =
|
|
18484
|
+
const occurrenceRef = useRef25(0);
|
|
18545
18485
|
const [occurrence, setOccurrence] = useState53(null);
|
|
18546
|
-
const committedOccurrenceRef =
|
|
18547
|
-
const onInitialMessageSentRef =
|
|
18486
|
+
const committedOccurrenceRef = useRef25(null);
|
|
18487
|
+
const onInitialMessageSentRef = useRef25(onInitialMessageSent);
|
|
18548
18488
|
useEffect39(() => {
|
|
18549
18489
|
onInitialMessageSentRef.current = onInitialMessageSent;
|
|
18550
18490
|
}, [onInitialMessageSent]);
|
|
@@ -18617,12 +18557,12 @@ var Chating = ({
|
|
|
18617
18557
|
onInitialMessageSent
|
|
18618
18558
|
}) => {
|
|
18619
18559
|
const [content, setContent] = useState53("");
|
|
18620
|
-
const contentRef =
|
|
18560
|
+
const contentRef = useRef25(content);
|
|
18621
18561
|
contentRef.current = content;
|
|
18622
18562
|
const [attachedFiles, setAttachedFiles] = useState53([]);
|
|
18623
18563
|
const { styles } = useStyle9();
|
|
18624
18564
|
const [headerOpen, setHeaderOpen] = useState53(false);
|
|
18625
|
-
const attachmentsRef =
|
|
18565
|
+
const attachmentsRef = useRef25(null);
|
|
18626
18566
|
const senderRef = React43.useRef(null);
|
|
18627
18567
|
const {
|
|
18628
18568
|
assistantId,
|
|
@@ -18657,7 +18597,7 @@ var Chating = ({
|
|
|
18657
18597
|
return () => clearInterval(interval);
|
|
18658
18598
|
}, [isStreaming]);
|
|
18659
18599
|
const conversationContext = useOptionalConversationContext();
|
|
18660
|
-
const systemContextSentRef =
|
|
18600
|
+
const systemContextSentRef = useRef25(false);
|
|
18661
18601
|
useEffect39(() => {
|
|
18662
18602
|
systemContextSentRef.current = false;
|
|
18663
18603
|
}, [threadId]);
|
|
@@ -19025,7 +18965,7 @@ ${nextContent}`;
|
|
|
19025
18965
|
}
|
|
19026
18966
|
return items;
|
|
19027
18967
|
}, [suggestionMode, skills, workspaceFiles, deferredFileQuery]);
|
|
19028
|
-
const activeIndexRef =
|
|
18968
|
+
const activeIndexRef = useRef25(0);
|
|
19029
18969
|
useEffect39(() => {
|
|
19030
18970
|
activeIndexRef.current = 0;
|
|
19031
18971
|
}, [suggestionItems]);
|
|
@@ -19204,6 +19144,7 @@ ${nextContent}`;
|
|
|
19204
19144
|
children: renderSender(true)
|
|
19205
19145
|
}
|
|
19206
19146
|
),
|
|
19147
|
+
Array.isArray(senderPromptsItems) && senderPromptsItems.length > 0 && /* @__PURE__ */ jsx76("div", { className: styles.promptsWrapper, style: { marginTop: 24 }, children: /* @__PURE__ */ jsx76(Prompts3, { items: senderPromptsItems, onItemClick: onPromptsItemClick }) }),
|
|
19207
19148
|
showQuickAnalysis && showSender && !(interrupts && interrupts.length > 0) && /* @__PURE__ */ jsx76("div", { style: { marginTop: 24 }, children: /* @__PURE__ */ jsx76(
|
|
19208
19149
|
BusinessAnalysisPrompts,
|
|
19209
19150
|
{
|
|
@@ -20514,7 +20455,7 @@ var TaskBoard = ({
|
|
|
20514
20455
|
};
|
|
20515
20456
|
|
|
20516
20457
|
// src/components/GenUI/elements/Mailbox.tsx
|
|
20517
|
-
import { useState as useState55, useMemo as useMemo16, useRef as
|
|
20458
|
+
import { useState as useState55, useMemo as useMemo16, useRef as useRef26, useEffect as useEffect41 } from "react";
|
|
20518
20459
|
import { jsx as jsx85, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
20519
20460
|
var useStyle16 = () => {
|
|
20520
20461
|
return {
|
|
@@ -20801,7 +20742,7 @@ var TeamChat = ({ data }) => {
|
|
|
20801
20742
|
const styles = useStyle16();
|
|
20802
20743
|
const { teamName, currentUser, teammates, messages, onSendMessage } = data || {};
|
|
20803
20744
|
const [inputValue, setInputValue] = useState55("");
|
|
20804
|
-
const messagesEndRef =
|
|
20745
|
+
const messagesEndRef = useRef26(null);
|
|
20805
20746
|
const sortedMessages = useMemo16(() => {
|
|
20806
20747
|
return [...messages || []].sort(
|
|
20807
20748
|
(a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime()
|
|
@@ -21533,7 +21474,7 @@ import { Button as Button37, Typography as Typography40 } from "antd";
|
|
|
21533
21474
|
import { ExpandOutlined } from "@ant-design/icons";
|
|
21534
21475
|
|
|
21535
21476
|
// src/streaming-html/StreamingHTMLRenderer.tsx
|
|
21536
|
-
import React48, { useEffect as useEffect42, useRef as
|
|
21477
|
+
import React48, { useEffect as useEffect42, useRef as useRef27, useCallback as useCallback32, useState as useState57 } from "react";
|
|
21537
21478
|
|
|
21538
21479
|
// src/streaming-html/show-widget-css-generator.ts
|
|
21539
21480
|
function generateShowWidgetCSS(tokens) {
|
|
@@ -22224,14 +22165,14 @@ var StreamingHTMLRenderer = ({
|
|
|
22224
22165
|
title = "Streaming HTML Content",
|
|
22225
22166
|
loadingMessages
|
|
22226
22167
|
}) => {
|
|
22227
|
-
const iframeRef =
|
|
22228
|
-
const containerRef =
|
|
22229
|
-
const resizeObserverRef =
|
|
22230
|
-
const prevHTMLRef =
|
|
22231
|
-
const isReadyRef =
|
|
22232
|
-
const pendingChunksRef =
|
|
22233
|
-
const isCompleteRef =
|
|
22234
|
-
const isScriptExecuted =
|
|
22168
|
+
const iframeRef = useRef27(null);
|
|
22169
|
+
const containerRef = useRef27(null);
|
|
22170
|
+
const resizeObserverRef = useRef27(null);
|
|
22171
|
+
const prevHTMLRef = useRef27("");
|
|
22172
|
+
const isReadyRef = useRef27(false);
|
|
22173
|
+
const pendingChunksRef = useRef27([]);
|
|
22174
|
+
const isCompleteRef = useRef27(isComplete);
|
|
22175
|
+
const isScriptExecuted = useRef27(false);
|
|
22235
22176
|
const [iframeHeight, setIframeHeight] = React48.useState(0);
|
|
22236
22177
|
const [iframeWidth, setIframeWidth] = React48.useState(void 0);
|
|
22237
22178
|
const [currentMessageIndex, setCurrentMessageIndex] = useState57(0);
|
|
@@ -22682,10 +22623,10 @@ var SearchCollectionResult = ({
|
|
|
22682
22623
|
// src/components/GenUI/elements/builtIns.tsx
|
|
22683
22624
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
22684
22625
|
var TasksSideApp = lazy(
|
|
22685
|
-
() => import("./TasksSideApp-
|
|
22626
|
+
() => import("./TasksSideApp-NNFCW65B.mjs").then((m) => ({ default: m.TasksSideApp }))
|
|
22686
22627
|
);
|
|
22687
22628
|
var TeamWorkspace = lazy(
|
|
22688
|
-
() => import("./TeamWorkspace-
|
|
22629
|
+
() => import("./TeamWorkspace-GS7C7E4X.mjs").then((m) => ({ default: m.TeamWorkspace }))
|
|
22689
22630
|
);
|
|
22690
22631
|
var elements = {
|
|
22691
22632
|
action_show_attachments_uploader: {
|
|
@@ -23003,7 +22944,7 @@ var LazyReactInfographic = lazy2(
|
|
|
23003
22944
|
() => import("./ReactInfographic-ONUZIC7W.mjs").then((m) => ({ default: m.ReactInfographic }))
|
|
23004
22945
|
);
|
|
23005
22946
|
var LazyReactChart = lazy2(
|
|
23006
|
-
() => import("./ReactChart-
|
|
22947
|
+
() => import("./ReactChart-BZTCD4P7.mjs").then((m) => ({ default: m.ReactChart }))
|
|
23007
22948
|
);
|
|
23008
22949
|
function BlockLoading() {
|
|
23009
22950
|
return /* @__PURE__ */ jsx94(
|
|
@@ -23822,4 +23763,4 @@ export {
|
|
|
23822
23763
|
http://jedwatson.github.io/classnames
|
|
23823
23764
|
*)
|
|
23824
23765
|
*/
|
|
23825
|
-
//# sourceMappingURL=chunk-
|
|
23766
|
+
//# sourceMappingURL=chunk-QPF4RBTJ.mjs.map
|