@axiom-lattice/react-sdk 2.1.44 → 2.1.46
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.d.mts +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +46 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +123 -91
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6344,7 +6344,7 @@ import {
|
|
|
6344
6344
|
DownOutlined,
|
|
6345
6345
|
UpOutlined
|
|
6346
6346
|
} from "@ant-design/icons";
|
|
6347
|
-
import { useState as useState22 } from "react";
|
|
6347
|
+
import { useState as useState22, useEffect as useEffect14 } from "react";
|
|
6348
6348
|
import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6349
6349
|
var { Text: Text7 } = Typography8;
|
|
6350
6350
|
var useStyle3 = createStyles8(({ token, css }) => ({
|
|
@@ -6377,10 +6377,26 @@ var Todo = ({
|
|
|
6377
6377
|
data,
|
|
6378
6378
|
component_key,
|
|
6379
6379
|
interactive = true,
|
|
6380
|
-
focusMode = false
|
|
6380
|
+
focusMode = false,
|
|
6381
|
+
smartCollapse = true
|
|
6381
6382
|
}) => {
|
|
6382
6383
|
const { styles } = useStyle3();
|
|
6383
|
-
const
|
|
6384
|
+
const getDefaultExpanded = () => {
|
|
6385
|
+
if (!data || !Array.isArray(data) || data.length <= 3) {
|
|
6386
|
+
return true;
|
|
6387
|
+
}
|
|
6388
|
+
const allPending = data.every((item) => item.status === "pending");
|
|
6389
|
+
const allCompleted = data.every((item) => item.status === "completed");
|
|
6390
|
+
return allPending || allCompleted;
|
|
6391
|
+
};
|
|
6392
|
+
const [isExpanded, setIsExpanded] = useState22(
|
|
6393
|
+
() => smartCollapse ? getDefaultExpanded() : false
|
|
6394
|
+
);
|
|
6395
|
+
useEffect14(() => {
|
|
6396
|
+
if (smartCollapse) {
|
|
6397
|
+
setIsExpanded(getDefaultExpanded());
|
|
6398
|
+
}
|
|
6399
|
+
}, [data, smartCollapse]);
|
|
6384
6400
|
const getStatusIcon3 = (status) => {
|
|
6385
6401
|
switch (status) {
|
|
6386
6402
|
case "completed":
|
|
@@ -6567,7 +6583,7 @@ var WriteTodos = ({
|
|
|
6567
6583
|
};
|
|
6568
6584
|
|
|
6569
6585
|
// src/components/GenUI/FileExplorer.tsx
|
|
6570
|
-
import { useState as useState23, useEffect as
|
|
6586
|
+
import { useState as useState23, useEffect as useEffect15, useMemo as useMemo8 } from "react";
|
|
6571
6587
|
import { Splitter, Tree, Empty } from "antd";
|
|
6572
6588
|
import {
|
|
6573
6589
|
FolderOutlined,
|
|
@@ -6854,7 +6870,7 @@ var FileExplorer = ({
|
|
|
6854
6870
|
const [fileList, setFileList] = useState23([]);
|
|
6855
6871
|
const [selectedKey, setSelectedKey] = useState23("");
|
|
6856
6872
|
const [expandedKeys, setExpandedKeys] = useState23([]);
|
|
6857
|
-
|
|
6873
|
+
useEffect15(() => {
|
|
6858
6874
|
let list = [];
|
|
6859
6875
|
if (Array.isArray(files)) {
|
|
6860
6876
|
list = files;
|
|
@@ -6874,7 +6890,7 @@ var FileExplorer = ({
|
|
|
6874
6890
|
() => buildTreeData(fileList, expandedKeys),
|
|
6875
6891
|
[fileList, expandedKeys]
|
|
6876
6892
|
);
|
|
6877
|
-
|
|
6893
|
+
useEffect15(() => {
|
|
6878
6894
|
if (treeData.length > 0 && expandedKeys.length === 0) {
|
|
6879
6895
|
const getAllKeys = (nodes) => {
|
|
6880
6896
|
let keys = [];
|
|
@@ -7164,7 +7180,7 @@ var AttachmentsCard = ({
|
|
|
7164
7180
|
|
|
7165
7181
|
// src/components/GenUI/elements/attachments_viewer_side_app.tsx
|
|
7166
7182
|
import { Button as Button13, Empty as Empty2, Skeleton } from "antd";
|
|
7167
|
-
import { useEffect as
|
|
7183
|
+
import { useEffect as useEffect16, useState as useState25 } from "react";
|
|
7168
7184
|
|
|
7169
7185
|
// src/components/GenUI/RenderMDFromURL.tsx
|
|
7170
7186
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
@@ -7191,7 +7207,7 @@ function AttachmentsViewerSideApp({
|
|
|
7191
7207
|
url: full_url || "",
|
|
7192
7208
|
fileName: extractFileName(file_id || "")
|
|
7193
7209
|
});
|
|
7194
|
-
|
|
7210
|
+
useEffect16(() => {
|
|
7195
7211
|
setFileUri({
|
|
7196
7212
|
url: full_url || "",
|
|
7197
7213
|
fileName: extractFileName(file_id || "")
|
|
@@ -7235,7 +7251,7 @@ function AttachmentsViewerSideApp({
|
|
|
7235
7251
|
import { Button as Button14, Space as Space10, Typography as Typography11 } from "antd";
|
|
7236
7252
|
|
|
7237
7253
|
// src/components/GenUI/elements/ContentPreviewCollapse.tsx
|
|
7238
|
-
import { useRef as useRef11, useState as useState26, useEffect as
|
|
7254
|
+
import { useRef as useRef11, useState as useState26, useEffect as useEffect17, useCallback as useCallback15 } from "react";
|
|
7239
7255
|
import { Collapse as Collapse5 } from "antd";
|
|
7240
7256
|
import { createStyles as createStyles10 } from "antd-style";
|
|
7241
7257
|
import { DownOutlined as DownOutlined3, UpOutlined as UpOutlined2 } from "@ant-design/icons";
|
|
@@ -7316,7 +7332,7 @@ var ContentPreviewCollapse = ({
|
|
|
7316
7332
|
setIsOverflowing(scrollHeight > collapsedMaxHeight);
|
|
7317
7333
|
}
|
|
7318
7334
|
}, [collapsedMaxHeight]);
|
|
7319
|
-
|
|
7335
|
+
useEffect17(() => {
|
|
7320
7336
|
const element = contentRef.current;
|
|
7321
7337
|
if (!element) return;
|
|
7322
7338
|
checkOverflow();
|
|
@@ -7666,8 +7682,12 @@ var TaskCard = ({
|
|
|
7666
7682
|
const { description, subagent_type, assignee } = toolCallData?.args || {};
|
|
7667
7683
|
const status = toolCallData.status || "pending";
|
|
7668
7684
|
const response = toolCallData.response || null;
|
|
7669
|
-
const { threadId } = useAgentChat();
|
|
7670
|
-
|
|
7685
|
+
const { threadId, assistantId } = useAgentChat();
|
|
7686
|
+
let new_assistant_id = subagent_type;
|
|
7687
|
+
if (subagent_type === "general-purpose") {
|
|
7688
|
+
new_assistant_id = assistantId + "-general-purpose";
|
|
7689
|
+
}
|
|
7690
|
+
const subagent_thread_id = (threadId || "") + "____" + new_assistant_id + "_" + toolCallData.id;
|
|
7671
7691
|
const getStatusConfig3 = (status2) => {
|
|
7672
7692
|
switch (status2) {
|
|
7673
7693
|
case "success":
|
|
@@ -7703,7 +7723,7 @@ var TaskCard = ({
|
|
|
7703
7723
|
data: {
|
|
7704
7724
|
thread_id: subagent_thread_id,
|
|
7705
7725
|
description,
|
|
7706
|
-
subagent_type
|
|
7726
|
+
subagent_type: new_assistant_id
|
|
7707
7727
|
}
|
|
7708
7728
|
});
|
|
7709
7729
|
};
|
|
@@ -7805,7 +7825,7 @@ import ErrorBoundary from "antd/es/alert/ErrorBoundary";
|
|
|
7805
7825
|
import {
|
|
7806
7826
|
memo,
|
|
7807
7827
|
useCallback as useCallback16,
|
|
7808
|
-
useEffect as
|
|
7828
|
+
useEffect as useEffect18,
|
|
7809
7829
|
useMemo as useMemo9,
|
|
7810
7830
|
useRef as useRef12,
|
|
7811
7831
|
useState as useState27
|
|
@@ -7819,7 +7839,7 @@ var LazyBubble = ({
|
|
|
7819
7839
|
const ref = useRef12(null);
|
|
7820
7840
|
const [isVisible, setIsVisible] = useState27(false);
|
|
7821
7841
|
const [wasEverVisible, setWasEverVisible] = useState27(false);
|
|
7822
|
-
|
|
7842
|
+
useEffect18(() => {
|
|
7823
7843
|
const observer = new IntersectionObserver(
|
|
7824
7844
|
([entry]) => {
|
|
7825
7845
|
const visible = entry.isIntersecting;
|
|
@@ -7839,7 +7859,7 @@ var LazyBubble = ({
|
|
|
7839
7859
|
}
|
|
7840
7860
|
};
|
|
7841
7861
|
}, [wasEverVisible]);
|
|
7842
|
-
|
|
7862
|
+
useEffect18(() => {
|
|
7843
7863
|
autoLoadRightPanel?.();
|
|
7844
7864
|
}, []);
|
|
7845
7865
|
const getPlaceholder = () => {
|
|
@@ -7872,7 +7892,7 @@ var MessageList = ({
|
|
|
7872
7892
|
const { styles } = useStyle();
|
|
7873
7893
|
const { openSideApp } = useChatUIContext();
|
|
7874
7894
|
const messageLengthRef = useRef12(messages?.length ?? 0);
|
|
7875
|
-
|
|
7895
|
+
useEffect18(() => {
|
|
7876
7896
|
if (messages?.length) {
|
|
7877
7897
|
messageLengthRef.current = messages?.length;
|
|
7878
7898
|
}
|
|
@@ -7982,7 +8002,7 @@ import {
|
|
|
7982
8002
|
Space as Space21,
|
|
7983
8003
|
Typography as Typography22
|
|
7984
8004
|
} from "antd";
|
|
7985
|
-
import React27, { useContext as useContext10, useEffect as
|
|
8005
|
+
import React27, { useContext as useContext10, useEffect as useEffect24, useRef as useRef18, useState as useState39 } from "react";
|
|
7986
8006
|
import { BrainCircuit as BrainCircuit3 } from "lucide-react";
|
|
7987
8007
|
|
|
7988
8008
|
// src/components/GenUI/HITLContainer.tsx
|
|
@@ -8408,7 +8428,7 @@ var FileExplorerButton = ({}) => {
|
|
|
8408
8428
|
};
|
|
8409
8429
|
|
|
8410
8430
|
// src/components/Chat/ScheduleButton.tsx
|
|
8411
|
-
import { useState as useState28, useCallback as useCallback17, useEffect as
|
|
8431
|
+
import { useState as useState28, useCallback as useCallback17, useEffect as useEffect19 } from "react";
|
|
8412
8432
|
import { Tooltip as Tooltip6, Button as Button18, Spin as Spin3 } from "antd";
|
|
8413
8433
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
8414
8434
|
import { ScheduledTaskStatus } from "@axiom-lattice/client-sdk";
|
|
@@ -8440,7 +8460,7 @@ var ScheduleButton = ({
|
|
|
8440
8460
|
setLoading(false);
|
|
8441
8461
|
}
|
|
8442
8462
|
}, [client, threadId]);
|
|
8443
|
-
|
|
8463
|
+
useEffect19(() => {
|
|
8444
8464
|
fetchScheduledTasks();
|
|
8445
8465
|
}, [fetchScheduledTasks]);
|
|
8446
8466
|
if (!threadId) {
|
|
@@ -8506,7 +8526,7 @@ import { Button as Button19, Tooltip as Tooltip7 } from "antd";
|
|
|
8506
8526
|
import { TeamOutlined } from "@ant-design/icons";
|
|
8507
8527
|
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
8508
8528
|
var TeamButton = () => {
|
|
8509
|
-
const { agentState, threadId } = useAgentChat();
|
|
8529
|
+
const { agentState, threadId, assistantId } = useAgentChat();
|
|
8510
8530
|
const { openSideApp } = useChatUIContext();
|
|
8511
8531
|
const teamData = agentState?.values?.team;
|
|
8512
8532
|
const teammates = teamData?.teammates || [];
|
|
@@ -8525,6 +8545,10 @@ var TeamButton = () => {
|
|
|
8525
8545
|
description: t.description
|
|
8526
8546
|
})),
|
|
8527
8547
|
parent_thread_id: threadId
|
|
8548
|
+
},
|
|
8549
|
+
context: {
|
|
8550
|
+
thread_id: threadId,
|
|
8551
|
+
assistant_id: assistantId
|
|
8528
8552
|
}
|
|
8529
8553
|
});
|
|
8530
8554
|
};
|
|
@@ -8683,7 +8707,7 @@ import React18, {
|
|
|
8683
8707
|
useContext as useContext8,
|
|
8684
8708
|
useState as useState31,
|
|
8685
8709
|
useCallback as useCallback18,
|
|
8686
|
-
useEffect as
|
|
8710
|
+
useEffect as useEffect20
|
|
8687
8711
|
} from "react";
|
|
8688
8712
|
import { WorkspaceClient, Client as Client2 } from "@axiom-lattice/client-sdk";
|
|
8689
8713
|
|
|
@@ -9239,7 +9263,7 @@ var WorkspaceContextProvider = ({
|
|
|
9239
9263
|
axiomClient.setTenantId(id);
|
|
9240
9264
|
}
|
|
9241
9265
|
}, [axiomClient]);
|
|
9242
|
-
|
|
9266
|
+
useEffect20(() => {
|
|
9243
9267
|
if (initialTenantId && initialTenantId !== tenantId) {
|
|
9244
9268
|
setTenantId(initialTenantId);
|
|
9245
9269
|
}
|
|
@@ -9251,7 +9275,7 @@ var WorkspaceContextProvider = ({
|
|
|
9251
9275
|
Client2.setWorkspaceContext(wsId || void 0, pjId || void 0);
|
|
9252
9276
|
}
|
|
9253
9277
|
}, []);
|
|
9254
|
-
|
|
9278
|
+
useEffect20(() => {
|
|
9255
9279
|
Client2.setWorkspaceContext(workspaceId || void 0, projectId || void 0);
|
|
9256
9280
|
}, [workspaceId, projectId]);
|
|
9257
9281
|
const [workspaces, setWorkspaces] = useState31([]);
|
|
@@ -9295,28 +9319,28 @@ var WorkspaceContextProvider = ({
|
|
|
9295
9319
|
setLoading(false);
|
|
9296
9320
|
}
|
|
9297
9321
|
}, [client, workspaceId]);
|
|
9298
|
-
|
|
9322
|
+
useEffect20(() => {
|
|
9299
9323
|
if (workspaceId && typeof window !== "undefined") {
|
|
9300
9324
|
sessionStorage.setItem("workspaceId", workspaceId);
|
|
9301
9325
|
}
|
|
9302
9326
|
}, [workspaceId]);
|
|
9303
|
-
|
|
9327
|
+
useEffect20(() => {
|
|
9304
9328
|
if (projectId && typeof window !== "undefined") {
|
|
9305
9329
|
sessionStorage.setItem("projectId", projectId);
|
|
9306
9330
|
}
|
|
9307
9331
|
}, [projectId]);
|
|
9308
|
-
|
|
9332
|
+
useEffect20(() => {
|
|
9309
9333
|
refreshWorkspaces().catch((err) => {
|
|
9310
9334
|
console.warn("Failed to load workspaces:", err);
|
|
9311
9335
|
});
|
|
9312
9336
|
}, [refreshWorkspaces]);
|
|
9313
|
-
|
|
9337
|
+
useEffect20(() => {
|
|
9314
9338
|
if (workspaces.length > 0 && !workspaceId) {
|
|
9315
9339
|
const firstWorkspace = workspaces[0];
|
|
9316
9340
|
setWorkspaceId(firstWorkspace.id);
|
|
9317
9341
|
}
|
|
9318
9342
|
}, [workspaces, workspaceId]);
|
|
9319
|
-
|
|
9343
|
+
useEffect20(() => {
|
|
9320
9344
|
if (workspaceId) {
|
|
9321
9345
|
refreshProjects(workspaceId);
|
|
9322
9346
|
} else {
|
|
@@ -10512,7 +10536,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
10512
10536
|
};
|
|
10513
10537
|
|
|
10514
10538
|
// src/components/Chat/MetricsDataSourcePicker.tsx
|
|
10515
|
-
import { useEffect as
|
|
10539
|
+
import { useEffect as useEffect22, useState as useState36, useRef as useRef17 } from "react";
|
|
10516
10540
|
import { Modal as Modal6, List as List7, Spin as Spin8, Empty as Empty7, Typography as Typography19, Button as Button28, Tag as Tag6, Tooltip as Tooltip14 } from "antd";
|
|
10517
10541
|
import { Database as Database2, Check as Check2, Server } from "lucide-react";
|
|
10518
10542
|
import { Fragment as Fragment12, jsx as jsx61, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
@@ -10601,7 +10625,7 @@ var MetricsDataSourcePicker = ({
|
|
|
10601
10625
|
console.error("Failed to save datasource to sessionStorage:", error);
|
|
10602
10626
|
}
|
|
10603
10627
|
};
|
|
10604
|
-
|
|
10628
|
+
useEffect22(() => {
|
|
10605
10629
|
if (hasInitializedRef.current) return;
|
|
10606
10630
|
hasInitializedRef.current = true;
|
|
10607
10631
|
loadDataSources();
|
|
@@ -10864,7 +10888,7 @@ import {
|
|
|
10864
10888
|
} from "@ant-design/icons";
|
|
10865
10889
|
import { Prompts } from "@ant-design/x";
|
|
10866
10890
|
import { Space as Space19, Typography as Typography20, Spin as Spin9 } from "antd";
|
|
10867
|
-
import { useEffect as
|
|
10891
|
+
import { useEffect as useEffect23, useState as useState37, useMemo as useMemo11 } from "react";
|
|
10868
10892
|
import { BrainCircuit as BrainCircuit2 } from "lucide-react";
|
|
10869
10893
|
import { jsx as jsx62, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10870
10894
|
var categoryConfig = {
|
|
@@ -10954,7 +10978,7 @@ var SkillCategoryPrompts = ({
|
|
|
10954
10978
|
const [showAll, setShowAll] = useState37(false);
|
|
10955
10979
|
const { get } = useApi();
|
|
10956
10980
|
const MAX_SIMPLE_ITEMS = 10;
|
|
10957
|
-
|
|
10981
|
+
useEffect23(() => {
|
|
10958
10982
|
const loadSkills = async () => {
|
|
10959
10983
|
setLoading(true);
|
|
10960
10984
|
try {
|
|
@@ -11538,7 +11562,7 @@ var Chating = ({
|
|
|
11538
11562
|
const conversationContext = useConversationContext();
|
|
11539
11563
|
const [isEmptyState, setIsEmptyState] = useState39(messages.length === 0);
|
|
11540
11564
|
const [isTransitioning, setIsTransitioning] = useState39(false);
|
|
11541
|
-
|
|
11565
|
+
useEffect24(() => {
|
|
11542
11566
|
if (messages.length > 0 && isEmptyState) {
|
|
11543
11567
|
setIsTransitioning(true);
|
|
11544
11568
|
setTimeout(() => {
|
|
@@ -11620,7 +11644,7 @@ var Chating = ({
|
|
|
11620
11644
|
setSuggestionsLoading(false);
|
|
11621
11645
|
}
|
|
11622
11646
|
};
|
|
11623
|
-
|
|
11647
|
+
useEffect24(() => {
|
|
11624
11648
|
regsiterElement("action_show_attachments_uploader", {
|
|
11625
11649
|
card_view: () => null,
|
|
11626
11650
|
action: (data) => {
|
|
@@ -12201,7 +12225,7 @@ var InternetSearchCard = ({
|
|
|
12201
12225
|
};
|
|
12202
12226
|
|
|
12203
12227
|
// src/components/GenUI/elements/schedule_viewer.tsx
|
|
12204
|
-
import { useState as useState40, useEffect as
|
|
12228
|
+
import { useState as useState40, useEffect as useEffect25, useCallback as useCallback21 } from "react";
|
|
12205
12229
|
import {
|
|
12206
12230
|
Tag as Tag7,
|
|
12207
12231
|
Button as Button31,
|
|
@@ -12426,12 +12450,12 @@ var ScheduleViewer = ({ data }) => {
|
|
|
12426
12450
|
},
|
|
12427
12451
|
[client, handleRefresh]
|
|
12428
12452
|
);
|
|
12429
|
-
|
|
12453
|
+
useEffect25(() => {
|
|
12430
12454
|
if (threadId && (!initialTasks || initialTasks.length === 0)) {
|
|
12431
12455
|
handleRefresh();
|
|
12432
12456
|
}
|
|
12433
12457
|
}, [threadId]);
|
|
12434
|
-
|
|
12458
|
+
useEffect25(() => {
|
|
12435
12459
|
if (initialTasks) {
|
|
12436
12460
|
setTasks(initialTasks);
|
|
12437
12461
|
}
|
|
@@ -12788,7 +12812,7 @@ var TeamGraph = ({ data }) => {
|
|
|
12788
12812
|
const tasks = safeGetTasks(data);
|
|
12789
12813
|
const teamId = safeGetTeamId(data);
|
|
12790
12814
|
const { openSideApp } = useChatUIContext();
|
|
12791
|
-
const { threadId } = useAgentChat();
|
|
12815
|
+
const { threadId, assistantId } = useAgentChat();
|
|
12792
12816
|
const colors3 = [
|
|
12793
12817
|
"#1890ff",
|
|
12794
12818
|
"#52c41a",
|
|
@@ -12818,6 +12842,10 @@ var TeamGraph = ({ data }) => {
|
|
|
12818
12842
|
teamId,
|
|
12819
12843
|
teammates,
|
|
12820
12844
|
parent_thread_id: threadId
|
|
12845
|
+
},
|
|
12846
|
+
context: {
|
|
12847
|
+
thread_id: threadId,
|
|
12848
|
+
assistant_id: assistantId
|
|
12821
12849
|
}
|
|
12822
12850
|
});
|
|
12823
12851
|
};
|
|
@@ -13190,8 +13218,8 @@ import { createStyles as createStyles19 } from "antd-style";
|
|
|
13190
13218
|
|
|
13191
13219
|
// src/components/GenUI/elements/TeamWorkspace/hooks/useTeamWorkspaceData.ts
|
|
13192
13220
|
import { useMemo as useMemo13 } from "react";
|
|
13193
|
-
function useTeamWorkspaceData(threadId) {
|
|
13194
|
-
const { agentState, isLoading, error, refresh } = useAgentState(threadId, {
|
|
13221
|
+
function useTeamWorkspaceData(threadId, assistantId) {
|
|
13222
|
+
const { agentState, isLoading, error, refresh } = useAgentState(threadId, assistantId, {
|
|
13195
13223
|
pollingInterval: 5e3,
|
|
13196
13224
|
autoStart: true
|
|
13197
13225
|
});
|
|
@@ -15699,10 +15727,12 @@ var getTeammateAssistantId = (teamId, agentName) => {
|
|
|
15699
15727
|
return `team:${teamId}:${agentName}`;
|
|
15700
15728
|
};
|
|
15701
15729
|
var TeamWorkspace = ({
|
|
15702
|
-
data
|
|
15730
|
+
data,
|
|
15731
|
+
context
|
|
15703
15732
|
}) => {
|
|
15704
15733
|
const { styles } = useStyles16();
|
|
15705
15734
|
const { teamId, teammates, parent_thread_id } = data || {};
|
|
15735
|
+
const assistantId = context?.assistant_id || "";
|
|
15706
15736
|
const {
|
|
15707
15737
|
team,
|
|
15708
15738
|
tasks,
|
|
@@ -15712,7 +15742,7 @@ var TeamWorkspace = ({
|
|
|
15712
15742
|
recentActivities,
|
|
15713
15743
|
isLoading,
|
|
15714
15744
|
refresh
|
|
15715
|
-
} = useTeamWorkspaceData(parent_thread_id || null);
|
|
15745
|
+
} = useTeamWorkspaceData(parent_thread_id || null, assistantId);
|
|
15716
15746
|
const [activeMenuId, setActiveMenuId] = useState45("dashboard");
|
|
15717
15747
|
const menuItems = useMemo17(() => {
|
|
15718
15748
|
const items = [
|
|
@@ -15800,13 +15830,13 @@ var TeamWorkspace = ({
|
|
|
15800
15830
|
teamId,
|
|
15801
15831
|
activeItem.data.name
|
|
15802
15832
|
);
|
|
15803
|
-
const
|
|
15833
|
+
const assistantId2 = getTeammateAssistantId(teamId, activeItem.data.name);
|
|
15804
15834
|
return /* @__PURE__ */ jsx79(
|
|
15805
15835
|
TeamMemberChat,
|
|
15806
15836
|
{
|
|
15807
15837
|
teammate: activeItem.data,
|
|
15808
15838
|
threadId,
|
|
15809
|
-
assistantId
|
|
15839
|
+
assistantId: assistantId2
|
|
15810
15840
|
}
|
|
15811
15841
|
);
|
|
15812
15842
|
}
|
|
@@ -16196,7 +16226,7 @@ var TaskBoard = ({
|
|
|
16196
16226
|
};
|
|
16197
16227
|
|
|
16198
16228
|
// src/components/GenUI/elements/Mailbox.tsx
|
|
16199
|
-
import { useState as useState46, useMemo as useMemo19, useRef as useRef19, useEffect as
|
|
16229
|
+
import { useState as useState46, useMemo as useMemo19, useRef as useRef19, useEffect as useEffect26 } from "react";
|
|
16200
16230
|
import { jsx as jsx82, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
16201
16231
|
var useStyle11 = () => {
|
|
16202
16232
|
return {
|
|
@@ -16492,7 +16522,7 @@ var TeamChat = ({ data }) => {
|
|
|
16492
16522
|
const mentions = useMemo19(() => {
|
|
16493
16523
|
return teammates?.map((t) => t.name) || [];
|
|
16494
16524
|
}, [teammates]);
|
|
16495
|
-
|
|
16525
|
+
useEffect26(() => {
|
|
16496
16526
|
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
16497
16527
|
}, [sortedMessages]);
|
|
16498
16528
|
const handleSend = () => {
|
|
@@ -16759,7 +16789,7 @@ var regsiterElement = (language, ElementMeta) => {
|
|
|
16759
16789
|
// src/components/Chat/SideAppViewBrowser.tsx
|
|
16760
16790
|
import { Dropdown as Dropdown2, Tooltip as Tooltip20 } from "antd";
|
|
16761
16791
|
import { createStyles as createStyles27 } from "antd-style";
|
|
16762
|
-
import { useEffect as
|
|
16792
|
+
import { useEffect as useEffect27, useState as useState47 } from "react";
|
|
16763
16793
|
import { Fragment as Fragment16, jsx as jsx83, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
16764
16794
|
var useStyle12 = createStyles27(({ token, css }) => {
|
|
16765
16795
|
return {
|
|
@@ -16984,7 +17014,7 @@ var SideAppViewBrowser = () => {
|
|
|
16984
17014
|
const switchTab = (key) => {
|
|
16985
17015
|
setActiveKey(key);
|
|
16986
17016
|
};
|
|
16987
|
-
|
|
17017
|
+
useEffect27(() => {
|
|
16988
17018
|
if (!sideAppSelectedCard) return;
|
|
16989
17019
|
const key = JSON.stringify(sideAppSelectedCard);
|
|
16990
17020
|
if (items.find((item) => item.key === key)) {
|
|
@@ -17003,7 +17033,8 @@ var SideAppViewBrowser = () => {
|
|
|
17003
17033
|
SideAppView,
|
|
17004
17034
|
{
|
|
17005
17035
|
component_key: sideAppSelectedCard?.component_key || "",
|
|
17006
|
-
data: sideAppSelectedCard?.data
|
|
17036
|
+
data: sideAppSelectedCard?.data,
|
|
17037
|
+
context: sideAppSelectedCard?.context
|
|
17007
17038
|
}
|
|
17008
17039
|
),
|
|
17009
17040
|
sideAppSelectedCard?.component_key
|
|
@@ -17186,7 +17217,7 @@ var AgentConversations = ({
|
|
|
17186
17217
|
};
|
|
17187
17218
|
|
|
17188
17219
|
// src/components/Chat/MetricsConfigDrawerContent.tsx
|
|
17189
|
-
import { useState as useState48, useEffect as
|
|
17220
|
+
import { useState as useState48, useEffect as useEffect28 } from "react";
|
|
17190
17221
|
import { Activity as Activity2, Plus as Plus3, Edit2, Trash2, TestTube2, Loader2 as Loader24, Database as Database3, Settings, ChevronRight as ChevronRight4, ChevronLeft as ChevronLeft2, Check as Check3 } from "lucide-react";
|
|
17191
17222
|
import { Card as Card19, Button as Button36, Space as Space29, Typography as Typography36, Tag as Tag13, Modal as Modal9, message as message7, Input as Input5, Select, Popconfirm as Popconfirm2, Steps, Checkbox as Checkbox4, Spin as Spin12, theme as theme4 } from "antd";
|
|
17192
17223
|
import { jsx as jsx86, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
@@ -17203,7 +17234,7 @@ var MetricsConfigDrawerContent = () => {
|
|
|
17203
17234
|
const [formModalOpen, setFormModalOpen] = useState48(false);
|
|
17204
17235
|
const [editingConfig, setEditingConfig] = useState48(null);
|
|
17205
17236
|
const tenantId = config.headers?.["x-tenant-id"] || "default";
|
|
17206
|
-
|
|
17237
|
+
useEffect28(() => {
|
|
17207
17238
|
loadConfigs();
|
|
17208
17239
|
}, [tenantId]);
|
|
17209
17240
|
const loadConfigs = async () => {
|
|
@@ -17449,12 +17480,12 @@ var MetricsConfigFormModal = ({
|
|
|
17449
17480
|
selectedDataSources: editingConfig?.config?.selectedDataSources || []
|
|
17450
17481
|
});
|
|
17451
17482
|
};
|
|
17452
|
-
|
|
17483
|
+
useEffect28(() => {
|
|
17453
17484
|
if (open) {
|
|
17454
17485
|
resetForm();
|
|
17455
17486
|
}
|
|
17456
17487
|
}, [open, editingConfig]);
|
|
17457
|
-
|
|
17488
|
+
useEffect28(() => {
|
|
17458
17489
|
if (currentStep === 1 && availableDatasources.length === 0 && !fetchingDatasources) {
|
|
17459
17490
|
handleFetchDatasources();
|
|
17460
17491
|
}
|
|
@@ -17855,7 +17886,7 @@ var MetricsConfigFormModal = ({
|
|
|
17855
17886
|
import { useContext as useContext11 } from "react";
|
|
17856
17887
|
|
|
17857
17888
|
// src/components/Chat/ChatSidebar.tsx
|
|
17858
|
-
import React54, { useState as useState61, useMemo as useMemo28, useCallback as useCallback29, useEffect as
|
|
17889
|
+
import React54, { useState as useState61, useMemo as useMemo28, useCallback as useCallback29, useEffect as useEffect39 } from "react";
|
|
17859
17890
|
import { Drawer } from "antd";
|
|
17860
17891
|
import {
|
|
17861
17892
|
Bot as Bot3,
|
|
@@ -17878,7 +17909,7 @@ import {
|
|
|
17878
17909
|
import { createStyles as createStyles33 } from "antd-style";
|
|
17879
17910
|
|
|
17880
17911
|
// src/components/Chat/AssistantFlow.tsx
|
|
17881
|
-
import { useMemo as useMemo23, useEffect as
|
|
17912
|
+
import { useMemo as useMemo23, useEffect as useEffect31, useState as useState52, useCallback as useCallback24, useRef as useRef21 } from "react";
|
|
17882
17913
|
import {
|
|
17883
17914
|
ReactFlow as ReactFlow2,
|
|
17884
17915
|
Background as Background2,
|
|
@@ -18683,7 +18714,7 @@ var AssistantNode = ({
|
|
|
18683
18714
|
var AssistantNode_default = AssistantNode;
|
|
18684
18715
|
|
|
18685
18716
|
// src/components/Chat/AgentConfigPanel.tsx
|
|
18686
|
-
import { useState as useState49, useEffect as
|
|
18717
|
+
import { useState as useState49, useEffect as useEffect29, useMemo as useMemo22, useCallback as useCallback22, useRef as useRef20 } from "react";
|
|
18687
18718
|
import {
|
|
18688
18719
|
Form as Form3,
|
|
18689
18720
|
Input as Input6,
|
|
@@ -18919,7 +18950,7 @@ var SkillListField = ({ propertyKey, label, value, onChange, token }) => {
|
|
|
18919
18950
|
const [loading, setLoading] = useState49(false);
|
|
18920
18951
|
const { get } = useApi();
|
|
18921
18952
|
const fetchedRef = useRef20(false);
|
|
18922
|
-
|
|
18953
|
+
useEffect29(() => {
|
|
18923
18954
|
if (fetchedRef.current) return;
|
|
18924
18955
|
fetchedRef.current = true;
|
|
18925
18956
|
const fetchSkills = async () => {
|
|
@@ -19030,7 +19061,7 @@ var DatabaseListField = ({ propertyKey, label, value, onChange, token }) => {
|
|
|
19030
19061
|
const [loading, setLoading] = useState49(false);
|
|
19031
19062
|
const { get } = useApi();
|
|
19032
19063
|
const fetchedRef = useRef20(false);
|
|
19033
|
-
|
|
19064
|
+
useEffect29(() => {
|
|
19034
19065
|
if (fetchedRef.current) return;
|
|
19035
19066
|
fetchedRef.current = true;
|
|
19036
19067
|
const fetchDatabases = async () => {
|
|
@@ -19145,7 +19176,7 @@ var MetricsListField = ({ propertyKey, label, value, onChange, token }) => {
|
|
|
19145
19176
|
const [loading, setLoading] = useState49(false);
|
|
19146
19177
|
const { get } = useApi();
|
|
19147
19178
|
const fetchedRef = useRef20(false);
|
|
19148
|
-
|
|
19179
|
+
useEffect29(() => {
|
|
19149
19180
|
if (fetchedRef.current) return;
|
|
19150
19181
|
fetchedRef.current = true;
|
|
19151
19182
|
const fetchMetricsServers = async () => {
|
|
@@ -19492,7 +19523,7 @@ var AgentConfigPanel = ({
|
|
|
19492
19523
|
setToolsLoading(false);
|
|
19493
19524
|
}
|
|
19494
19525
|
}, [get, visible]);
|
|
19495
|
-
|
|
19526
|
+
useEffect29(() => {
|
|
19496
19527
|
if (visible && assistant) {
|
|
19497
19528
|
fetchTools();
|
|
19498
19529
|
if (parsedConfig) {
|
|
@@ -19540,6 +19571,7 @@ var AgentConfigPanel = ({
|
|
|
19540
19571
|
const values = await form.validateFields();
|
|
19541
19572
|
const configToSave = {
|
|
19542
19573
|
...values,
|
|
19574
|
+
type: agentType,
|
|
19543
19575
|
tools: selectedTools,
|
|
19544
19576
|
subAgents: selectedSubAgents,
|
|
19545
19577
|
prompt: agentPrompt,
|
|
@@ -20162,7 +20194,7 @@ import {
|
|
|
20162
20194
|
import { PlusOutlined as PlusOutlined3, ForkOutlined as ForkOutlined2 } from "@ant-design/icons";
|
|
20163
20195
|
|
|
20164
20196
|
// src/components/Chat/ParentAgentSelector.tsx
|
|
20165
|
-
import { useEffect as
|
|
20197
|
+
import { useEffect as useEffect30, useState as useState50 } from "react";
|
|
20166
20198
|
import { Select as Select3, Typography as Typography39 } from "antd";
|
|
20167
20199
|
import { jsx as jsx89, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
20168
20200
|
var { Text: Text30 } = Typography39;
|
|
@@ -20174,7 +20206,7 @@ var ParentAgentSelector = ({
|
|
|
20174
20206
|
const [assistants, setAssistants] = useState50([]);
|
|
20175
20207
|
const [loading, setLoading] = useState50(false);
|
|
20176
20208
|
const { get } = useApi();
|
|
20177
|
-
|
|
20209
|
+
useEffect30(() => {
|
|
20178
20210
|
const fetchAssistants = async () => {
|
|
20179
20211
|
setLoading(true);
|
|
20180
20212
|
try {
|
|
@@ -20756,10 +20788,10 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
20756
20788
|
setAssistantsLoading(false);
|
|
20757
20789
|
}
|
|
20758
20790
|
};
|
|
20759
|
-
|
|
20791
|
+
useEffect31(() => {
|
|
20760
20792
|
fetchAssistants();
|
|
20761
20793
|
}, []);
|
|
20762
|
-
|
|
20794
|
+
useEffect31(() => {
|
|
20763
20795
|
if (!assistants || assistants.length === 0) {
|
|
20764
20796
|
setNodes([]);
|
|
20765
20797
|
setEdges([]);
|
|
@@ -21023,7 +21055,7 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
21023
21055
|
});
|
|
21024
21056
|
lastCreatedAssistantRef.current = createdAssistant;
|
|
21025
21057
|
};
|
|
21026
|
-
|
|
21058
|
+
useEffect31(() => {
|
|
21027
21059
|
if (selectedAssistant) {
|
|
21028
21060
|
const node = nodes.find((n) => n.id === selectedAssistant.id);
|
|
21029
21061
|
if (node) {
|
|
@@ -21031,7 +21063,7 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
21031
21063
|
}
|
|
21032
21064
|
}
|
|
21033
21065
|
}, [selectedAssistant, nodes, setCenter]);
|
|
21034
|
-
|
|
21066
|
+
useEffect31(() => {
|
|
21035
21067
|
if (assistants.length > 0 && selectedAssistant) {
|
|
21036
21068
|
const assistant = assistants.find((a) => a.id === selectedAssistant.id);
|
|
21037
21069
|
if (assistant && !configPanelVisible) {
|
|
@@ -21040,7 +21072,7 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
21040
21072
|
}
|
|
21041
21073
|
}, [assistants, selectedAssistant, configPanelVisible]);
|
|
21042
21074
|
const lastCreatedAssistantRef = useRef21(null);
|
|
21043
|
-
|
|
21075
|
+
useEffect31(() => {
|
|
21044
21076
|
if (lastCreatedAssistantRef.current && !assistants.find((a) => a.id === lastCreatedAssistantRef.current?.id)) {
|
|
21045
21077
|
lastCreatedAssistantRef.current = null;
|
|
21046
21078
|
}
|
|
@@ -21155,7 +21187,7 @@ var AssistantFlow = (props) => /* @__PURE__ */ jsx92(ReactFlowProvider2, { child
|
|
|
21155
21187
|
var AssistantFlow_default = AssistantFlow;
|
|
21156
21188
|
|
|
21157
21189
|
// src/components/Chat/SkillFlow.tsx
|
|
21158
|
-
import { useMemo as useMemo25, useEffect as
|
|
21190
|
+
import { useMemo as useMemo25, useEffect as useEffect33, useState as useState55 } from "react";
|
|
21159
21191
|
import {
|
|
21160
21192
|
ReactFlow as ReactFlow3,
|
|
21161
21193
|
Background as Background3,
|
|
@@ -21169,7 +21201,7 @@ import { Button as Button42, theme as theme12 } from "antd";
|
|
|
21169
21201
|
import { PlusOutlined as PlusOutlined7 } from "@ant-design/icons";
|
|
21170
21202
|
|
|
21171
21203
|
// src/components/Chat/SkillNode.tsx
|
|
21172
|
-
import { useEffect as
|
|
21204
|
+
import { useEffect as useEffect32, useMemo as useMemo24, useState as useState53 } from "react";
|
|
21173
21205
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
21174
21206
|
import {
|
|
21175
21207
|
Avatar as Avatar10,
|
|
@@ -21269,7 +21301,7 @@ var SkillNode = ({ data }) => {
|
|
|
21269
21301
|
);
|
|
21270
21302
|
const [isModalOpen, setIsModalOpen] = useState53(false);
|
|
21271
21303
|
const [saving, setSaving] = useState53(false);
|
|
21272
|
-
|
|
21304
|
+
useEffect32(() => {
|
|
21273
21305
|
setIsEditing(false);
|
|
21274
21306
|
setCurrentSkill(skill);
|
|
21275
21307
|
setDraftSkill({ ...skill, id: skill.name });
|
|
@@ -22661,10 +22693,10 @@ var SkillFlowInner = ({ onNodeClick }) => {
|
|
|
22661
22693
|
setSkillsLoading(false);
|
|
22662
22694
|
}
|
|
22663
22695
|
};
|
|
22664
|
-
|
|
22696
|
+
useEffect33(() => {
|
|
22665
22697
|
fetchSkills();
|
|
22666
22698
|
}, []);
|
|
22667
|
-
|
|
22699
|
+
useEffect33(() => {
|
|
22668
22700
|
if (!skills || skills.length === 0) {
|
|
22669
22701
|
setNodes([]);
|
|
22670
22702
|
setEdges([]);
|
|
@@ -22873,7 +22905,7 @@ var SkillFlow_default = SkillFlow;
|
|
|
22873
22905
|
// src/components/Chat/ToolsList.tsx
|
|
22874
22906
|
import { List as List14, Avatar as Avatar11, theme as theme13, Alert as Alert7, Button as Button43, Tag as Tag18 } from "antd";
|
|
22875
22907
|
import { ReloadOutlined as ReloadOutlined4 } from "@ant-design/icons";
|
|
22876
|
-
import { useEffect as
|
|
22908
|
+
import { useEffect as useEffect34, useState as useState56, useCallback as useCallback25 } from "react";
|
|
22877
22909
|
import { jsx as jsx96, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
22878
22910
|
var ToolsList = ({
|
|
22879
22911
|
onToolSelect,
|
|
@@ -22919,7 +22951,7 @@ var ToolsList = ({
|
|
|
22919
22951
|
const handleRefresh = useCallback25(() => {
|
|
22920
22952
|
fetchTools();
|
|
22921
22953
|
}, [fetchTools]);
|
|
22922
|
-
|
|
22954
|
+
useEffect34(() => {
|
|
22923
22955
|
if (autoLoad) {
|
|
22924
22956
|
fetchTools();
|
|
22925
22957
|
}
|
|
@@ -23109,7 +23141,7 @@ var ToolsList = ({
|
|
|
23109
23141
|
};
|
|
23110
23142
|
|
|
23111
23143
|
// src/components/Chat/WorkspaceMenuContent.tsx
|
|
23112
|
-
import { useState as useState57, useEffect as
|
|
23144
|
+
import { useState as useState57, useEffect as useEffect35, useRef as useRef22, useCallback as useCallback26, useMemo as useMemo26 } from "react";
|
|
23113
23145
|
import { Modal as Modal14, Input as Input11, Button as Button44, Tooltip as Tooltip24, message as message13, Spin as Spin14 } from "antd";
|
|
23114
23146
|
import { createStyles as createStyles28 } from "antd-style";
|
|
23115
23147
|
import { Folder as Folder2, FolderOpen as FolderOpen2, Upload, Plus as Plus4, ChevronDown as ChevronDown4, Building2 as Building24 } from "lucide-react";
|
|
@@ -23602,7 +23634,7 @@ var WorkspaceMenuContent = () => {
|
|
|
23602
23634
|
setFolderLoading((prev) => ({ ...prev, [folder.name]: false }));
|
|
23603
23635
|
}
|
|
23604
23636
|
}, [workspaceId, projectId, listPathByFolder]);
|
|
23605
|
-
|
|
23637
|
+
useEffect35(() => {
|
|
23606
23638
|
resourceFolders.forEach((folder) => {
|
|
23607
23639
|
loadAssetsForFolder(folder);
|
|
23608
23640
|
});
|
|
@@ -24071,7 +24103,7 @@ var AgentListDrawerContent = () => {
|
|
|
24071
24103
|
};
|
|
24072
24104
|
|
|
24073
24105
|
// src/components/Chat/DatabaseConfigDrawerContent.tsx
|
|
24074
|
-
import { useState as useState58, useEffect as
|
|
24106
|
+
import { useState as useState58, useEffect as useEffect36 } from "react";
|
|
24075
24107
|
import { createStyles as createStyles30 } from "antd-style";
|
|
24076
24108
|
import { Database as Database4, Plus as Plus5, Edit2 as Edit22, Trash2 as Trash22, TestTube2 as TestTube22, Loader2 as Loader25 } from "lucide-react";
|
|
24077
24109
|
import { Card as Card21, Button as Button45, Space as Space34, Typography as Typography44, Tag as Tag19, Modal as Modal15, message as message14, Input as Input12, Select as Select4, Popconfirm as Popconfirm3 } from "antd";
|
|
@@ -24150,7 +24182,7 @@ var DatabaseConfigDrawerContent = ({
|
|
|
24150
24182
|
const [testingId, setTestingId] = useState58(null);
|
|
24151
24183
|
const [formModalOpen, setFormModalOpen] = useState58(false);
|
|
24152
24184
|
const [editingConfig, setEditingConfig] = useState58(null);
|
|
24153
|
-
|
|
24185
|
+
useEffect36(() => {
|
|
24154
24186
|
loadConfigs();
|
|
24155
24187
|
}, [tenantId]);
|
|
24156
24188
|
const loadConfigs = async () => {
|
|
@@ -24583,7 +24615,7 @@ var DatabaseConfigFormModal = ({
|
|
|
24583
24615
|
};
|
|
24584
24616
|
|
|
24585
24617
|
// src/components/Chat/McpConfigDrawerContent.tsx
|
|
24586
|
-
import { useState as useState59, useEffect as
|
|
24618
|
+
import { useState as useState59, useEffect as useEffect37 } from "react";
|
|
24587
24619
|
import { Plug, Plus as Plus6, Edit2 as Edit23, Trash2 as Trash23, TestTube2 as TestTube23, Loader2 as Loader26, Settings as Settings2, Database as Database5, ChevronRight as ChevronRight5, ChevronLeft as ChevronLeft3, Check as Check4, Terminal, Globe, Server as Server2 } from "lucide-react";
|
|
24588
24620
|
import { Card as Card22, Button as Button46, Space as Space35, Typography as Typography45, Tag as Tag20, Modal as Modal16, message as message15, Input as Input13, Select as Select5, Popconfirm as Popconfirm4, Steps as Steps2, Checkbox as Checkbox6, Spin as Spin15, theme as theme14, Collapse as Collapse7 } from "antd";
|
|
24589
24621
|
import { Fragment as Fragment22, jsx as jsx100, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
@@ -24602,7 +24634,7 @@ var McpConfigDrawerContent = ({
|
|
|
24602
24634
|
const [testingId, setTestingId] = useState59(null);
|
|
24603
24635
|
const [formModalOpen, setFormModalOpen] = useState59(false);
|
|
24604
24636
|
const [editingConfig, setEditingConfig] = useState59(null);
|
|
24605
|
-
|
|
24637
|
+
useEffect37(() => {
|
|
24606
24638
|
loadConfigs();
|
|
24607
24639
|
}, [tenantId]);
|
|
24608
24640
|
const loadConfigs = async () => {
|
|
@@ -24860,12 +24892,12 @@ var McpConfigFormModal = ({
|
|
|
24860
24892
|
selectedTools: editingConfig?.selectedTools || []
|
|
24861
24893
|
});
|
|
24862
24894
|
};
|
|
24863
|
-
|
|
24895
|
+
useEffect37(() => {
|
|
24864
24896
|
if (open) {
|
|
24865
24897
|
resetForm();
|
|
24866
24898
|
}
|
|
24867
24899
|
}, [open, editingConfig]);
|
|
24868
|
-
|
|
24900
|
+
useEffect37(() => {
|
|
24869
24901
|
if (currentStep === 1 && availableTools.length === 0 && !fetchingTools) {
|
|
24870
24902
|
handleFetchTools();
|
|
24871
24903
|
}
|
|
@@ -25216,7 +25248,7 @@ var McpConfigFormModal = ({
|
|
|
25216
25248
|
};
|
|
25217
25249
|
|
|
25218
25250
|
// src/components/Chat/ProjectsMenuContent.tsx
|
|
25219
|
-
import { useState as useState60, useEffect as
|
|
25251
|
+
import { useState as useState60, useEffect as useEffect38, useCallback as useCallback27, useMemo as useMemo27, useRef as useRef23 } from "react";
|
|
25220
25252
|
import { Spin as Spin16, Modal as Modal17, Input as Input14, Button as Button47, message as message16 } from "antd";
|
|
25221
25253
|
import { createStyles as createStyles31 } from "antd-style";
|
|
25222
25254
|
import { Folder as Folder3, Plus as Plus7, ChevronDown as ChevronDown5, Upload as Upload2 } from "lucide-react";
|
|
@@ -25620,7 +25652,7 @@ var ProjectsMenuContent = () => {
|
|
|
25620
25652
|
setFolderLoading((prev) => ({ ...prev, [folder.name]: false }));
|
|
25621
25653
|
}
|
|
25622
25654
|
}, [workspaceId, projectId, listPathByFolder]);
|
|
25623
|
-
|
|
25655
|
+
useEffect38(() => {
|
|
25624
25656
|
resourceFolders.forEach((folder) => {
|
|
25625
25657
|
loadAssetsForFolder(folder);
|
|
25626
25658
|
});
|
|
@@ -26297,12 +26329,12 @@ var ChatSidebar = ({
|
|
|
26297
26329
|
const isExpanded = isExpandedMode && !sideAppVisible && !isIconView;
|
|
26298
26330
|
const isCollapsed = !isExpanded;
|
|
26299
26331
|
const shouldShowIconMode = isIconView || sideAppVisible;
|
|
26300
|
-
|
|
26332
|
+
useEffect39(() => {
|
|
26301
26333
|
if (isExpandedMode) {
|
|
26302
26334
|
setMenuCollapsed(isIconView);
|
|
26303
26335
|
}
|
|
26304
26336
|
}, [isExpandedMode, isIconView, setMenuCollapsed]);
|
|
26305
|
-
|
|
26337
|
+
useEffect39(() => {
|
|
26306
26338
|
if (isExpandedMode) {
|
|
26307
26339
|
setIsIconView(!userExpanded);
|
|
26308
26340
|
} else {
|
|
@@ -26608,7 +26640,7 @@ var LatticeChatView = (props) => {
|
|
|
26608
26640
|
};
|
|
26609
26641
|
|
|
26610
26642
|
// src/components/Chat/SettingsModal.tsx
|
|
26611
|
-
import { useState as useState62, useEffect as
|
|
26643
|
+
import { useState as useState62, useEffect as useEffect40, useRef as useRef24 } from "react";
|
|
26612
26644
|
import {
|
|
26613
26645
|
Modal as Modal19,
|
|
26614
26646
|
Input as Input15,
|
|
@@ -27022,7 +27054,7 @@ var SettingsModal = ({
|
|
|
27022
27054
|
});
|
|
27023
27055
|
const [serverConfigs, setServerConfigs] = useState62({});
|
|
27024
27056
|
const connectionsRef = useRef24(connections);
|
|
27025
|
-
|
|
27057
|
+
useEffect40(() => {
|
|
27026
27058
|
connectionsRef.current = connections;
|
|
27027
27059
|
}, [connections]);
|
|
27028
27060
|
const [activeTabKey, setActiveTabKey] = useState62(
|
|
@@ -27224,7 +27256,7 @@ var SettingsModal = ({
|
|
|
27224
27256
|
console.error("Failed to load models configuration:", error);
|
|
27225
27257
|
}
|
|
27226
27258
|
};
|
|
27227
|
-
|
|
27259
|
+
useEffect40(() => {
|
|
27228
27260
|
if (open && activeTabKey) {
|
|
27229
27261
|
initializeServerConfig(activeTabKey);
|
|
27230
27262
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
@@ -27233,7 +27265,7 @@ var SettingsModal = ({
|
|
|
27233
27265
|
}
|
|
27234
27266
|
}
|
|
27235
27267
|
}, [open, activeTabKey]);
|
|
27236
|
-
|
|
27268
|
+
useEffect40(() => {
|
|
27237
27269
|
if (open && activeTabKey) {
|
|
27238
27270
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
27239
27271
|
if (connection?.connected) {
|