@axiom-lattice/react-sdk 2.1.84 → 2.1.85
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/index.js +290 -202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +191 -103
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -4117,6 +4117,9 @@ var useChatUIContext = () => {
|
|
|
4117
4117
|
// src/components/Chat/LatticeChat.tsx
|
|
4118
4118
|
import { createStyles as createStyles38 } from "antd-style";
|
|
4119
4119
|
|
|
4120
|
+
// src/components/Chat/ColumnLayout.tsx
|
|
4121
|
+
import { PanelLeft, X } from "lucide-react";
|
|
4122
|
+
|
|
4120
4123
|
// src/components/Chat/useStyle.tsx
|
|
4121
4124
|
import { createStyles as createStyles2 } from "antd-style";
|
|
4122
4125
|
var useStyle = createStyles2(({ token, css }) => {
|
|
@@ -4200,15 +4203,18 @@ var useStyle = createStyles2(({ token, css }) => {
|
|
|
4200
4203
|
bottom: 0;
|
|
4201
4204
|
z-index: 100;
|
|
4202
4205
|
background: ${token.colorBgLayout};
|
|
4203
|
-
border-right: 1px solid ${token.colorBorder};
|
|
4204
4206
|
box-shadow: ${token.boxShadow};
|
|
4205
4207
|
width: 0;
|
|
4206
4208
|
|
|
4207
4209
|
&.expanded {
|
|
4208
|
-
width:
|
|
4210
|
+
width: 280px;
|
|
4211
|
+
border-right: 1px solid ${token.colorBorder};
|
|
4209
4212
|
}
|
|
4210
4213
|
}
|
|
4211
4214
|
`,
|
|
4215
|
+
menuSnap: css`
|
|
4216
|
+
transition: none !important;
|
|
4217
|
+
`,
|
|
4212
4218
|
menuToggle: css`
|
|
4213
4219
|
position: relative;
|
|
4214
4220
|
bottom: 20px;
|
|
@@ -4287,6 +4293,46 @@ var useStyle = createStyles2(({ token, css }) => {
|
|
|
4287
4293
|
gap: 8px;
|
|
4288
4294
|
}
|
|
4289
4295
|
`,
|
|
4296
|
+
mobileMenuToggle: css`
|
|
4297
|
+
display: flex;
|
|
4298
|
+
align-items: center;
|
|
4299
|
+
justify-content: center;
|
|
4300
|
+
width: 32px;
|
|
4301
|
+
height: 32px;
|
|
4302
|
+
border-radius: ${token.borderRadius}px;
|
|
4303
|
+
border: 1px solid ${token.colorBorder};
|
|
4304
|
+
background: ${token.colorBgContainer};
|
|
4305
|
+
color: ${token.colorTextSecondary};
|
|
4306
|
+
cursor: pointer;
|
|
4307
|
+
transition: all 0.2s ease;
|
|
4308
|
+
|
|
4309
|
+
&:hover {
|
|
4310
|
+
background: ${token.colorPrimaryBg};
|
|
4311
|
+
color: ${token.colorPrimary};
|
|
4312
|
+
}
|
|
4313
|
+
`,
|
|
4314
|
+
mobilePanelClose: css`
|
|
4315
|
+
position: absolute;
|
|
4316
|
+
top: 12px;
|
|
4317
|
+
right: 12px;
|
|
4318
|
+
z-index: 5;
|
|
4319
|
+
display: flex;
|
|
4320
|
+
align-items: center;
|
|
4321
|
+
justify-content: center;
|
|
4322
|
+
width: 36px;
|
|
4323
|
+
height: 36px;
|
|
4324
|
+
border-radius: ${token.borderRadius}px;
|
|
4325
|
+
border: none;
|
|
4326
|
+
background: rgba(0, 0, 0, 0.06);
|
|
4327
|
+
color: ${token.colorTextSecondary};
|
|
4328
|
+
cursor: pointer;
|
|
4329
|
+
transition: all 0.2s ease;
|
|
4330
|
+
|
|
4331
|
+
&:hover {
|
|
4332
|
+
background: rgba(0, 0, 0, 0.12);
|
|
4333
|
+
color: ${token.colorText};
|
|
4334
|
+
}
|
|
4335
|
+
`,
|
|
4290
4336
|
chat: css`
|
|
4291
4337
|
width: 100%;
|
|
4292
4338
|
max-width: 1400px;
|
|
@@ -5018,20 +5064,35 @@ var ColumnLayout = ({
|
|
|
5018
5064
|
toolsVisible,
|
|
5019
5065
|
toolSelectedCard,
|
|
5020
5066
|
contentAppSelectedCard,
|
|
5021
|
-
menuCollapsed
|
|
5067
|
+
menuCollapsed,
|
|
5068
|
+
setMenuCollapsed,
|
|
5069
|
+
closeDetail,
|
|
5070
|
+
closeTools
|
|
5022
5071
|
} = useChatUIContext();
|
|
5023
5072
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
5024
5073
|
const isMenuCollapsed = menuCollapsed ?? (isMobile || detailVisible);
|
|
5074
|
+
const isAutoCollapsed = detailVisible && !isMobile;
|
|
5025
5075
|
const menuStateClass = isMenuCollapsed ? "collapsed" : "expanded";
|
|
5026
5076
|
const hasSidePanelsOpen = detailVisible || toolsVisible;
|
|
5027
5077
|
const resolvedDetailSize = toolsVisible && (detailSize || "large") === "large" ? "middle" : detailSize || "large";
|
|
5028
5078
|
return /* @__PURE__ */ jsxs5("div", { className: `fina_chat ${styles.layout}`, children: [
|
|
5029
|
-
menu && /* @__PURE__ */ jsxs5("div", { className: `${styles.menu} ${menuStateClass}`, children: [
|
|
5079
|
+
menu && /* @__PURE__ */ jsxs5("div", { className: `${styles.menu} ${menuStateClass} ${isAutoCollapsed ? styles.menuSnap : ""}`, children: [
|
|
5030
5080
|
logo,
|
|
5031
5081
|
menu
|
|
5032
5082
|
] }),
|
|
5033
5083
|
/* @__PURE__ */ jsxs5("div", { className: styles.contentArea, children: [
|
|
5034
|
-
header && /* @__PURE__ */
|
|
5084
|
+
(header || isMobile) && /* @__PURE__ */ jsxs5("div", { className: styles.header, children: [
|
|
5085
|
+
isMobile && /* @__PURE__ */ jsx12(
|
|
5086
|
+
"button",
|
|
5087
|
+
{
|
|
5088
|
+
className: styles.mobileMenuToggle,
|
|
5089
|
+
onClick: () => setMenuCollapsed(!isMenuCollapsed),
|
|
5090
|
+
"aria-label": "Toggle menu",
|
|
5091
|
+
children: /* @__PURE__ */ jsx12(PanelLeft, { size: 18 })
|
|
5092
|
+
}
|
|
5093
|
+
),
|
|
5094
|
+
header
|
|
5095
|
+
] }),
|
|
5035
5096
|
/* @__PURE__ */ jsxs5(
|
|
5036
5097
|
"div",
|
|
5037
5098
|
{
|
|
@@ -5039,14 +5100,36 @@ var ColumnLayout = ({
|
|
|
5039
5100
|
style: { gap: hasSidePanelsOpen ? void 0 : 0 },
|
|
5040
5101
|
children: [
|
|
5041
5102
|
/* @__PURE__ */ jsx12("div", { className: `${styles.mainContent} ${hasSidePanelsOpen ? "open" : ""}`, children: /* @__PURE__ */ jsx12("div", { className: `${styles.chat} ${contentAppSelectedCard ? "full_content_width" : ""}`, children: main }) }),
|
|
5042
|
-
/* @__PURE__ */
|
|
5103
|
+
/* @__PURE__ */ jsxs5(
|
|
5043
5104
|
"div",
|
|
5044
5105
|
{
|
|
5045
5106
|
className: `${styles.detailPanel} ${detailVisible ? `open ${resolvedDetailSize}` : ""}`,
|
|
5046
|
-
children:
|
|
5107
|
+
children: [
|
|
5108
|
+
detailVisible && isMobile && /* @__PURE__ */ jsx12(
|
|
5109
|
+
"button",
|
|
5110
|
+
{
|
|
5111
|
+
className: styles.mobilePanelClose,
|
|
5112
|
+
onClick: closeDetail,
|
|
5113
|
+
"aria-label": "Close detail panel",
|
|
5114
|
+
children: /* @__PURE__ */ jsx12(X, { size: 20 })
|
|
5115
|
+
}
|
|
5116
|
+
),
|
|
5117
|
+
detailVisible && detailSelectedCard && detail ? /* @__PURE__ */ jsx12("div", { className: styles.detailContent, children: detail }) : null
|
|
5118
|
+
]
|
|
5047
5119
|
}
|
|
5048
5120
|
),
|
|
5049
|
-
/* @__PURE__ */
|
|
5121
|
+
/* @__PURE__ */ jsxs5("div", { className: `${styles.toolPanel} ${toolsVisible ? "open" : ""}`, children: [
|
|
5122
|
+
toolsVisible && isMobile && /* @__PURE__ */ jsx12(
|
|
5123
|
+
"button",
|
|
5124
|
+
{
|
|
5125
|
+
className: styles.mobilePanelClose,
|
|
5126
|
+
onClick: closeTools,
|
|
5127
|
+
"aria-label": "Close tool panel",
|
|
5128
|
+
children: /* @__PURE__ */ jsx12(X, { size: 20 })
|
|
5129
|
+
}
|
|
5130
|
+
),
|
|
5131
|
+
toolsVisible && tools ? /* @__PURE__ */ jsx12("div", { className: styles.detailContent, children: tools }) : null
|
|
5132
|
+
] })
|
|
5050
5133
|
]
|
|
5051
5134
|
}
|
|
5052
5135
|
)
|
|
@@ -9108,7 +9191,7 @@ import {
|
|
|
9108
9191
|
Space as Space30,
|
|
9109
9192
|
Typography as Typography42
|
|
9110
9193
|
} from "antd";
|
|
9111
|
-
import React51, { useCallback as useCallback33, useContext as useContext11, useEffect as
|
|
9194
|
+
import React51, { useCallback as useCallback33, useContext as useContext11, useEffect as useEffect47, useRef as useRef23, useState as useState66 } from "react";
|
|
9112
9195
|
import { BrainCircuit as BrainCircuit3 } from "lucide-react";
|
|
9113
9196
|
|
|
9114
9197
|
// src/components/GenUI/HITLContainer.tsx
|
|
@@ -10171,17 +10254,17 @@ import React43, {
|
|
|
10171
10254
|
useContext as useContext10,
|
|
10172
10255
|
useState as useState58,
|
|
10173
10256
|
useCallback as useCallback31,
|
|
10174
|
-
useEffect as
|
|
10257
|
+
useEffect as useEffect42
|
|
10175
10258
|
} from "react";
|
|
10176
10259
|
import { WorkspaceClient, Client as Client2 } from "@axiom-lattice/client-sdk";
|
|
10177
10260
|
|
|
10178
10261
|
// src/components/Chat/WorkspaceResourceManager.tsx
|
|
10179
|
-
import { useMemo as useMemo20, useEffect as
|
|
10262
|
+
import { useMemo as useMemo20, useEffect as useEffect41, useRef as useRef17, useState as useState57 } from "react";
|
|
10180
10263
|
import { FolderOpen as FolderOpen2, Activity as Activity3, Database as Database4, Plug as Plug2, Bot as Bot2, Wrench, Zap, LogOut as LogOut3, Building2 as Building23, Key, Share2, History, Inbox, FlaskConical as FlaskConical3 } from "lucide-react";
|
|
10181
10264
|
import { Modal as Modal13, Avatar as Avatar8, Popover as Popover2, Button as Button41 } from "antd";
|
|
10182
10265
|
|
|
10183
10266
|
// src/components/Chat/Menu.tsx
|
|
10184
|
-
import React19, { useState as useState37, useMemo as useMemo10, useCallback as useCallback24 } from "react";
|
|
10267
|
+
import React19, { useState as useState37, useEffect as useEffect26, useMemo as useMemo10, useCallback as useCallback24 } from "react";
|
|
10185
10268
|
import { Drawer } from "antd";
|
|
10186
10269
|
import { Plus, ChevronRight, ChevronDown, Cpu, PanelLeftClose } from "lucide-react";
|
|
10187
10270
|
import { createStyles as createStyles16 } from "antd-style";
|
|
@@ -10295,6 +10378,11 @@ var Menu = ({
|
|
|
10295
10378
|
const isControlled = collapsed !== void 0;
|
|
10296
10379
|
const [internalIsIconView, setInternalIsIconView] = useState37(!defaultExpanded);
|
|
10297
10380
|
const isIconView = isControlled ? collapsed : internalIsIconView;
|
|
10381
|
+
useEffect26(() => {
|
|
10382
|
+
if (!isControlled) {
|
|
10383
|
+
onCollapsedChange?.(isIconView);
|
|
10384
|
+
}
|
|
10385
|
+
}, []);
|
|
10298
10386
|
const [drawerStates, setDrawerStates] = useState37({});
|
|
10299
10387
|
const [expandedInlineDrawers, setExpandedInlineDrawers] = useState37(
|
|
10300
10388
|
() => {
|
|
@@ -11008,7 +11096,7 @@ var ProjectCardList = () => {
|
|
|
11008
11096
|
};
|
|
11009
11097
|
|
|
11010
11098
|
// src/components/Chat/MetricsConfigDrawerContent.tsx
|
|
11011
|
-
import { useState as useState40, useEffect as
|
|
11099
|
+
import { useState as useState40, useEffect as useEffect27 } from "react";
|
|
11012
11100
|
import { Activity, Plus as Plus3, Edit2, Trash2, TestTube2, Loader2, Database, Settings, ChevronRight as ChevronRight2, ChevronLeft as ChevronLeft2, Check as Check2 } from "lucide-react";
|
|
11013
11101
|
import { Card as Card12, Button as Button25, Space as Space16, Typography as Typography17, Tag as Tag6, Modal as Modal3, message as message5, Input as Input5, Select, Popconfirm, Steps, Checkbox as Checkbox2, Spin as Spin5, theme as theme3 } from "antd";
|
|
11014
11102
|
import { jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
@@ -11025,7 +11113,7 @@ var MetricsConfigDrawerContent = () => {
|
|
|
11025
11113
|
const [formModalOpen, setFormModalOpen] = useState40(false);
|
|
11026
11114
|
const [editingConfig, setEditingConfig] = useState40(null);
|
|
11027
11115
|
const tenantId = config.headers?.["x-tenant-id"] || "default";
|
|
11028
|
-
|
|
11116
|
+
useEffect27(() => {
|
|
11029
11117
|
loadConfigs();
|
|
11030
11118
|
}, [tenantId]);
|
|
11031
11119
|
const loadConfigs = async () => {
|
|
@@ -11271,12 +11359,12 @@ var MetricsConfigFormModal = ({
|
|
|
11271
11359
|
selectedDataSources: editingConfig?.config?.selectedDataSources || []
|
|
11272
11360
|
});
|
|
11273
11361
|
};
|
|
11274
|
-
|
|
11362
|
+
useEffect27(() => {
|
|
11275
11363
|
if (open) {
|
|
11276
11364
|
resetForm();
|
|
11277
11365
|
}
|
|
11278
11366
|
}, [open, editingConfig]);
|
|
11279
|
-
|
|
11367
|
+
useEffect27(() => {
|
|
11280
11368
|
if (currentStep === 1 && availableDatasources.length === 0 && !fetchingDatasources) {
|
|
11281
11369
|
handleFetchDatasources();
|
|
11282
11370
|
}
|
|
@@ -11674,7 +11762,7 @@ var MetricsConfigFormModal = ({
|
|
|
11674
11762
|
};
|
|
11675
11763
|
|
|
11676
11764
|
// src/components/Chat/DatabaseConfigDrawerContent.tsx
|
|
11677
|
-
import { useState as useState41, useEffect as
|
|
11765
|
+
import { useState as useState41, useEffect as useEffect28 } from "react";
|
|
11678
11766
|
import { createStyles as createStyles18 } from "antd-style";
|
|
11679
11767
|
import { Database as Database2, Plus as Plus4, Edit2 as Edit22, Trash2 as Trash22, TestTube2 as TestTube22, Loader2 as Loader22 } from "lucide-react";
|
|
11680
11768
|
import { Card as Card13, Button as Button26, Space as Space17, Typography as Typography18, Tag as Tag7, Modal as Modal4, message as message6, Input as Input6, Select as Select2, Popconfirm as Popconfirm2 } from "antd";
|
|
@@ -11753,7 +11841,7 @@ var DatabaseConfigDrawerContent = ({
|
|
|
11753
11841
|
const [testingId, setTestingId] = useState41(null);
|
|
11754
11842
|
const [formModalOpen, setFormModalOpen] = useState41(false);
|
|
11755
11843
|
const [editingConfig, setEditingConfig] = useState41(null);
|
|
11756
|
-
|
|
11844
|
+
useEffect28(() => {
|
|
11757
11845
|
loadConfigs();
|
|
11758
11846
|
}, [tenantId]);
|
|
11759
11847
|
const loadConfigs = async () => {
|
|
@@ -12186,7 +12274,7 @@ var DatabaseConfigFormModal = ({
|
|
|
12186
12274
|
};
|
|
12187
12275
|
|
|
12188
12276
|
// src/components/Chat/McpConfigDrawerContent.tsx
|
|
12189
|
-
import { useState as useState42, useEffect as
|
|
12277
|
+
import { useState as useState42, useEffect as useEffect29 } from "react";
|
|
12190
12278
|
import { Plug, Plus as Plus5, Edit2 as Edit23, Trash2 as Trash23, TestTube2 as TestTube23, Loader2 as Loader23, Settings as Settings2, Database as Database3, ChevronRight as ChevronRight3, ChevronLeft as ChevronLeft3, Check as Check3, Terminal, Globe, Server } from "lucide-react";
|
|
12191
12279
|
import { Card as Card14, Button as Button27, Space as Space18, Typography as Typography19, Tag as Tag8, Modal as Modal5, message as message7, Input as Input7, Select as Select3, Popconfirm as Popconfirm3, Steps as Steps2, Checkbox as Checkbox3, Spin as Spin6, theme as theme4, Collapse as Collapse7 } from "antd";
|
|
12192
12280
|
import { Fragment as Fragment9, jsx as jsx61, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
@@ -12205,7 +12293,7 @@ var McpConfigDrawerContent = ({
|
|
|
12205
12293
|
const [testingId, setTestingId] = useState42(null);
|
|
12206
12294
|
const [formModalOpen, setFormModalOpen] = useState42(false);
|
|
12207
12295
|
const [editingConfig, setEditingConfig] = useState42(null);
|
|
12208
|
-
|
|
12296
|
+
useEffect29(() => {
|
|
12209
12297
|
loadConfigs();
|
|
12210
12298
|
}, [tenantId]);
|
|
12211
12299
|
const loadConfigs = async () => {
|
|
@@ -12463,12 +12551,12 @@ var McpConfigFormModal = ({
|
|
|
12463
12551
|
selectedTools: editingConfig?.selectedTools || []
|
|
12464
12552
|
});
|
|
12465
12553
|
};
|
|
12466
|
-
|
|
12554
|
+
useEffect29(() => {
|
|
12467
12555
|
if (open) {
|
|
12468
12556
|
resetForm();
|
|
12469
12557
|
}
|
|
12470
12558
|
}, [open, editingConfig]);
|
|
12471
|
-
|
|
12559
|
+
useEffect29(() => {
|
|
12472
12560
|
if (currentStep === 1 && availableTools.length === 0 && !fetchingTools) {
|
|
12473
12561
|
handleFetchTools();
|
|
12474
12562
|
}
|
|
@@ -12819,7 +12907,7 @@ var McpConfigFormModal = ({
|
|
|
12819
12907
|
};
|
|
12820
12908
|
|
|
12821
12909
|
// src/components/Chat/AssistantFlow.tsx
|
|
12822
|
-
import { useMemo as useMemo13, useEffect as
|
|
12910
|
+
import { useMemo as useMemo13, useEffect as useEffect32, useState as useState46, useCallback as useCallback27, useRef as useRef15 } from "react";
|
|
12823
12911
|
import {
|
|
12824
12912
|
ReactFlow,
|
|
12825
12913
|
Background,
|
|
@@ -13625,7 +13713,7 @@ var AssistantNode = ({
|
|
|
13625
13713
|
var AssistantNode_default = AssistantNode;
|
|
13626
13714
|
|
|
13627
13715
|
// src/components/Chat/AgentConfigPanel.tsx
|
|
13628
|
-
import { useState as useState43, useEffect as
|
|
13716
|
+
import { useState as useState43, useEffect as useEffect30, useMemo as useMemo12, useCallback as useCallback25, useRef as useRef14 } from "react";
|
|
13629
13717
|
import {
|
|
13630
13718
|
Form as Form4,
|
|
13631
13719
|
Input as Input8,
|
|
@@ -13890,7 +13978,7 @@ var SkillListField = ({ propertyKey, label, value, onChange, token }) => {
|
|
|
13890
13978
|
const [loading, setLoading] = useState43(false);
|
|
13891
13979
|
const { get } = useApi();
|
|
13892
13980
|
const fetchedRef = useRef14(false);
|
|
13893
|
-
|
|
13981
|
+
useEffect30(() => {
|
|
13894
13982
|
if (fetchedRef.current) return;
|
|
13895
13983
|
fetchedRef.current = true;
|
|
13896
13984
|
const fetchSkills = async () => {
|
|
@@ -14001,7 +14089,7 @@ var DatabaseListField = ({ propertyKey, label, value, onChange, token }) => {
|
|
|
14001
14089
|
const [loading, setLoading] = useState43(false);
|
|
14002
14090
|
const { get } = useApi();
|
|
14003
14091
|
const fetchedRef = useRef14(false);
|
|
14004
|
-
|
|
14092
|
+
useEffect30(() => {
|
|
14005
14093
|
if (fetchedRef.current) return;
|
|
14006
14094
|
fetchedRef.current = true;
|
|
14007
14095
|
const fetchDatabases = async () => {
|
|
@@ -14116,7 +14204,7 @@ var MetricsListField = ({ propertyKey, label, value, onChange, token }) => {
|
|
|
14116
14204
|
const [loading, setLoading] = useState43(false);
|
|
14117
14205
|
const { get } = useApi();
|
|
14118
14206
|
const fetchedRef = useRef14(false);
|
|
14119
|
-
|
|
14207
|
+
useEffect30(() => {
|
|
14120
14208
|
if (fetchedRef.current) return;
|
|
14121
14209
|
fetchedRef.current = true;
|
|
14122
14210
|
const fetchMetricsServers = async () => {
|
|
@@ -14562,7 +14650,7 @@ var AgentConfigPanel = ({
|
|
|
14562
14650
|
setToolsLoading(false);
|
|
14563
14651
|
}
|
|
14564
14652
|
}, [get, visible]);
|
|
14565
|
-
|
|
14653
|
+
useEffect30(() => {
|
|
14566
14654
|
if (visible && assistant) {
|
|
14567
14655
|
fetchTools();
|
|
14568
14656
|
if (parsedConfig) {
|
|
@@ -15234,7 +15322,7 @@ import {
|
|
|
15234
15322
|
import { PlusOutlined as PlusOutlined3, ForkOutlined as ForkOutlined2 } from "@ant-design/icons";
|
|
15235
15323
|
|
|
15236
15324
|
// src/components/Chat/ParentAgentSelector.tsx
|
|
15237
|
-
import { useEffect as
|
|
15325
|
+
import { useEffect as useEffect31, useState as useState44 } from "react";
|
|
15238
15326
|
import { Select as Select5, Typography as Typography22 } from "antd";
|
|
15239
15327
|
import { jsx as jsx64, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
15240
15328
|
var { Text: Text19 } = Typography22;
|
|
@@ -15246,7 +15334,7 @@ var ParentAgentSelector = ({
|
|
|
15246
15334
|
const [assistants, setAssistants] = useState44([]);
|
|
15247
15335
|
const [loading, setLoading] = useState44(false);
|
|
15248
15336
|
const { get } = useApi();
|
|
15249
|
-
|
|
15337
|
+
useEffect31(() => {
|
|
15250
15338
|
const fetchAssistants = async () => {
|
|
15251
15339
|
setLoading(true);
|
|
15252
15340
|
try {
|
|
@@ -15830,10 +15918,10 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
15830
15918
|
setAssistantsLoading(false);
|
|
15831
15919
|
}
|
|
15832
15920
|
};
|
|
15833
|
-
|
|
15921
|
+
useEffect32(() => {
|
|
15834
15922
|
fetchAssistants();
|
|
15835
15923
|
}, []);
|
|
15836
|
-
|
|
15924
|
+
useEffect32(() => {
|
|
15837
15925
|
if (!assistants || assistants.length === 0) {
|
|
15838
15926
|
setNodes([]);
|
|
15839
15927
|
setEdges([]);
|
|
@@ -16097,7 +16185,7 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
16097
16185
|
});
|
|
16098
16186
|
lastCreatedAssistantRef.current = createdAssistant;
|
|
16099
16187
|
};
|
|
16100
|
-
|
|
16188
|
+
useEffect32(() => {
|
|
16101
16189
|
if (selectedAssistant) {
|
|
16102
16190
|
const node = nodes.find((n) => n.id === selectedAssistant.id);
|
|
16103
16191
|
if (node) {
|
|
@@ -16105,7 +16193,7 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
16105
16193
|
}
|
|
16106
16194
|
}
|
|
16107
16195
|
}, [selectedAssistant, nodes, setCenter]);
|
|
16108
|
-
|
|
16196
|
+
useEffect32(() => {
|
|
16109
16197
|
if (assistants.length > 0 && selectedAssistant) {
|
|
16110
16198
|
const assistant = assistants.find((a) => a.id === selectedAssistant.id);
|
|
16111
16199
|
if (assistant && !configPanelVisible) {
|
|
@@ -16114,7 +16202,7 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
16114
16202
|
}
|
|
16115
16203
|
}, [assistants, selectedAssistant, configPanelVisible]);
|
|
16116
16204
|
const lastCreatedAssistantRef = useRef15(null);
|
|
16117
|
-
|
|
16205
|
+
useEffect32(() => {
|
|
16118
16206
|
if (lastCreatedAssistantRef.current && !assistants.find((a) => a.id === lastCreatedAssistantRef.current?.id)) {
|
|
16119
16207
|
lastCreatedAssistantRef.current = null;
|
|
16120
16208
|
}
|
|
@@ -16229,7 +16317,7 @@ var AssistantFlow = (props) => /* @__PURE__ */ jsx67(ReactFlowProvider, { childr
|
|
|
16229
16317
|
var AssistantFlow_default = AssistantFlow;
|
|
16230
16318
|
|
|
16231
16319
|
// src/components/Chat/SkillFlow.tsx
|
|
16232
|
-
import { useMemo as useMemo15, useEffect as
|
|
16320
|
+
import { useMemo as useMemo15, useEffect as useEffect34, useState as useState49 } from "react";
|
|
16233
16321
|
import {
|
|
16234
16322
|
ReactFlow as ReactFlow2,
|
|
16235
16323
|
Background as Background2,
|
|
@@ -16243,7 +16331,7 @@ import { Button as Button33, theme as theme12 } from "antd";
|
|
|
16243
16331
|
import { PlusOutlined as PlusOutlined7 } from "@ant-design/icons";
|
|
16244
16332
|
|
|
16245
16333
|
// src/components/Chat/SkillNode.tsx
|
|
16246
|
-
import { useEffect as
|
|
16334
|
+
import { useEffect as useEffect33, useMemo as useMemo14, useState as useState47 } from "react";
|
|
16247
16335
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
16248
16336
|
import {
|
|
16249
16337
|
Avatar as Avatar5,
|
|
@@ -16343,7 +16431,7 @@ var SkillNode = ({ data }) => {
|
|
|
16343
16431
|
);
|
|
16344
16432
|
const [isModalOpen, setIsModalOpen] = useState47(false);
|
|
16345
16433
|
const [saving, setSaving] = useState47(false);
|
|
16346
|
-
|
|
16434
|
+
useEffect33(() => {
|
|
16347
16435
|
setIsEditing(false);
|
|
16348
16436
|
setCurrentSkill(skill);
|
|
16349
16437
|
setDraftSkill({ ...skill, id: skill.name });
|
|
@@ -17767,10 +17855,10 @@ var SkillFlowInner = ({ onNodeClick }) => {
|
|
|
17767
17855
|
setSkillsLoading(false);
|
|
17768
17856
|
}
|
|
17769
17857
|
};
|
|
17770
|
-
|
|
17858
|
+
useEffect34(() => {
|
|
17771
17859
|
fetchSkills();
|
|
17772
17860
|
}, []);
|
|
17773
|
-
|
|
17861
|
+
useEffect34(() => {
|
|
17774
17862
|
if (!skills || skills.length === 0) {
|
|
17775
17863
|
setNodes([]);
|
|
17776
17864
|
setEdges([]);
|
|
@@ -17979,7 +18067,7 @@ var SkillFlow_default = SkillFlow;
|
|
|
17979
18067
|
// src/components/Chat/ToolsList.tsx
|
|
17980
18068
|
import { List as List6, Avatar as Avatar6, theme as theme13, Alert as Alert7, Button as Button34, Tag as Tag13 } from "antd";
|
|
17981
18069
|
import { ReloadOutlined } from "@ant-design/icons";
|
|
17982
|
-
import { useEffect as
|
|
18070
|
+
import { useEffect as useEffect35, useState as useState50, useCallback as useCallback28 } from "react";
|
|
17983
18071
|
import { jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
17984
18072
|
var ToolsList = ({
|
|
17985
18073
|
onToolSelect,
|
|
@@ -18025,7 +18113,7 @@ var ToolsList = ({
|
|
|
18025
18113
|
const handleRefresh = useCallback28(() => {
|
|
18026
18114
|
fetchTools();
|
|
18027
18115
|
}, [fetchTools]);
|
|
18028
|
-
|
|
18116
|
+
useEffect35(() => {
|
|
18029
18117
|
if (autoLoad) {
|
|
18030
18118
|
fetchTools();
|
|
18031
18119
|
}
|
|
@@ -18215,7 +18303,7 @@ var ToolsList = ({
|
|
|
18215
18303
|
};
|
|
18216
18304
|
|
|
18217
18305
|
// src/components/Chat/TopologyAutomationView.tsx
|
|
18218
|
-
import { useEffect as
|
|
18306
|
+
import { useEffect as useEffect37, useState as useState51, useCallback as useCallback29, useMemo as useMemo17 } from "react";
|
|
18219
18307
|
import {
|
|
18220
18308
|
ReactFlow as ReactFlow3,
|
|
18221
18309
|
Background as Background3,
|
|
@@ -18467,7 +18555,7 @@ var CopilotPanel = ({
|
|
|
18467
18555
|
};
|
|
18468
18556
|
|
|
18469
18557
|
// src/components/Chat/CreateWorkflowModal.tsx
|
|
18470
|
-
import { useEffect as
|
|
18558
|
+
import { useEffect as useEffect36 } from "react";
|
|
18471
18559
|
import { Modal as Modal10, Form as Form7, Input as Input13 } from "antd";
|
|
18472
18560
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
18473
18561
|
function extractName(purpose) {
|
|
@@ -18492,7 +18580,7 @@ var CreateWorkflowModal = ({
|
|
|
18492
18580
|
}) => {
|
|
18493
18581
|
const { post } = useApi();
|
|
18494
18582
|
const [form] = Form7.useForm();
|
|
18495
|
-
|
|
18583
|
+
useEffect36(() => {
|
|
18496
18584
|
if (open) {
|
|
18497
18585
|
form.resetFields();
|
|
18498
18586
|
}
|
|
@@ -18684,7 +18772,7 @@ function TopologyFlowInner({
|
|
|
18684
18772
|
const [edges, setEdges, onEdgesChange] = useEdgesState3(initialEdges);
|
|
18685
18773
|
const [specModalOpen, setSpecModalOpen] = useState51(false);
|
|
18686
18774
|
const nodeTypes2 = useMemo17(() => ({ topologyNode: TopologyNode_default }), []);
|
|
18687
|
-
|
|
18775
|
+
useEffect37(() => {
|
|
18688
18776
|
setNodes(initialNodes);
|
|
18689
18777
|
setEdges(initialEdges);
|
|
18690
18778
|
}, [initialNodes, initialEdges, setNodes, setEdges]);
|
|
@@ -18934,7 +19022,7 @@ var TopologyAutomationView = () => {
|
|
|
18934
19022
|
}
|
|
18935
19023
|
setError(null);
|
|
18936
19024
|
}, [get]);
|
|
18937
|
-
|
|
19025
|
+
useEffect37(() => {
|
|
18938
19026
|
let cancelled = false;
|
|
18939
19027
|
const load = async () => {
|
|
18940
19028
|
try {
|
|
@@ -19103,7 +19191,7 @@ var TopologyAutomationView = () => {
|
|
|
19103
19191
|
};
|
|
19104
19192
|
|
|
19105
19193
|
// src/components/Chat/TopologyRuntimeView.tsx
|
|
19106
|
-
import { useEffect as
|
|
19194
|
+
import { useEffect as useEffect38, useState as useState52, useMemo as useMemo18, useCallback as useCallback30, useRef as useRef16 } from "react";
|
|
19107
19195
|
import {
|
|
19108
19196
|
Spin as Spin9,
|
|
19109
19197
|
Empty as Empty6,
|
|
@@ -19422,11 +19510,11 @@ function FlowCanvas({ steps }) {
|
|
|
19422
19510
|
() => steps.find((s) => s.id === selectedNodeId) || null,
|
|
19423
19511
|
[steps, selectedNodeId]
|
|
19424
19512
|
);
|
|
19425
|
-
|
|
19513
|
+
useEffect38(() => {
|
|
19426
19514
|
setNodes(initialNodes);
|
|
19427
19515
|
setEdges(initialEdges);
|
|
19428
19516
|
}, [initialNodes, initialEdges, setNodes, setEdges]);
|
|
19429
|
-
|
|
19517
|
+
useEffect38(() => {
|
|
19430
19518
|
if (selectedNodeId) {
|
|
19431
19519
|
setNodes(
|
|
19432
19520
|
(nds) => nds.map((n) => ({
|
|
@@ -19643,12 +19731,12 @@ var RunDetail = ({ run, agentName, open, onClose, onRunUpdate, autoRefresh, onAu
|
|
|
19643
19731
|
} catch {
|
|
19644
19732
|
}
|
|
19645
19733
|
}, [get, run.id, onRunUpdate]);
|
|
19646
|
-
|
|
19734
|
+
useEffect38(() => {
|
|
19647
19735
|
if (!open) return;
|
|
19648
19736
|
setLoading(true);
|
|
19649
19737
|
fetchSteps().finally(() => setLoading(false));
|
|
19650
19738
|
}, [open, run.id, fetchSteps]);
|
|
19651
|
-
|
|
19739
|
+
useEffect38(() => {
|
|
19652
19740
|
if (stepsPollTimeoutRef.current) {
|
|
19653
19741
|
clearTimeout(stepsPollTimeoutRef.current);
|
|
19654
19742
|
stepsPollTimeoutRef.current = null;
|
|
@@ -19762,7 +19850,7 @@ var TopologyRuntimeView = () => {
|
|
|
19762
19850
|
setLoading(false);
|
|
19763
19851
|
}
|
|
19764
19852
|
}, [get]);
|
|
19765
|
-
|
|
19853
|
+
useEffect38(() => {
|
|
19766
19854
|
let cancelled = false;
|
|
19767
19855
|
const init2 = async () => {
|
|
19768
19856
|
try {
|
|
@@ -19798,7 +19886,7 @@ var TopologyRuntimeView = () => {
|
|
|
19798
19886
|
cancelled = true;
|
|
19799
19887
|
};
|
|
19800
19888
|
}, [get]);
|
|
19801
|
-
|
|
19889
|
+
useEffect38(() => {
|
|
19802
19890
|
return () => {
|
|
19803
19891
|
pollingSessionRef.current = 0;
|
|
19804
19892
|
};
|
|
@@ -19906,7 +19994,7 @@ var TopologyRuntimeView = () => {
|
|
|
19906
19994
|
};
|
|
19907
19995
|
|
|
19908
19996
|
// src/components/Chat/TopologyInboxView.tsx
|
|
19909
|
-
import { useEffect as
|
|
19997
|
+
import { useEffect as useEffect39, useState as useState53 } from "react";
|
|
19910
19998
|
import { Card as Card18, Typography as Typography31, Spin as Spin10, Empty as Empty7, List as List8, Button as Button37, Space as Space24, Tag as Tag17 } from "antd";
|
|
19911
19999
|
import { InboxOutlined, ReloadOutlined as ReloadOutlined3 } from "@ant-design/icons";
|
|
19912
20000
|
import { jsx as jsx77, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
@@ -19941,7 +20029,7 @@ var TopologyInboxView = () => {
|
|
|
19941
20029
|
setLoading(false);
|
|
19942
20030
|
}
|
|
19943
20031
|
};
|
|
19944
|
-
|
|
20032
|
+
useEffect39(() => {
|
|
19945
20033
|
fetchInbox();
|
|
19946
20034
|
}, [get]);
|
|
19947
20035
|
return /* @__PURE__ */ jsxs51("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
@@ -20380,7 +20468,7 @@ var EvalSuiteDetail = ({ projectId, suiteId, onBack, onRun }) => {
|
|
|
20380
20468
|
};
|
|
20381
20469
|
|
|
20382
20470
|
// src/components/Eval/EvalRunResults.tsx
|
|
20383
|
-
import { useEffect as
|
|
20471
|
+
import { useEffect as useEffect40, useState as useState55 } from "react";
|
|
20384
20472
|
import { createStyles as createStyles21 } from "antd-style";
|
|
20385
20473
|
import { Button as Button39, Card as Card21, Typography as Typography34, Progress as Progress4, Tag as Tag19, Table as Table4, Empty as Empty10, Popconfirm as Popconfirm8, message as message13 } from "antd";
|
|
20386
20474
|
import { CheckCircle, XCircle, Trash2 as Trash26 } from "lucide-react";
|
|
@@ -20471,7 +20559,7 @@ var EvalRunResults = ({ runId, onBack }) => {
|
|
|
20471
20559
|
const client = useClient("__GLOBAL__");
|
|
20472
20560
|
const [run, setRun] = useState55(null);
|
|
20473
20561
|
const { status: streamingStatus, progress, connected } = useEvalRunStream(runId);
|
|
20474
|
-
|
|
20562
|
+
useEffect40(() => {
|
|
20475
20563
|
client.eval.runs.get(runId).then(setRun).catch(console.error);
|
|
20476
20564
|
}, [runId, client]);
|
|
20477
20565
|
if (!run) {
|
|
@@ -21198,7 +21286,7 @@ var WorkspaceResourceManager = ({
|
|
|
21198
21286
|
const { openContentApp, menuCollapsed, setMenuCollapsed } = useChatUIContext();
|
|
21199
21287
|
const hasOpenedDefault = useRef17(false);
|
|
21200
21288
|
const hasRegistered = useRef17(false);
|
|
21201
|
-
|
|
21289
|
+
useEffect41(() => {
|
|
21202
21290
|
if (!hasRegistered.current) {
|
|
21203
21291
|
hasRegistered.current = true;
|
|
21204
21292
|
regsiterElement("workspace_projects", {
|
|
@@ -21290,7 +21378,7 @@ var WorkspaceResourceManager = ({
|
|
|
21290
21378
|
});
|
|
21291
21379
|
}
|
|
21292
21380
|
};
|
|
21293
|
-
|
|
21381
|
+
useEffect41(() => {
|
|
21294
21382
|
if (!hasOpenedDefault.current && menuItems.length > 0) {
|
|
21295
21383
|
hasOpenedDefault.current = true;
|
|
21296
21384
|
const firstRoute = menuItems.find((item) => item.type === "route");
|
|
@@ -21515,7 +21603,7 @@ var WorkspaceContextProvider = ({
|
|
|
21515
21603
|
Client2.setWorkspaceContext(wsId || void 0, pjId || void 0);
|
|
21516
21604
|
}
|
|
21517
21605
|
}, []);
|
|
21518
|
-
|
|
21606
|
+
useEffect42(() => {
|
|
21519
21607
|
Client2.setWorkspaceContext(workspaceId || void 0, projectId || void 0);
|
|
21520
21608
|
}, [workspaceId, projectId]);
|
|
21521
21609
|
const [workspaces, setWorkspaces] = useState58([]);
|
|
@@ -21542,7 +21630,7 @@ var WorkspaceContextProvider = ({
|
|
|
21542
21630
|
setWorkspaces([]);
|
|
21543
21631
|
resetSelectedWorkspace();
|
|
21544
21632
|
}, [resetSelectedWorkspace, setWorkspaces]);
|
|
21545
|
-
|
|
21633
|
+
useEffect42(() => {
|
|
21546
21634
|
resetWS();
|
|
21547
21635
|
refreshWorkspaces();
|
|
21548
21636
|
}, [tenantId]);
|
|
@@ -21575,28 +21663,28 @@ var WorkspaceContextProvider = ({
|
|
|
21575
21663
|
setLoading(false);
|
|
21576
21664
|
}
|
|
21577
21665
|
}, [client, workspaceId]);
|
|
21578
|
-
|
|
21666
|
+
useEffect42(() => {
|
|
21579
21667
|
if (workspaceId && typeof window !== "undefined") {
|
|
21580
21668
|
sessionStorage.setItem("workspaceId", workspaceId);
|
|
21581
21669
|
}
|
|
21582
21670
|
}, [workspaceId]);
|
|
21583
|
-
|
|
21671
|
+
useEffect42(() => {
|
|
21584
21672
|
if (projectId && typeof window !== "undefined") {
|
|
21585
21673
|
sessionStorage.setItem("projectId", projectId);
|
|
21586
21674
|
}
|
|
21587
21675
|
}, [projectId]);
|
|
21588
|
-
|
|
21676
|
+
useEffect42(() => {
|
|
21589
21677
|
refreshWorkspaces().catch((err) => {
|
|
21590
21678
|
console.warn("Failed to load workspaces:", err);
|
|
21591
21679
|
});
|
|
21592
21680
|
}, [refreshWorkspaces]);
|
|
21593
|
-
|
|
21681
|
+
useEffect42(() => {
|
|
21594
21682
|
if (workspaces.length > 0 && !workspaceId) {
|
|
21595
21683
|
const firstWorkspace = workspaces[0];
|
|
21596
21684
|
setWorkspaceId(firstWorkspace.id);
|
|
21597
21685
|
}
|
|
21598
21686
|
}, [workspaces, workspaceId]);
|
|
21599
|
-
|
|
21687
|
+
useEffect42(() => {
|
|
21600
21688
|
if (workspaceId) {
|
|
21601
21689
|
refreshProjects(workspaceId);
|
|
21602
21690
|
} else {
|
|
@@ -22228,7 +22316,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
22228
22316
|
};
|
|
22229
22317
|
|
|
22230
22318
|
// src/components/Chat/MetricsDataSourcePicker.tsx
|
|
22231
|
-
import { useEffect as
|
|
22319
|
+
import { useEffect as useEffect44, useState as useState62, useRef as useRef21 } from "react";
|
|
22232
22320
|
import { Modal as Modal17, List as List12, Spin as Spin15, Empty as Empty14, Typography as Typography39, Button as Button45, Tag as Tag21, Tooltip as Tooltip17 } from "antd";
|
|
22233
22321
|
import { Database as Database6, Check as Check4, Server as Server3 } from "lucide-react";
|
|
22234
22322
|
import { Fragment as Fragment17, jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
@@ -22317,7 +22405,7 @@ var MetricsDataSourcePicker = ({
|
|
|
22317
22405
|
console.error("Failed to save datasource to sessionStorage:", error);
|
|
22318
22406
|
}
|
|
22319
22407
|
};
|
|
22320
|
-
|
|
22408
|
+
useEffect44(() => {
|
|
22321
22409
|
if (hasInitializedRef.current) return;
|
|
22322
22410
|
hasInitializedRef.current = true;
|
|
22323
22411
|
loadDataSources().then(() => {
|
|
@@ -22568,7 +22656,7 @@ var MetricsDataSourcePicker = ({
|
|
|
22568
22656
|
};
|
|
22569
22657
|
|
|
22570
22658
|
// src/components/Chat/ModelSelector.tsx
|
|
22571
|
-
import { useState as useState63, useEffect as
|
|
22659
|
+
import { useState as useState63, useEffect as useEffect45, useCallback as useCallback32, useRef as useRef22 } from "react";
|
|
22572
22660
|
import { Select as Select7 } from "antd";
|
|
22573
22661
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
22574
22662
|
var ModelSelector = ({
|
|
@@ -22613,7 +22701,7 @@ var ModelSelector = ({
|
|
|
22613
22701
|
setIsLoading(false);
|
|
22614
22702
|
}
|
|
22615
22703
|
}, [get, defaultModelKey]);
|
|
22616
|
-
|
|
22704
|
+
useEffect45(() => {
|
|
22617
22705
|
fetchModels();
|
|
22618
22706
|
}, [fetchModels]);
|
|
22619
22707
|
const handleChange = (modelKey) => {
|
|
@@ -22676,7 +22764,7 @@ import {
|
|
|
22676
22764
|
} from "@ant-design/icons";
|
|
22677
22765
|
import { Prompts } from "@ant-design/x";
|
|
22678
22766
|
import { Space as Space28, Typography as Typography40, Spin as Spin16 } from "antd";
|
|
22679
|
-
import { useEffect as
|
|
22767
|
+
import { useEffect as useEffect46, useState as useState64, useMemo as useMemo21 } from "react";
|
|
22680
22768
|
import { BrainCircuit as BrainCircuit2 } from "lucide-react";
|
|
22681
22769
|
import { jsx as jsx89, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
22682
22770
|
var categoryConfig = {
|
|
@@ -22766,7 +22854,7 @@ var SkillCategoryPrompts = ({
|
|
|
22766
22854
|
const [showAll, setShowAll] = useState64(false);
|
|
22767
22855
|
const { get } = useApi();
|
|
22768
22856
|
const MAX_SIMPLE_ITEMS = 10;
|
|
22769
|
-
|
|
22857
|
+
useEffect46(() => {
|
|
22770
22858
|
const loadSkills = async () => {
|
|
22771
22859
|
setLoading(true);
|
|
22772
22860
|
try {
|
|
@@ -23366,7 +23454,7 @@ var Chating = ({
|
|
|
23366
23454
|
const isInputDisabled = interrupts && interrupts.length > 0;
|
|
23367
23455
|
const typingFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
23368
23456
|
const [typingFrameIndex, setTypingFrameIndex] = useState66(0);
|
|
23369
|
-
|
|
23457
|
+
useEffect47(() => {
|
|
23370
23458
|
if (!isStreaming) return;
|
|
23371
23459
|
const interval = setInterval(() => {
|
|
23372
23460
|
setTypingFrameIndex((prev) => (prev + 1) % typingFrames.length);
|
|
@@ -23377,13 +23465,13 @@ var Chating = ({
|
|
|
23377
23465
|
const systemContextSentRef = useRef23(false);
|
|
23378
23466
|
const initialMessageSentRef = useRef23(false);
|
|
23379
23467
|
const prevLoadingRef = useRef23(false);
|
|
23380
|
-
|
|
23468
|
+
useEffect47(() => {
|
|
23381
23469
|
systemContextSentRef.current = false;
|
|
23382
23470
|
}, [threadId]);
|
|
23383
|
-
|
|
23471
|
+
useEffect47(() => {
|
|
23384
23472
|
initialMessageSentRef.current = false;
|
|
23385
23473
|
}, [threadId]);
|
|
23386
|
-
|
|
23474
|
+
useEffect47(() => {
|
|
23387
23475
|
const wasLoading = prevLoadingRef.current;
|
|
23388
23476
|
prevLoadingRef.current = isLoading;
|
|
23389
23477
|
if (wasLoading && !isLoading && initialMessage && threadId && !initialMessageSentRef.current) {
|
|
@@ -23404,7 +23492,7 @@ var Chating = ({
|
|
|
23404
23492
|
}, [updateCustomRunConfig]);
|
|
23405
23493
|
const [isEmptyState, setIsEmptyState] = useState66(showEmptyState && messages.length === 0 && !pendingMessages?.length);
|
|
23406
23494
|
const [isTransitioning, setIsTransitioning] = useState66(false);
|
|
23407
|
-
|
|
23495
|
+
useEffect47(() => {
|
|
23408
23496
|
if (!showEmptyState) {
|
|
23409
23497
|
setIsEmptyState(false);
|
|
23410
23498
|
return;
|
|
@@ -23491,7 +23579,7 @@ var Chating = ({
|
|
|
23491
23579
|
setSuggestionsLoading(false);
|
|
23492
23580
|
}
|
|
23493
23581
|
};
|
|
23494
|
-
|
|
23582
|
+
useEffect47(() => {
|
|
23495
23583
|
regsiterElement("action_show_attachments_uploader", {
|
|
23496
23584
|
card_view: () => null,
|
|
23497
23585
|
action: (data) => {
|
|
@@ -24093,7 +24181,7 @@ var InternetSearchCard = ({
|
|
|
24093
24181
|
};
|
|
24094
24182
|
|
|
24095
24183
|
// src/components/GenUI/elements/schedule_viewer.tsx
|
|
24096
|
-
import { useState as useState67, useEffect as
|
|
24184
|
+
import { useState as useState67, useEffect as useEffect48, useCallback as useCallback34 } from "react";
|
|
24097
24185
|
import {
|
|
24098
24186
|
Tag as Tag22,
|
|
24099
24187
|
Button as Button48,
|
|
@@ -24322,12 +24410,12 @@ var ScheduleViewer = ({ data }) => {
|
|
|
24322
24410
|
},
|
|
24323
24411
|
[client, handleRefresh]
|
|
24324
24412
|
);
|
|
24325
|
-
|
|
24413
|
+
useEffect48(() => {
|
|
24326
24414
|
if (threadId && (!initialTasks || initialTasks.length === 0)) {
|
|
24327
24415
|
handleRefresh();
|
|
24328
24416
|
}
|
|
24329
24417
|
}, [threadId]);
|
|
24330
|
-
|
|
24418
|
+
useEffect48(() => {
|
|
24331
24419
|
if (initialTasks) {
|
|
24332
24420
|
setTasks(initialTasks);
|
|
24333
24421
|
}
|
|
@@ -28086,7 +28174,7 @@ var TaskBoard = ({
|
|
|
28086
28174
|
};
|
|
28087
28175
|
|
|
28088
28176
|
// src/components/GenUI/elements/Mailbox.tsx
|
|
28089
|
-
import { useState as useState73, useMemo as useMemo29, useRef as useRef24, useEffect as
|
|
28177
|
+
import { useState as useState73, useMemo as useMemo29, useRef as useRef24, useEffect as useEffect49 } from "react";
|
|
28090
28178
|
import { jsx as jsx109, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
28091
28179
|
var useStyle16 = () => {
|
|
28092
28180
|
return {
|
|
@@ -28382,7 +28470,7 @@ var TeamChat = ({ data }) => {
|
|
|
28382
28470
|
const mentions = useMemo29(() => {
|
|
28383
28471
|
return teammates?.map((t) => t.name) || [];
|
|
28384
28472
|
}, [teammates]);
|
|
28385
|
-
|
|
28473
|
+
useEffect49(() => {
|
|
28386
28474
|
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
28387
28475
|
}, [sortedMessages]);
|
|
28388
28476
|
const handleSend = () => {
|
|
@@ -28556,7 +28644,7 @@ import { Button as Button53, Typography as Typography56 } from "antd";
|
|
|
28556
28644
|
import { ExpandOutlined as ExpandOutlined2 } from "@ant-design/icons";
|
|
28557
28645
|
|
|
28558
28646
|
// src/streaming-html/StreamingHTMLRenderer.tsx
|
|
28559
|
-
import React61, { useEffect as
|
|
28647
|
+
import React61, { useEffect as useEffect50, useRef as useRef25, useCallback as useCallback35, useState as useState74 } from "react";
|
|
28560
28648
|
|
|
28561
28649
|
// src/streaming-html/show-widget-css-generator.ts
|
|
28562
28650
|
function generateShowWidgetCSS(tokens) {
|
|
@@ -29259,10 +29347,10 @@ var StreamingHTMLRenderer = ({
|
|
|
29259
29347
|
const [iframeWidth, setIframeWidth] = React61.useState(void 0);
|
|
29260
29348
|
const [currentMessageIndex, setCurrentMessageIndex] = useState74(0);
|
|
29261
29349
|
const [showLoading, setShowLoading] = useState74(true);
|
|
29262
|
-
|
|
29350
|
+
useEffect50(() => {
|
|
29263
29351
|
isCompleteRef.current = isComplete;
|
|
29264
29352
|
}, [isComplete]);
|
|
29265
|
-
|
|
29353
|
+
useEffect50(() => {
|
|
29266
29354
|
if (iframeHeight > 0) {
|
|
29267
29355
|
setShowLoading(false);
|
|
29268
29356
|
return;
|
|
@@ -29338,7 +29426,7 @@ var StreamingHTMLRenderer = ({
|
|
|
29338
29426
|
onError?.(streamingError);
|
|
29339
29427
|
}
|
|
29340
29428
|
}, [onError]);
|
|
29341
|
-
|
|
29429
|
+
useEffect50(() => {
|
|
29342
29430
|
const handleMessage = (event) => {
|
|
29343
29431
|
const iframe = iframeRef.current;
|
|
29344
29432
|
if (!iframe || event.source !== iframe.contentWindow) {
|
|
@@ -29391,7 +29479,7 @@ var StreamingHTMLRenderer = ({
|
|
|
29391
29479
|
window.removeEventListener("message", handleMessage);
|
|
29392
29480
|
};
|
|
29393
29481
|
}, [onError, onPrompt, sendChunk, executeScripts]);
|
|
29394
|
-
|
|
29482
|
+
useEffect50(() => {
|
|
29395
29483
|
if (html === prevHTMLRef.current) {
|
|
29396
29484
|
return;
|
|
29397
29485
|
}
|
|
@@ -29402,12 +29490,12 @@ var StreamingHTMLRenderer = ({
|
|
|
29402
29490
|
sendChunk(newChunk);
|
|
29403
29491
|
}
|
|
29404
29492
|
}, [html, sendChunk]);
|
|
29405
|
-
|
|
29493
|
+
useEffect50(() => {
|
|
29406
29494
|
if (isComplete && isReadyRef.current) {
|
|
29407
29495
|
executeScripts();
|
|
29408
29496
|
}
|
|
29409
29497
|
}, [isComplete, executeScripts]);
|
|
29410
|
-
|
|
29498
|
+
useEffect50(() => {
|
|
29411
29499
|
const container = containerRef.current;
|
|
29412
29500
|
if (!container) return;
|
|
29413
29501
|
const antBubble = container.closest(".ant-bubble");
|
|
@@ -29433,7 +29521,7 @@ var StreamingHTMLRenderer = ({
|
|
|
29433
29521
|
resizeObserverRef.current = null;
|
|
29434
29522
|
};
|
|
29435
29523
|
}, []);
|
|
29436
|
-
|
|
29524
|
+
useEffect50(() => {
|
|
29437
29525
|
return () => {
|
|
29438
29526
|
isReadyRef.current = false;
|
|
29439
29527
|
pendingChunksRef.current = [];
|
|
@@ -29746,7 +29834,7 @@ var regsiterElement = (language, ElementMeta) => {
|
|
|
29746
29834
|
// src/components/Chat/SideAppViewBrowser.tsx
|
|
29747
29835
|
import { Dropdown as Dropdown3, Tooltip as Tooltip23 } from "antd";
|
|
29748
29836
|
import { createStyles as createStyles34 } from "antd-style";
|
|
29749
|
-
import { useEffect as
|
|
29837
|
+
import { useEffect as useEffect51, useMemo as useMemo30, useState as useState75 } from "react";
|
|
29750
29838
|
import { Fragment as Fragment21, jsx as jsx113, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
29751
29839
|
var useStyle17 = createStyles34(({ token, css }) => {
|
|
29752
29840
|
return {
|
|
@@ -29978,7 +30066,7 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
29978
30066
|
const switchTab = (key) => {
|
|
29979
30067
|
setActiveKey(key);
|
|
29980
30068
|
};
|
|
29981
|
-
|
|
30069
|
+
useEffect51(() => {
|
|
29982
30070
|
if (!selectedCard) return;
|
|
29983
30071
|
const key = JSON.stringify(selectedCard);
|
|
29984
30072
|
if (items.find((item) => item.key === key)) {
|
|
@@ -30498,7 +30586,7 @@ var ProjectSelector = ({
|
|
|
30498
30586
|
};
|
|
30499
30587
|
|
|
30500
30588
|
// src/components/Chat/ToolPanelFiles.tsx
|
|
30501
|
-
import { useCallback as useCallback39, useEffect as
|
|
30589
|
+
import { useCallback as useCallback39, useEffect as useEffect52, useMemo as useMemo32, useState as useState77 } from "react";
|
|
30502
30590
|
import { message as message19 } from "antd";
|
|
30503
30591
|
|
|
30504
30592
|
// src/components/Chat/FileDirectoryPanel.tsx
|
|
@@ -30924,7 +31012,7 @@ var ToolPanelFiles = () => {
|
|
|
30924
31012
|
setDirectoryLoading((prev) => ({ ...prev, [path]: false }));
|
|
30925
31013
|
}
|
|
30926
31014
|
}, [directoryExpanded, listPath, currentAssistant?.id]);
|
|
30927
|
-
|
|
31015
|
+
useEffect52(() => {
|
|
30928
31016
|
resourceFolders.forEach((folder) => {
|
|
30929
31017
|
void loadAssetsForFolder(folder, false);
|
|
30930
31018
|
});
|
|
@@ -31682,7 +31770,7 @@ var LatticeChatView = (props) => {
|
|
|
31682
31770
|
};
|
|
31683
31771
|
|
|
31684
31772
|
// src/components/Chat/SettingsModal.tsx
|
|
31685
|
-
import { useState as useState79, useEffect as
|
|
31773
|
+
import { useState as useState79, useEffect as useEffect53, useRef as useRef27 } from "react";
|
|
31686
31774
|
import {
|
|
31687
31775
|
Modal as Modal22,
|
|
31688
31776
|
Input as Input16,
|
|
@@ -32096,7 +32184,7 @@ var SettingsModal = ({
|
|
|
32096
32184
|
});
|
|
32097
32185
|
const [serverConfigs, setServerConfigs] = useState79({});
|
|
32098
32186
|
const connectionsRef = useRef27(connections);
|
|
32099
|
-
|
|
32187
|
+
useEffect53(() => {
|
|
32100
32188
|
connectionsRef.current = connections;
|
|
32101
32189
|
}, [connections]);
|
|
32102
32190
|
const [activeTabKey, setActiveTabKey] = useState79(
|
|
@@ -32298,7 +32386,7 @@ var SettingsModal = ({
|
|
|
32298
32386
|
console.error("Failed to load models configuration:", error);
|
|
32299
32387
|
}
|
|
32300
32388
|
};
|
|
32301
|
-
|
|
32389
|
+
useEffect53(() => {
|
|
32302
32390
|
if (open && activeTabKey) {
|
|
32303
32391
|
initializeServerConfig(activeTabKey);
|
|
32304
32392
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
@@ -32307,7 +32395,7 @@ var SettingsModal = ({
|
|
|
32307
32395
|
}
|
|
32308
32396
|
}
|
|
32309
32397
|
}, [open, activeTabKey]);
|
|
32310
|
-
|
|
32398
|
+
useEffect53(() => {
|
|
32311
32399
|
if (open && activeTabKey) {
|
|
32312
32400
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
32313
32401
|
if (connection?.connected) {
|
|
@@ -33087,7 +33175,7 @@ var LatticeChatShell = (props) => {
|
|
|
33087
33175
|
};
|
|
33088
33176
|
|
|
33089
33177
|
// src/components/Chat/ChannelInstallationsDrawerContent.tsx
|
|
33090
|
-
import { useEffect as
|
|
33178
|
+
import { useEffect as useEffect54, useState as useState80 } from "react";
|
|
33091
33179
|
import {
|
|
33092
33180
|
Button as Button58,
|
|
33093
33181
|
Card as Card30,
|
|
@@ -33129,7 +33217,7 @@ var ChannelInstallationsDrawerContent = () => {
|
|
|
33129
33217
|
setLoading(false);
|
|
33130
33218
|
}
|
|
33131
33219
|
};
|
|
33132
|
-
|
|
33220
|
+
useEffect54(() => {
|
|
33133
33221
|
loadInstallations();
|
|
33134
33222
|
}, []);
|
|
33135
33223
|
const handleDelete = async (installation) => {
|
|
@@ -33277,7 +33365,7 @@ var ChannelInstallationsDrawerContent = () => {
|
|
|
33277
33365
|
};
|
|
33278
33366
|
var LarkChannelInstallationFormModal = ({ installation, open, post, put, onCancel, onSave }) => {
|
|
33279
33367
|
const [form] = Form9.useForm();
|
|
33280
|
-
|
|
33368
|
+
useEffect54(() => {
|
|
33281
33369
|
if (installation) {
|
|
33282
33370
|
const config = installation.config;
|
|
33283
33371
|
form.setFieldsValue({
|