@axiom-lattice/react-sdk 2.1.21 → 2.1.22
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 +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +837 -413
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +804 -355
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -136,7 +136,7 @@ function useChat(threadId, options = {}) {
|
|
|
136
136
|
stopStreamingRef.current = null;
|
|
137
137
|
}
|
|
138
138
|
const { input, command, streaming = true } = data;
|
|
139
|
-
const { message:
|
|
139
|
+
const { message: message6, files, ...rest } = input || {};
|
|
140
140
|
setState((prev) => ({
|
|
141
141
|
...prev,
|
|
142
142
|
isLoading: true,
|
|
@@ -145,7 +145,7 @@ function useChat(threadId, options = {}) {
|
|
|
145
145
|
}));
|
|
146
146
|
const userMessage = {
|
|
147
147
|
id: Date.now().toString(),
|
|
148
|
-
content:
|
|
148
|
+
content: message6 || command?.resume?.message || "",
|
|
149
149
|
files,
|
|
150
150
|
role: "human"
|
|
151
151
|
};
|
|
@@ -483,7 +483,7 @@ function AgentThreadProvider({
|
|
|
483
483
|
stopStreamingRef.current = null;
|
|
484
484
|
}
|
|
485
485
|
const { input, command, streaming = true } = data;
|
|
486
|
-
const { message:
|
|
486
|
+
const { message: message6, files, ...rest } = input || {};
|
|
487
487
|
setState((prev) => ({
|
|
488
488
|
...prev,
|
|
489
489
|
isLoading: true,
|
|
@@ -491,7 +491,7 @@ function AgentThreadProvider({
|
|
|
491
491
|
}));
|
|
492
492
|
const userMessage = {
|
|
493
493
|
id: Date.now().toString(),
|
|
494
|
-
content:
|
|
494
|
+
content: message6 || command?.resume?.message || "",
|
|
495
495
|
files,
|
|
496
496
|
role: "human"
|
|
497
497
|
};
|
|
@@ -1370,7 +1370,7 @@ import { DownloadOutlined, ExpandAltOutlined } from "@ant-design/icons";
|
|
|
1370
1370
|
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1371
1371
|
var { Text } = Typography;
|
|
1372
1372
|
var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = true }) => {
|
|
1373
|
-
const { dataSource, message:
|
|
1373
|
+
const { dataSource, message: message6 } = data ?? {};
|
|
1374
1374
|
const [expandedRowKeys, setExpandedRowKeys] = useState7([]);
|
|
1375
1375
|
const { openSideApp } = useChatUIContext();
|
|
1376
1376
|
const processedData = dataSource?.map((item, index) => ({
|
|
@@ -1454,7 +1454,7 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
1454
1454
|
{
|
|
1455
1455
|
size: "small",
|
|
1456
1456
|
title: () => /* @__PURE__ */ jsxs2(Flex, { justify: "space-between", align: "center", children: [
|
|
1457
|
-
/* @__PURE__ */ jsx8(Space, { children: /* @__PURE__ */ jsx8(Text, { strong: true, style: { fontSize: 16 }, children:
|
|
1457
|
+
/* @__PURE__ */ jsx8(Space, { children: /* @__PURE__ */ jsx8(Text, { strong: true, style: { fontSize: 16 }, children: message6 || "" }) }),
|
|
1458
1458
|
/* @__PURE__ */ jsxs2(Space, { children: [
|
|
1459
1459
|
/* @__PURE__ */ jsx8(
|
|
1460
1460
|
Button,
|
|
@@ -1475,8 +1475,8 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
1475
1475
|
onClick: () => {
|
|
1476
1476
|
openSideApp({
|
|
1477
1477
|
component_key: "generic_data_table",
|
|
1478
|
-
message:
|
|
1479
|
-
data: { dataSource, message:
|
|
1478
|
+
message: message6 || "",
|
|
1479
|
+
data: { dataSource, message: message6 }
|
|
1480
1480
|
});
|
|
1481
1481
|
},
|
|
1482
1482
|
children: [
|
|
@@ -1632,11 +1632,11 @@ var ConfirmFeedback = ({
|
|
|
1632
1632
|
data,
|
|
1633
1633
|
interactive = true
|
|
1634
1634
|
}) => {
|
|
1635
|
-
const { message:
|
|
1635
|
+
const { message: message6, type, config, feedback, options } = data ?? {};
|
|
1636
1636
|
const { sendMessage } = useAgentChat();
|
|
1637
1637
|
const [clicked, setClicked] = useState9(false);
|
|
1638
1638
|
return /* @__PURE__ */ jsxs3(Space2, { direction: "vertical", style: { width: "100%" }, children: [
|
|
1639
|
-
/* @__PURE__ */ jsx10(MDResponse, { content:
|
|
1639
|
+
/* @__PURE__ */ jsx10(MDResponse, { content: message6 }),
|
|
1640
1640
|
options ? /* @__PURE__ */ jsx10(Space2, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ jsx10(
|
|
1641
1641
|
Button2,
|
|
1642
1642
|
{
|
|
@@ -2044,7 +2044,7 @@ var Todo = ({
|
|
|
2044
2044
|
}) => {
|
|
2045
2045
|
const { styles } = useStyle3();
|
|
2046
2046
|
const [isExpanded, setIsExpanded] = useState10(false);
|
|
2047
|
-
const
|
|
2047
|
+
const getStatusIcon3 = (status) => {
|
|
2048
2048
|
switch (status) {
|
|
2049
2049
|
case "completed":
|
|
2050
2050
|
return /* @__PURE__ */ jsx14(CheckCircleOutlined2, { style: { color: "#52c41a" } });
|
|
@@ -2056,7 +2056,7 @@ var Todo = ({
|
|
|
2056
2056
|
return null;
|
|
2057
2057
|
}
|
|
2058
2058
|
};
|
|
2059
|
-
const
|
|
2059
|
+
const getStatusColor2 = (status) => {
|
|
2060
2060
|
switch (status) {
|
|
2061
2061
|
case "completed":
|
|
2062
2062
|
return "success";
|
|
@@ -2136,7 +2136,7 @@ var Todo = ({
|
|
|
2136
2136
|
{
|
|
2137
2137
|
className: `${styles.todoItem} ${getItemClassName(item.status)}`,
|
|
2138
2138
|
children: /* @__PURE__ */ jsxs6(Space5, { align: "center", style: { width: "100%" }, children: [
|
|
2139
|
-
|
|
2139
|
+
getStatusIcon3(item.status),
|
|
2140
2140
|
/* @__PURE__ */ jsx14(Text4, { style: { flex: 1 }, children: item.content })
|
|
2141
2141
|
] })
|
|
2142
2142
|
}
|
|
@@ -2653,7 +2653,7 @@ var AttachmentsCard = ({
|
|
|
2653
2653
|
columns = 1,
|
|
2654
2654
|
showDownloadButton = false
|
|
2655
2655
|
}) => {
|
|
2656
|
-
const { Text:
|
|
2656
|
+
const { Text: Text15 } = Typography7;
|
|
2657
2657
|
const [showAll, setShowAll] = useState12(false);
|
|
2658
2658
|
const { openSideApp } = useChatUIContext();
|
|
2659
2659
|
const getStyles = () => {
|
|
@@ -2728,7 +2728,7 @@ var AttachmentsCard = ({
|
|
|
2728
2728
|
);
|
|
2729
2729
|
};
|
|
2730
2730
|
const renderFileDescription = (item) => /* @__PURE__ */ jsx18(Space7, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ jsx18(Space7, { children: /* @__PURE__ */ jsx18(
|
|
2731
|
-
|
|
2731
|
+
Text15,
|
|
2732
2732
|
{
|
|
2733
2733
|
type: "secondary",
|
|
2734
2734
|
style: {
|
|
@@ -2800,7 +2800,7 @@ var AttachmentsCard = ({
|
|
|
2800
2800
|
}
|
|
2801
2801
|
),
|
|
2802
2802
|
item.files && /* @__PURE__ */ jsxs9("div", { style: { paddingLeft: "12px" }, children: [
|
|
2803
|
-
/* @__PURE__ */ jsxs9(
|
|
2803
|
+
/* @__PURE__ */ jsxs9(Text15, { type: "secondary", style: { fontSize: "12px" }, children: [
|
|
2804
2804
|
"\u5305\u542B\u6587\u4EF6(",
|
|
2805
2805
|
item.files.length,
|
|
2806
2806
|
")"
|
|
@@ -3472,7 +3472,7 @@ import {
|
|
|
3472
3472
|
} from "react";
|
|
3473
3473
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
3474
3474
|
var LazyBubble = ({
|
|
3475
|
-
message:
|
|
3475
|
+
message: message6,
|
|
3476
3476
|
renderContent,
|
|
3477
3477
|
autoLoadRightPanel
|
|
3478
3478
|
}) => {
|
|
@@ -3503,10 +3503,10 @@ var LazyBubble = ({
|
|
|
3503
3503
|
autoLoadRightPanel?.();
|
|
3504
3504
|
}, []);
|
|
3505
3505
|
const getPlaceholder = () => {
|
|
3506
|
-
const estimatedHeight =
|
|
3506
|
+
const estimatedHeight = message6.content ? Math.min(100, message6.content.length / 5) : 100;
|
|
3507
3507
|
return /* @__PURE__ */ jsx25("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
|
|
3508
3508
|
};
|
|
3509
|
-
return /* @__PURE__ */ jsx25(ErrorBoundary, { children: /* @__PURE__ */ jsx25("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(
|
|
3509
|
+
return /* @__PURE__ */ jsx25(ErrorBoundary, { children: /* @__PURE__ */ jsx25("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message6) : getPlaceholder() }) });
|
|
3510
3510
|
};
|
|
3511
3511
|
var MemoizedBubbleList = memo(
|
|
3512
3512
|
({
|
|
@@ -3537,8 +3537,8 @@ var MessageList = ({
|
|
|
3537
3537
|
messageLengthRef.current = messages?.length;
|
|
3538
3538
|
}
|
|
3539
3539
|
}, [messages?.length]);
|
|
3540
|
-
const renderContent = useCallback7((
|
|
3541
|
-
const { content } =
|
|
3540
|
+
const renderContent = useCallback7((message6) => {
|
|
3541
|
+
const { content } = message6;
|
|
3542
3542
|
try {
|
|
3543
3543
|
const json = JSON.parse(content);
|
|
3544
3544
|
if (json.action && json.message) {
|
|
@@ -3546,7 +3546,7 @@ var MessageList = ({
|
|
|
3546
3546
|
}
|
|
3547
3547
|
} catch (error) {
|
|
3548
3548
|
}
|
|
3549
|
-
const tool_calls_md =
|
|
3549
|
+
const tool_calls_md = message6.tool_calls?.map((tool_call) => {
|
|
3550
3550
|
return `\`\`\`tool_call
|
|
3551
3551
|
${JSON.stringify(tool_call)}
|
|
3552
3552
|
\`\`\``;
|
|
@@ -3555,17 +3555,17 @@ ${JSON.stringify(tool_call)}
|
|
|
3555
3555
|
return /* @__PURE__ */ jsx25(Space10, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ jsx25(MDResponse, { content: content_md }) });
|
|
3556
3556
|
}, []);
|
|
3557
3557
|
const items = useMemo4(
|
|
3558
|
-
() => messages.map((
|
|
3559
|
-
key:
|
|
3560
|
-
role:
|
|
3558
|
+
() => messages.map((message6, index) => ({
|
|
3559
|
+
key: message6.id,
|
|
3560
|
+
role: message6.role,
|
|
3561
3561
|
typing: false,
|
|
3562
3562
|
content: /* @__PURE__ */ jsx25(
|
|
3563
3563
|
LazyBubble,
|
|
3564
3564
|
{
|
|
3565
|
-
message:
|
|
3565
|
+
message: message6,
|
|
3566
3566
|
renderContent,
|
|
3567
3567
|
autoLoadRightPanel: () => {
|
|
3568
|
-
const { content, role: role2 } =
|
|
3568
|
+
const { content, role: role2 } = message6;
|
|
3569
3569
|
const isNewAddedMessage = messageLengthRef.current > 1 && messageLengthRef.current + 1 === messages.length;
|
|
3570
3570
|
if (index === messages.length - 1 && isNewAddedMessage && role2 === "ai") {
|
|
3571
3571
|
try {
|
|
@@ -3634,11 +3634,11 @@ ${JSON.stringify(tool_call)}
|
|
|
3634
3634
|
// src/components/Chat/Chating.tsx
|
|
3635
3635
|
import {
|
|
3636
3636
|
Alert as Alert2,
|
|
3637
|
-
Badge as
|
|
3638
|
-
Button as
|
|
3637
|
+
Badge as Badge3,
|
|
3638
|
+
Button as Button12,
|
|
3639
3639
|
message as message3
|
|
3640
3640
|
} from "antd";
|
|
3641
|
-
import
|
|
3641
|
+
import React8, { useEffect as useEffect11, useRef as useRef8, useState as useState17 } from "react";
|
|
3642
3642
|
|
|
3643
3643
|
// src/components/GenUI/HITLContainer.tsx
|
|
3644
3644
|
import {
|
|
@@ -3783,10 +3783,72 @@ var FileExplorerButton = ({}) => {
|
|
|
3783
3783
|
) }) });
|
|
3784
3784
|
};
|
|
3785
3785
|
|
|
3786
|
+
// src/components/Chat/ScheduleButton.tsx
|
|
3787
|
+
import { useState as useState16, useCallback as useCallback8, useEffect as useEffect10 } from "react";
|
|
3788
|
+
import { Tooltip as Tooltip4, Badge as Badge2, Button as Button11, Spin } from "antd";
|
|
3789
|
+
import { CalendarOutlined } from "@ant-design/icons";
|
|
3790
|
+
import { ScheduledTaskStatus } from "@axiom-lattice/client-sdk";
|
|
3791
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3792
|
+
var ScheduleButton = ({
|
|
3793
|
+
tooltipText = "Scheduled Tasks"
|
|
3794
|
+
}) => {
|
|
3795
|
+
const { threadId, assistantId } = useAgentChat();
|
|
3796
|
+
const { openSideApp } = useChatUIContext();
|
|
3797
|
+
const client = useAxiomLattice({ assistantId });
|
|
3798
|
+
const [scheduledTasks, setScheduledTasks] = useState16([]);
|
|
3799
|
+
const [loading, setLoading] = useState16(false);
|
|
3800
|
+
const [taskCount, setTaskCount] = useState16(0);
|
|
3801
|
+
const fetchScheduledTasks = useCallback8(async () => {
|
|
3802
|
+
if (!threadId) return;
|
|
3803
|
+
setLoading(true);
|
|
3804
|
+
try {
|
|
3805
|
+
const tasks = await client.schedules.getByThread({ threadId });
|
|
3806
|
+
setScheduledTasks(tasks);
|
|
3807
|
+
const activeCount = tasks.filter(
|
|
3808
|
+
(task) => task.status === ScheduledTaskStatus.PENDING || task.status === ScheduledTaskStatus.PAUSED
|
|
3809
|
+
).length;
|
|
3810
|
+
setTaskCount(activeCount);
|
|
3811
|
+
} catch (error) {
|
|
3812
|
+
console.error("Failed to fetch scheduled tasks:", error);
|
|
3813
|
+
setScheduledTasks([]);
|
|
3814
|
+
setTaskCount(0);
|
|
3815
|
+
} finally {
|
|
3816
|
+
setLoading(false);
|
|
3817
|
+
}
|
|
3818
|
+
}, [client, threadId]);
|
|
3819
|
+
useEffect10(() => {
|
|
3820
|
+
fetchScheduledTasks();
|
|
3821
|
+
}, [fetchScheduledTasks]);
|
|
3822
|
+
if (!threadId) {
|
|
3823
|
+
return null;
|
|
3824
|
+
}
|
|
3825
|
+
const handleClick = () => {
|
|
3826
|
+
openSideApp({
|
|
3827
|
+
component_key: "schedule_viewer",
|
|
3828
|
+
message: "Scheduled Tasks",
|
|
3829
|
+
data: {
|
|
3830
|
+
threadId,
|
|
3831
|
+
assistantId,
|
|
3832
|
+
tasks: scheduledTasks,
|
|
3833
|
+
onRefresh: fetchScheduledTasks
|
|
3834
|
+
}
|
|
3835
|
+
});
|
|
3836
|
+
};
|
|
3837
|
+
return /* @__PURE__ */ jsx29(Tooltip4, { title: tooltipText, children: /* @__PURE__ */ jsx29(Badge2, { count: taskCount, size: "small", color: "blue", children: /* @__PURE__ */ jsx29(
|
|
3838
|
+
Button11,
|
|
3839
|
+
{
|
|
3840
|
+
type: "text",
|
|
3841
|
+
icon: loading ? /* @__PURE__ */ jsx29(Spin, { size: "small" }) : /* @__PURE__ */ jsx29(CalendarOutlined, {}),
|
|
3842
|
+
onClick: handleClick,
|
|
3843
|
+
disabled: loading
|
|
3844
|
+
}
|
|
3845
|
+
) }) });
|
|
3846
|
+
};
|
|
3847
|
+
|
|
3786
3848
|
// src/components/Chat/AgentHeader.tsx
|
|
3787
3849
|
import { Welcome } from "@ant-design/x";
|
|
3788
3850
|
import { useMemo as useMemo5 } from "react";
|
|
3789
|
-
import { jsx as
|
|
3851
|
+
import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3790
3852
|
var { Text: Text10 } = Typography12;
|
|
3791
3853
|
var AgentHeader = (props) => {
|
|
3792
3854
|
const { description, avatar, name, extra, extraMeta } = props;
|
|
@@ -3799,7 +3861,7 @@ var AgentHeader = (props) => {
|
|
|
3799
3861
|
try {
|
|
3800
3862
|
} catch (error) {
|
|
3801
3863
|
}
|
|
3802
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ jsx30(
|
|
3803
3865
|
Element,
|
|
3804
3866
|
{
|
|
3805
3867
|
component_key: meta.id,
|
|
@@ -3813,13 +3875,13 @@ var AgentHeader = (props) => {
|
|
|
3813
3875
|
return void 0;
|
|
3814
3876
|
}, [extraMeta]);
|
|
3815
3877
|
return /* @__PURE__ */ jsxs16("div", { children: [
|
|
3816
|
-
/* @__PURE__ */
|
|
3878
|
+
/* @__PURE__ */ jsx30(
|
|
3817
3879
|
Welcome,
|
|
3818
3880
|
{
|
|
3819
3881
|
style: { padding: 8 },
|
|
3820
3882
|
variant: "borderless",
|
|
3821
|
-
description: description ? /* @__PURE__ */
|
|
3822
|
-
icon: /* @__PURE__ */
|
|
3883
|
+
description: description ? /* @__PURE__ */ jsx30(Text10, { ellipsis: { tooltip: description }, children: description }) : void 0,
|
|
3884
|
+
icon: /* @__PURE__ */ jsx30(
|
|
3823
3885
|
"div",
|
|
3824
3886
|
{
|
|
3825
3887
|
style: {
|
|
@@ -3827,19 +3889,20 @@ var AgentHeader = (props) => {
|
|
|
3827
3889
|
alignItems: "center",
|
|
3828
3890
|
justifyContent: "center"
|
|
3829
3891
|
},
|
|
3830
|
-
children: avatar ? /* @__PURE__ */
|
|
3892
|
+
children: avatar ? /* @__PURE__ */ jsx30(Avatar2, { src: avatar, size: 48 }) : /* @__PURE__ */ jsx30(Avatar2, { size: 48, children: name?.charAt(0).toUpperCase() })
|
|
3831
3893
|
}
|
|
3832
3894
|
),
|
|
3833
3895
|
title: name ? name : void 0,
|
|
3834
3896
|
extra: /* @__PURE__ */ jsxs16(Space12, { children: [
|
|
3835
3897
|
extra,
|
|
3836
|
-
/* @__PURE__ */
|
|
3837
|
-
/* @__PURE__ */
|
|
3838
|
-
|
|
3898
|
+
/* @__PURE__ */ jsx30(TodoProgress, {}),
|
|
3899
|
+
/* @__PURE__ */ jsx30(FileExplorerButton, {}),
|
|
3900
|
+
/* @__PURE__ */ jsx30(ScheduleButton, {}),
|
|
3901
|
+
extraMetaComponents && /* @__PURE__ */ jsx30(Space12, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
|
|
3839
3902
|
] })
|
|
3840
3903
|
}
|
|
3841
3904
|
),
|
|
3842
|
-
/* @__PURE__ */
|
|
3905
|
+
/* @__PURE__ */ jsx30(
|
|
3843
3906
|
"div",
|
|
3844
3907
|
{
|
|
3845
3908
|
style: {
|
|
@@ -3851,7 +3914,7 @@ var AgentHeader = (props) => {
|
|
|
3851
3914
|
};
|
|
3852
3915
|
|
|
3853
3916
|
// src/components/Chat/Chating.tsx
|
|
3854
|
-
import { Fragment as Fragment4, jsx as
|
|
3917
|
+
import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3855
3918
|
var Chating = ({
|
|
3856
3919
|
avatar,
|
|
3857
3920
|
name,
|
|
@@ -3867,12 +3930,12 @@ var Chating = ({
|
|
|
3867
3930
|
showHITL = true,
|
|
3868
3931
|
showRefreshButton = false
|
|
3869
3932
|
}) => {
|
|
3870
|
-
const [content, setContent] =
|
|
3871
|
-
const [attachedFiles, setAttachedFiles] =
|
|
3933
|
+
const [content, setContent] = useState17("");
|
|
3934
|
+
const [attachedFiles, setAttachedFiles] = useState17([]);
|
|
3872
3935
|
const { styles } = useStyle();
|
|
3873
|
-
const [headerOpen, setHeaderOpen] =
|
|
3936
|
+
const [headerOpen, setHeaderOpen] = useState17(false);
|
|
3874
3937
|
const attachmentsRef = useRef8(null);
|
|
3875
|
-
const senderRef =
|
|
3938
|
+
const senderRef = React8.useRef(null);
|
|
3876
3939
|
const {
|
|
3877
3940
|
messages,
|
|
3878
3941
|
sendMessage,
|
|
@@ -3884,7 +3947,7 @@ var Chating = ({
|
|
|
3884
3947
|
tenantId,
|
|
3885
3948
|
clearError
|
|
3886
3949
|
} = useAgentChat();
|
|
3887
|
-
|
|
3950
|
+
useEffect11(() => {
|
|
3888
3951
|
regsiterElement("action_show_attachments_uploader", {
|
|
3889
3952
|
card_view: () => null,
|
|
3890
3953
|
action: (data) => {
|
|
@@ -3969,15 +4032,15 @@ var Chating = ({
|
|
|
3969
4032
|
}
|
|
3970
4033
|
return true;
|
|
3971
4034
|
};
|
|
3972
|
-
const attachmentsNode = /* @__PURE__ */
|
|
3973
|
-
|
|
4035
|
+
const attachmentsNode = /* @__PURE__ */ jsx31(Badge3, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ jsx31(
|
|
4036
|
+
Button12,
|
|
3974
4037
|
{
|
|
3975
4038
|
type: "text",
|
|
3976
|
-
icon: /* @__PURE__ */
|
|
4039
|
+
icon: /* @__PURE__ */ jsx31(PaperClipOutlined, {}),
|
|
3977
4040
|
onClick: () => setHeaderOpen(!headerOpen)
|
|
3978
4041
|
}
|
|
3979
4042
|
) });
|
|
3980
|
-
const senderHeader = /* @__PURE__ */
|
|
4043
|
+
const senderHeader = /* @__PURE__ */ jsx31(
|
|
3981
4044
|
Sender.Header,
|
|
3982
4045
|
{
|
|
3983
4046
|
title: "Attachments",
|
|
@@ -3989,7 +4052,7 @@ var Chating = ({
|
|
|
3989
4052
|
}
|
|
3990
4053
|
},
|
|
3991
4054
|
forceRender: true,
|
|
3992
|
-
children: /* @__PURE__ */
|
|
4055
|
+
children: /* @__PURE__ */ jsx31(
|
|
3993
4056
|
Attachments,
|
|
3994
4057
|
{
|
|
3995
4058
|
ref: attachmentsRef,
|
|
@@ -4011,7 +4074,7 @@ var Chating = ({
|
|
|
4011
4074
|
multiple: true,
|
|
4012
4075
|
maxCount: 10,
|
|
4013
4076
|
placeholder: (type) => ({
|
|
4014
|
-
icon: /* @__PURE__ */
|
|
4077
|
+
icon: /* @__PURE__ */ jsx31(CloudUploadOutlined, {}),
|
|
4015
4078
|
title: "\u4E0A\u4F20\u6587\u4EF6",
|
|
4016
4079
|
description: attachment_placeholder
|
|
4017
4080
|
})
|
|
@@ -4019,11 +4082,11 @@ var Chating = ({
|
|
|
4019
4082
|
)
|
|
4020
4083
|
}
|
|
4021
4084
|
);
|
|
4022
|
-
const refreshButton = /* @__PURE__ */
|
|
4023
|
-
|
|
4085
|
+
const refreshButton = /* @__PURE__ */ jsx31(
|
|
4086
|
+
Button12,
|
|
4024
4087
|
{
|
|
4025
4088
|
type: "text",
|
|
4026
|
-
icon: /* @__PURE__ */
|
|
4089
|
+
icon: /* @__PURE__ */ jsx31(ReloadOutlined, {}),
|
|
4027
4090
|
onClick: () => {
|
|
4028
4091
|
loadMessages();
|
|
4029
4092
|
}
|
|
@@ -4031,7 +4094,7 @@ var Chating = ({
|
|
|
4031
4094
|
);
|
|
4032
4095
|
const headerExtra = showRefreshButton ? [refreshButton] : [];
|
|
4033
4096
|
return /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
4034
|
-
/* @__PURE__ */
|
|
4097
|
+
/* @__PURE__ */ jsx31("div", { children: showHeader && /* @__PURE__ */ jsx31(
|
|
4035
4098
|
AgentHeader,
|
|
4036
4099
|
{
|
|
4037
4100
|
description,
|
|
@@ -4041,9 +4104,9 @@ var Chating = ({
|
|
|
4041
4104
|
extraMeta
|
|
4042
4105
|
}
|
|
4043
4106
|
) }),
|
|
4044
|
-
/* @__PURE__ */
|
|
4045
|
-
isLoading ? /* @__PURE__ */
|
|
4046
|
-
error && /* @__PURE__ */
|
|
4107
|
+
/* @__PURE__ */ jsx31(MessageList, { messages, className: styles.messages }),
|
|
4108
|
+
isLoading ? /* @__PURE__ */ jsx31("div", {}) : /* @__PURE__ */ jsx31(Prompts, { items: senderPromptsItems, onItemClick: onPromptsItemClick }),
|
|
4109
|
+
error && /* @__PURE__ */ jsx31("div", { style: { padding: "0 16px 8px" }, children: /* @__PURE__ */ jsx31(
|
|
4047
4110
|
Alert2,
|
|
4048
4111
|
{
|
|
4049
4112
|
type: "error",
|
|
@@ -4053,8 +4116,8 @@ var Chating = ({
|
|
|
4053
4116
|
message: `${error.message}`
|
|
4054
4117
|
}
|
|
4055
4118
|
) }),
|
|
4056
|
-
showHITL && /* @__PURE__ */
|
|
4057
|
-
showSender && /* @__PURE__ */
|
|
4119
|
+
showHITL && /* @__PURE__ */ jsx31(HITLContainer, {}),
|
|
4120
|
+
showSender && /* @__PURE__ */ jsx31(
|
|
4058
4121
|
Sender,
|
|
4059
4122
|
{
|
|
4060
4123
|
disabled: interrupts && interrupts.length > 0,
|
|
@@ -4080,11 +4143,11 @@ var Chating = ({
|
|
|
4080
4143
|
};
|
|
4081
4144
|
|
|
4082
4145
|
// src/components/GenUI/elements/task_detail.tsx
|
|
4083
|
-
import { jsx as
|
|
4146
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4084
4147
|
var { Text: Text11 } = Typography13;
|
|
4085
4148
|
var TaskDetail = ({ data, component_key, interactive = true }) => {
|
|
4086
4149
|
const { description, subagent_type, thread_id } = data || {};
|
|
4087
|
-
return /* @__PURE__ */
|
|
4150
|
+
return /* @__PURE__ */ jsx32(
|
|
4088
4151
|
AgentThreadProvider,
|
|
4089
4152
|
{
|
|
4090
4153
|
threadId: thread_id,
|
|
@@ -4094,7 +4157,7 @@ var TaskDetail = ({ data, component_key, interactive = true }) => {
|
|
|
4094
4157
|
enableReturnStateWhenStreamCompleted: true,
|
|
4095
4158
|
enableResumeStream: true
|
|
4096
4159
|
},
|
|
4097
|
-
children: /* @__PURE__ */
|
|
4160
|
+
children: /* @__PURE__ */ jsx32("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx32(
|
|
4098
4161
|
Chating,
|
|
4099
4162
|
{
|
|
4100
4163
|
showRefreshButton: true,
|
|
@@ -4109,12 +4172,12 @@ var TaskDetail = ({ data, component_key, interactive = true }) => {
|
|
|
4109
4172
|
};
|
|
4110
4173
|
|
|
4111
4174
|
// src/components/GenUI/elements/internet_search_card.tsx
|
|
4112
|
-
import { Avatar as Avatar3, Button as
|
|
4175
|
+
import { Avatar as Avatar3, Button as Button13, List as List2, Space as Space13, Typography as Typography14 } from "antd";
|
|
4113
4176
|
import {
|
|
4114
4177
|
SearchOutlined
|
|
4115
4178
|
} from "@ant-design/icons";
|
|
4116
4179
|
import { createStyles as createStyles9 } from "antd-style";
|
|
4117
|
-
import { jsx as
|
|
4180
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4118
4181
|
var { Text: Text12 } = Typography14;
|
|
4119
4182
|
var useStyle7 = createStyles9(({ token, css }) => ({
|
|
4120
4183
|
listContainer: css`
|
|
@@ -4230,16 +4293,16 @@ var InternetSearchCard = ({
|
|
|
4230
4293
|
return null;
|
|
4231
4294
|
}
|
|
4232
4295
|
const header = /* @__PURE__ */ jsxs18(Space13, { children: [
|
|
4233
|
-
/* @__PURE__ */
|
|
4234
|
-
/* @__PURE__ */
|
|
4296
|
+
/* @__PURE__ */ jsx33(Text12, { strong: true, children: "Internet Search" }),
|
|
4297
|
+
/* @__PURE__ */ jsx33(Text12, { title: query, children: query })
|
|
4235
4298
|
] });
|
|
4236
|
-
return /* @__PURE__ */
|
|
4299
|
+
return /* @__PURE__ */ jsx33(
|
|
4237
4300
|
ContentPreviewCollapse,
|
|
4238
4301
|
{
|
|
4239
4302
|
panelKey: toolCallData.id,
|
|
4240
4303
|
header,
|
|
4241
|
-
expandIcon: () => /* @__PURE__ */
|
|
4242
|
-
children: /* @__PURE__ */
|
|
4304
|
+
expandIcon: () => /* @__PURE__ */ jsx33(SearchOutlined, {}),
|
|
4305
|
+
children: /* @__PURE__ */ jsx33(
|
|
4243
4306
|
List2,
|
|
4244
4307
|
{
|
|
4245
4308
|
size: "small",
|
|
@@ -4249,11 +4312,11 @@ var InternetSearchCard = ({
|
|
|
4249
4312
|
const domain = getDomainFromUrl(url);
|
|
4250
4313
|
const iconText = getIconText(domain);
|
|
4251
4314
|
const iconColor = getIconColor(domain);
|
|
4252
|
-
return /* @__PURE__ */
|
|
4253
|
-
/* @__PURE__ */
|
|
4315
|
+
return /* @__PURE__ */ jsx33(List2.Item, { extra: /* @__PURE__ */ jsx33(Text12, { className: styles.source, children: domain }), children: /* @__PURE__ */ jsxs18(Space13, { style: { width: "100%" }, children: [
|
|
4316
|
+
/* @__PURE__ */ jsx33(Avatar3, { style: { background: iconColor }, children: iconText }),
|
|
4254
4317
|
" ",
|
|
4255
|
-
/* @__PURE__ */
|
|
4256
|
-
|
|
4318
|
+
/* @__PURE__ */ jsx33(
|
|
4319
|
+
Button13,
|
|
4257
4320
|
{
|
|
4258
4321
|
type: "text",
|
|
4259
4322
|
onClick: () => {
|
|
@@ -4274,6 +4337,387 @@ var InternetSearchCard = ({
|
|
|
4274
4337
|
);
|
|
4275
4338
|
};
|
|
4276
4339
|
|
|
4340
|
+
// src/components/GenUI/elements/schedule_viewer.tsx
|
|
4341
|
+
import { useState as useState18, useEffect as useEffect12, useCallback as useCallback9 } from "react";
|
|
4342
|
+
import {
|
|
4343
|
+
Tag as Tag5,
|
|
4344
|
+
Button as Button14,
|
|
4345
|
+
Empty as Empty3,
|
|
4346
|
+
Spin as Spin2,
|
|
4347
|
+
Typography as Typography15,
|
|
4348
|
+
Space as Space14,
|
|
4349
|
+
Tooltip as Tooltip5,
|
|
4350
|
+
Popconfirm,
|
|
4351
|
+
message as message4,
|
|
4352
|
+
Card as Card7,
|
|
4353
|
+
Descriptions
|
|
4354
|
+
} from "antd";
|
|
4355
|
+
import {
|
|
4356
|
+
ClockCircleOutlined as ClockCircleOutlined2,
|
|
4357
|
+
PauseCircleOutlined,
|
|
4358
|
+
PlayCircleOutlined,
|
|
4359
|
+
StopOutlined,
|
|
4360
|
+
ReloadOutlined as ReloadOutlined2,
|
|
4361
|
+
CheckCircleOutlined as CheckCircleOutlined4,
|
|
4362
|
+
CloseCircleOutlined as CloseCircleOutlined2,
|
|
4363
|
+
ExclamationCircleOutlined,
|
|
4364
|
+
SyncOutlined as SyncOutlined2,
|
|
4365
|
+
FieldTimeOutlined
|
|
4366
|
+
} from "@ant-design/icons";
|
|
4367
|
+
import { createStyles as createStyles10 } from "antd-style";
|
|
4368
|
+
import dayjs2 from "dayjs";
|
|
4369
|
+
import relativeTime from "dayjs/plugin/relativeTime";
|
|
4370
|
+
import {
|
|
4371
|
+
ScheduledTaskStatus as ScheduledTaskStatus2,
|
|
4372
|
+
ScheduleExecutionType
|
|
4373
|
+
} from "@axiom-lattice/client-sdk";
|
|
4374
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4375
|
+
dayjs2.extend(relativeTime);
|
|
4376
|
+
var { Text: Text13, Title: Title2 } = Typography15;
|
|
4377
|
+
var useStyles3 = createStyles10(({ token, css }) => ({
|
|
4378
|
+
container: css`
|
|
4379
|
+
height: 100%;
|
|
4380
|
+
padding: 16px;
|
|
4381
|
+
overflow: auto;
|
|
4382
|
+
background: ${token.colorBgContainer};
|
|
4383
|
+
`,
|
|
4384
|
+
header: css`
|
|
4385
|
+
display: flex;
|
|
4386
|
+
justify-content: space-between;
|
|
4387
|
+
align-items: center;
|
|
4388
|
+
margin-bottom: 16px;
|
|
4389
|
+
padding-bottom: 12px;
|
|
4390
|
+
border-bottom: 1px solid ${token.colorBorderSecondary};
|
|
4391
|
+
`,
|
|
4392
|
+
taskCard: css`
|
|
4393
|
+
margin-bottom: 12px;
|
|
4394
|
+
border-radius: ${token.borderRadiusLG}px;
|
|
4395
|
+
transition: box-shadow 0.2s;
|
|
4396
|
+
|
|
4397
|
+
&:hover {
|
|
4398
|
+
box-shadow: ${token.boxShadowSecondary};
|
|
4399
|
+
}
|
|
4400
|
+
`,
|
|
4401
|
+
taskHeader: css`
|
|
4402
|
+
display: flex;
|
|
4403
|
+
justify-content: space-between;
|
|
4404
|
+
align-items: flex-start;
|
|
4405
|
+
margin-bottom: 8px;
|
|
4406
|
+
`,
|
|
4407
|
+
taskType: css`
|
|
4408
|
+
font-weight: 600;
|
|
4409
|
+
font-size: 14px;
|
|
4410
|
+
color: ${token.colorText};
|
|
4411
|
+
`,
|
|
4412
|
+
taskId: css`
|
|
4413
|
+
font-family: monospace;
|
|
4414
|
+
font-size: 11px;
|
|
4415
|
+
color: ${token.colorTextSecondary};
|
|
4416
|
+
word-break: break-all;
|
|
4417
|
+
`,
|
|
4418
|
+
metaRow: css`
|
|
4419
|
+
display: flex;
|
|
4420
|
+
flex-wrap: wrap;
|
|
4421
|
+
gap: 16px;
|
|
4422
|
+
margin-top: 8px;
|
|
4423
|
+
`,
|
|
4424
|
+
metaItem: css`
|
|
4425
|
+
display: flex;
|
|
4426
|
+
align-items: center;
|
|
4427
|
+
gap: 6px;
|
|
4428
|
+
font-size: 12px;
|
|
4429
|
+
color: ${token.colorTextSecondary};
|
|
4430
|
+
`,
|
|
4431
|
+
actions: css`
|
|
4432
|
+
display: flex;
|
|
4433
|
+
gap: 4px;
|
|
4434
|
+
margin-top: 12px;
|
|
4435
|
+
padding-top: 12px;
|
|
4436
|
+
border-top: 1px solid ${token.colorBorderSecondary};
|
|
4437
|
+
`,
|
|
4438
|
+
emptyContainer: css`
|
|
4439
|
+
display: flex;
|
|
4440
|
+
flex-direction: column;
|
|
4441
|
+
align-items: center;
|
|
4442
|
+
justify-content: center;
|
|
4443
|
+
height: 300px;
|
|
4444
|
+
`,
|
|
4445
|
+
cronExpression: css`
|
|
4446
|
+
font-family: monospace;
|
|
4447
|
+
background: ${token.colorFillSecondary};
|
|
4448
|
+
padding: 2px 6px;
|
|
4449
|
+
border-radius: 4px;
|
|
4450
|
+
font-size: 12px;
|
|
4451
|
+
`
|
|
4452
|
+
}));
|
|
4453
|
+
var getStatusColor = (status) => {
|
|
4454
|
+
switch (status) {
|
|
4455
|
+
case ScheduledTaskStatus2.PENDING:
|
|
4456
|
+
return "processing";
|
|
4457
|
+
case ScheduledTaskStatus2.RUNNING:
|
|
4458
|
+
return "blue";
|
|
4459
|
+
case ScheduledTaskStatus2.COMPLETED:
|
|
4460
|
+
return "success";
|
|
4461
|
+
case ScheduledTaskStatus2.FAILED:
|
|
4462
|
+
return "error";
|
|
4463
|
+
case ScheduledTaskStatus2.CANCELLED:
|
|
4464
|
+
return "default";
|
|
4465
|
+
case ScheduledTaskStatus2.PAUSED:
|
|
4466
|
+
return "warning";
|
|
4467
|
+
default:
|
|
4468
|
+
return "default";
|
|
4469
|
+
}
|
|
4470
|
+
};
|
|
4471
|
+
var getStatusIcon2 = (status) => {
|
|
4472
|
+
switch (status) {
|
|
4473
|
+
case ScheduledTaskStatus2.PENDING:
|
|
4474
|
+
return /* @__PURE__ */ jsx34(ClockCircleOutlined2, {});
|
|
4475
|
+
case ScheduledTaskStatus2.RUNNING:
|
|
4476
|
+
return /* @__PURE__ */ jsx34(SyncOutlined2, { spin: true });
|
|
4477
|
+
case ScheduledTaskStatus2.COMPLETED:
|
|
4478
|
+
return /* @__PURE__ */ jsx34(CheckCircleOutlined4, {});
|
|
4479
|
+
case ScheduledTaskStatus2.FAILED:
|
|
4480
|
+
return /* @__PURE__ */ jsx34(CloseCircleOutlined2, {});
|
|
4481
|
+
case ScheduledTaskStatus2.CANCELLED:
|
|
4482
|
+
return /* @__PURE__ */ jsx34(StopOutlined, {});
|
|
4483
|
+
case ScheduledTaskStatus2.PAUSED:
|
|
4484
|
+
return /* @__PURE__ */ jsx34(PauseCircleOutlined, {});
|
|
4485
|
+
default:
|
|
4486
|
+
return /* @__PURE__ */ jsx34(ClockCircleOutlined2, {});
|
|
4487
|
+
}
|
|
4488
|
+
};
|
|
4489
|
+
var formatTime = (timestamp) => {
|
|
4490
|
+
if (!timestamp) return "-";
|
|
4491
|
+
return dayjs2(timestamp).format("YYYY-MM-DD HH:mm:ss");
|
|
4492
|
+
};
|
|
4493
|
+
var getRelativeTime = (timestamp) => {
|
|
4494
|
+
if (!timestamp) return "";
|
|
4495
|
+
return dayjs2(timestamp).fromNow();
|
|
4496
|
+
};
|
|
4497
|
+
var ScheduleViewer = ({ data }) => {
|
|
4498
|
+
const { styles } = useStyles3();
|
|
4499
|
+
const { threadId, assistantId, tasks: initialTasks, onRefresh } = data ?? {};
|
|
4500
|
+
const client = useAxiomLattice({ assistantId });
|
|
4501
|
+
const [tasks, setTasks] = useState18(initialTasks || []);
|
|
4502
|
+
const [loading, setLoading] = useState18(false);
|
|
4503
|
+
const [actionLoading, setActionLoading] = useState18(null);
|
|
4504
|
+
const handleRefresh = useCallback9(async () => {
|
|
4505
|
+
if (!threadId) return;
|
|
4506
|
+
setLoading(true);
|
|
4507
|
+
try {
|
|
4508
|
+
const fetchedTasks = await client.schedules.getByThread({ threadId });
|
|
4509
|
+
setTasks(fetchedTasks);
|
|
4510
|
+
onRefresh?.();
|
|
4511
|
+
} catch (error) {
|
|
4512
|
+
console.error("Failed to refresh tasks:", error);
|
|
4513
|
+
message4.error("Failed to refresh scheduled tasks");
|
|
4514
|
+
} finally {
|
|
4515
|
+
setLoading(false);
|
|
4516
|
+
}
|
|
4517
|
+
}, [client, threadId, onRefresh]);
|
|
4518
|
+
const handleCancel = useCallback9(
|
|
4519
|
+
async (taskId) => {
|
|
4520
|
+
setActionLoading(taskId);
|
|
4521
|
+
try {
|
|
4522
|
+
await client.schedules.cancel(taskId);
|
|
4523
|
+
message4.success("Task cancelled successfully");
|
|
4524
|
+
await handleRefresh();
|
|
4525
|
+
} catch (error) {
|
|
4526
|
+
console.error("Failed to cancel task:", error);
|
|
4527
|
+
message4.error("Failed to cancel task");
|
|
4528
|
+
} finally {
|
|
4529
|
+
setActionLoading(null);
|
|
4530
|
+
}
|
|
4531
|
+
},
|
|
4532
|
+
[client, handleRefresh]
|
|
4533
|
+
);
|
|
4534
|
+
const handlePause = useCallback9(
|
|
4535
|
+
async (taskId) => {
|
|
4536
|
+
setActionLoading(taskId);
|
|
4537
|
+
try {
|
|
4538
|
+
await client.schedules.pause(taskId);
|
|
4539
|
+
message4.success("Task paused successfully");
|
|
4540
|
+
await handleRefresh();
|
|
4541
|
+
} catch (error) {
|
|
4542
|
+
console.error("Failed to pause task:", error);
|
|
4543
|
+
message4.error("Failed to pause task");
|
|
4544
|
+
} finally {
|
|
4545
|
+
setActionLoading(null);
|
|
4546
|
+
}
|
|
4547
|
+
},
|
|
4548
|
+
[client, handleRefresh]
|
|
4549
|
+
);
|
|
4550
|
+
const handleResume = useCallback9(
|
|
4551
|
+
async (taskId) => {
|
|
4552
|
+
setActionLoading(taskId);
|
|
4553
|
+
try {
|
|
4554
|
+
await client.schedules.resume(taskId);
|
|
4555
|
+
message4.success("Task resumed successfully");
|
|
4556
|
+
await handleRefresh();
|
|
4557
|
+
} catch (error) {
|
|
4558
|
+
console.error("Failed to resume task:", error);
|
|
4559
|
+
message4.error("Failed to resume task");
|
|
4560
|
+
} finally {
|
|
4561
|
+
setActionLoading(null);
|
|
4562
|
+
}
|
|
4563
|
+
},
|
|
4564
|
+
[client, handleRefresh]
|
|
4565
|
+
);
|
|
4566
|
+
useEffect12(() => {
|
|
4567
|
+
if (threadId && (!initialTasks || initialTasks.length === 0)) {
|
|
4568
|
+
handleRefresh();
|
|
4569
|
+
}
|
|
4570
|
+
}, [threadId]);
|
|
4571
|
+
useEffect12(() => {
|
|
4572
|
+
if (initialTasks) {
|
|
4573
|
+
setTasks(initialTasks);
|
|
4574
|
+
}
|
|
4575
|
+
}, [initialTasks]);
|
|
4576
|
+
const renderActions = (task) => {
|
|
4577
|
+
const isLoading = actionLoading === task.taskId;
|
|
4578
|
+
const isPending = task.status === ScheduledTaskStatus2.PENDING;
|
|
4579
|
+
const isPaused = task.status === ScheduledTaskStatus2.PAUSED;
|
|
4580
|
+
const isCron = task.executionType === ScheduleExecutionType.CRON;
|
|
4581
|
+
return /* @__PURE__ */ jsxs19(Space14, { className: styles.actions, children: [
|
|
4582
|
+
isPending && isCron && /* @__PURE__ */ jsx34(Tooltip5, { title: "Pause", children: /* @__PURE__ */ jsx34(
|
|
4583
|
+
Button14,
|
|
4584
|
+
{
|
|
4585
|
+
type: "text",
|
|
4586
|
+
size: "small",
|
|
4587
|
+
icon: /* @__PURE__ */ jsx34(PauseCircleOutlined, {}),
|
|
4588
|
+
onClick: () => handlePause(task.taskId),
|
|
4589
|
+
loading: isLoading
|
|
4590
|
+
}
|
|
4591
|
+
) }),
|
|
4592
|
+
isPaused && /* @__PURE__ */ jsx34(Tooltip5, { title: "Resume", children: /* @__PURE__ */ jsx34(
|
|
4593
|
+
Button14,
|
|
4594
|
+
{
|
|
4595
|
+
type: "text",
|
|
4596
|
+
size: "small",
|
|
4597
|
+
icon: /* @__PURE__ */ jsx34(PlayCircleOutlined, {}),
|
|
4598
|
+
onClick: () => handleResume(task.taskId),
|
|
4599
|
+
loading: isLoading
|
|
4600
|
+
}
|
|
4601
|
+
) }),
|
|
4602
|
+
(isPending || isPaused) && /* @__PURE__ */ jsx34(
|
|
4603
|
+
Popconfirm,
|
|
4604
|
+
{
|
|
4605
|
+
title: "Cancel this scheduled task?",
|
|
4606
|
+
description: "This action cannot be undone.",
|
|
4607
|
+
onConfirm: () => handleCancel(task.taskId),
|
|
4608
|
+
okText: "Yes",
|
|
4609
|
+
cancelText: "No",
|
|
4610
|
+
children: /* @__PURE__ */ jsx34(Tooltip5, { title: "Cancel", children: /* @__PURE__ */ jsx34(
|
|
4611
|
+
Button14,
|
|
4612
|
+
{
|
|
4613
|
+
type: "text",
|
|
4614
|
+
size: "small",
|
|
4615
|
+
danger: true,
|
|
4616
|
+
icon: /* @__PURE__ */ jsx34(StopOutlined, {}),
|
|
4617
|
+
loading: isLoading
|
|
4618
|
+
}
|
|
4619
|
+
) })
|
|
4620
|
+
}
|
|
4621
|
+
)
|
|
4622
|
+
] });
|
|
4623
|
+
};
|
|
4624
|
+
const renderTask = (task) => {
|
|
4625
|
+
const isActive = task.status === ScheduledTaskStatus2.PENDING || task.status === ScheduledTaskStatus2.PAUSED;
|
|
4626
|
+
return /* @__PURE__ */ jsxs19(
|
|
4627
|
+
Card7,
|
|
4628
|
+
{
|
|
4629
|
+
className: styles.taskCard,
|
|
4630
|
+
size: "small",
|
|
4631
|
+
bordered: true,
|
|
4632
|
+
children: [
|
|
4633
|
+
/* @__PURE__ */ jsxs19("div", { className: styles.taskHeader, children: [
|
|
4634
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
4635
|
+
/* @__PURE__ */ jsx34("div", { className: styles.taskType, children: task.taskType }),
|
|
4636
|
+
/* @__PURE__ */ jsx34("div", { className: styles.taskId, children: task.taskId })
|
|
4637
|
+
] }),
|
|
4638
|
+
/* @__PURE__ */ jsx34(Tag5, { color: getStatusColor(task.status), icon: getStatusIcon2(task.status), children: task.status.toUpperCase() })
|
|
4639
|
+
] }),
|
|
4640
|
+
/* @__PURE__ */ jsxs19("div", { className: styles.metaRow, children: [
|
|
4641
|
+
/* @__PURE__ */ jsx34(Tooltip5, { title: "Execution Type", children: /* @__PURE__ */ jsxs19("div", { className: styles.metaItem, children: [
|
|
4642
|
+
/* @__PURE__ */ jsx34(FieldTimeOutlined, {}),
|
|
4643
|
+
/* @__PURE__ */ jsx34("span", { children: task.executionType === ScheduleExecutionType.CRON ? "Recurring" : "One-time" })
|
|
4644
|
+
] }) }),
|
|
4645
|
+
task.cronExpression && /* @__PURE__ */ jsx34(Tooltip5, { title: "Cron Expression", children: /* @__PURE__ */ jsxs19("div", { className: styles.metaItem, children: [
|
|
4646
|
+
/* @__PURE__ */ jsx34(ClockCircleOutlined2, {}),
|
|
4647
|
+
/* @__PURE__ */ jsx34("code", { className: styles.cronExpression, children: task.cronExpression })
|
|
4648
|
+
] }) }),
|
|
4649
|
+
task.nextRunAt && /* @__PURE__ */ jsx34(Tooltip5, { title: `Next run: ${formatTime(task.nextRunAt)}`, children: /* @__PURE__ */ jsxs19("div", { className: styles.metaItem, children: [
|
|
4650
|
+
/* @__PURE__ */ jsx34(ClockCircleOutlined2, {}),
|
|
4651
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
4652
|
+
"Next: ",
|
|
4653
|
+
getRelativeTime(task.nextRunAt)
|
|
4654
|
+
] })
|
|
4655
|
+
] }) }),
|
|
4656
|
+
task.executeAt && !task.cronExpression && /* @__PURE__ */ jsx34(Tooltip5, { title: `Execute at: ${formatTime(task.executeAt)}`, children: /* @__PURE__ */ jsxs19("div", { className: styles.metaItem, children: [
|
|
4657
|
+
/* @__PURE__ */ jsx34(ClockCircleOutlined2, {}),
|
|
4658
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
4659
|
+
"At: ",
|
|
4660
|
+
getRelativeTime(task.executeAt)
|
|
4661
|
+
] })
|
|
4662
|
+
] }) }),
|
|
4663
|
+
task.runCount > 0 && /* @__PURE__ */ jsx34(Tooltip5, { title: "Run count", children: /* @__PURE__ */ jsxs19("div", { className: styles.metaItem, children: [
|
|
4664
|
+
/* @__PURE__ */ jsx34(SyncOutlined2, {}),
|
|
4665
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
4666
|
+
"Runs: ",
|
|
4667
|
+
task.runCount,
|
|
4668
|
+
task.maxRuns ? ` / ${task.maxRuns}` : ""
|
|
4669
|
+
] })
|
|
4670
|
+
] }) })
|
|
4671
|
+
] }),
|
|
4672
|
+
task.lastError && /* @__PURE__ */ jsx34("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ jsxs19(Text13, { type: "danger", style: { fontSize: 12 }, children: [
|
|
4673
|
+
/* @__PURE__ */ jsx34(ExclamationCircleOutlined, { style: { marginRight: 4 } }),
|
|
4674
|
+
task.lastError
|
|
4675
|
+
] }) }),
|
|
4676
|
+
task.metadata && Object.keys(task.metadata).length > 0 && /* @__PURE__ */ jsx34(
|
|
4677
|
+
Descriptions,
|
|
4678
|
+
{
|
|
4679
|
+
size: "small",
|
|
4680
|
+
column: 1,
|
|
4681
|
+
style: { marginTop: 12 },
|
|
4682
|
+
items: Object.entries(task.metadata).map(([key, value]) => ({
|
|
4683
|
+
key,
|
|
4684
|
+
label: key,
|
|
4685
|
+
children: typeof value === "object" ? JSON.stringify(value) : String(value)
|
|
4686
|
+
}))
|
|
4687
|
+
}
|
|
4688
|
+
),
|
|
4689
|
+
isActive && renderActions(task)
|
|
4690
|
+
]
|
|
4691
|
+
},
|
|
4692
|
+
task.taskId
|
|
4693
|
+
);
|
|
4694
|
+
};
|
|
4695
|
+
return /* @__PURE__ */ jsxs19("div", { className: styles.container, children: [
|
|
4696
|
+
/* @__PURE__ */ jsxs19("div", { className: styles.header, children: [
|
|
4697
|
+
/* @__PURE__ */ jsx34(Title2, { level: 5, style: { margin: 0 }, children: "Scheduled Tasks" }),
|
|
4698
|
+
/* @__PURE__ */ jsx34(Tooltip5, { title: "Refresh", children: /* @__PURE__ */ jsx34(
|
|
4699
|
+
Button14,
|
|
4700
|
+
{
|
|
4701
|
+
type: "text",
|
|
4702
|
+
icon: /* @__PURE__ */ jsx34(ReloadOutlined2, { spin: loading }),
|
|
4703
|
+
onClick: handleRefresh,
|
|
4704
|
+
loading
|
|
4705
|
+
}
|
|
4706
|
+
) })
|
|
4707
|
+
] }),
|
|
4708
|
+
loading && tasks.length === 0 ? /* @__PURE__ */ jsxs19("div", { className: styles.emptyContainer, children: [
|
|
4709
|
+
/* @__PURE__ */ jsx34(Spin2, { size: "large" }),
|
|
4710
|
+
/* @__PURE__ */ jsx34(Text13, { type: "secondary", style: { marginTop: 16 }, children: "Loading scheduled tasks..." })
|
|
4711
|
+
] }) : tasks.length === 0 ? /* @__PURE__ */ jsx34("div", { className: styles.emptyContainer, children: /* @__PURE__ */ jsx34(
|
|
4712
|
+
Empty3,
|
|
4713
|
+
{
|
|
4714
|
+
image: Empty3.PRESENTED_IMAGE_SIMPLE,
|
|
4715
|
+
description: "No scheduled tasks for this thread"
|
|
4716
|
+
}
|
|
4717
|
+
) }) : /* @__PURE__ */ jsx34("div", { children: tasks.map(renderTask) })
|
|
4718
|
+
] });
|
|
4719
|
+
};
|
|
4720
|
+
|
|
4277
4721
|
// src/components/GenUI/elements/builtIns.tsx
|
|
4278
4722
|
var elements = {
|
|
4279
4723
|
action_show_attachments_uploader: {
|
|
@@ -4325,6 +4769,10 @@ var elements = {
|
|
|
4325
4769
|
task: {
|
|
4326
4770
|
card_view: TaskCard,
|
|
4327
4771
|
side_app_view: TaskDetail
|
|
4772
|
+
},
|
|
4773
|
+
schedule_viewer: {
|
|
4774
|
+
card_view: () => null,
|
|
4775
|
+
side_app_view: ScheduleViewer
|
|
4328
4776
|
}
|
|
4329
4777
|
};
|
|
4330
4778
|
|
|
@@ -4342,11 +4790,11 @@ var regsiterElement = (language, ElementMeta) => {
|
|
|
4342
4790
|
};
|
|
4343
4791
|
|
|
4344
4792
|
// src/components/Chat/SideAppViewBrowser.tsx
|
|
4345
|
-
import { Button as
|
|
4346
|
-
import { createStyles as
|
|
4347
|
-
import { useEffect as
|
|
4348
|
-
import { jsx as
|
|
4349
|
-
var useStyle8 =
|
|
4793
|
+
import { Button as Button15, Tabs } from "antd";
|
|
4794
|
+
import { createStyles as createStyles11 } from "antd-style";
|
|
4795
|
+
import { useEffect as useEffect13, useState as useState19 } from "react";
|
|
4796
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4797
|
+
var useStyle8 = createStyles11(({ token, css }) => {
|
|
4350
4798
|
return {
|
|
4351
4799
|
tabContainer: css`
|
|
4352
4800
|
.ant-tabs-content-holder {
|
|
@@ -4365,9 +4813,9 @@ var useStyle8 = createStyles10(({ token, css }) => {
|
|
|
4365
4813
|
};
|
|
4366
4814
|
});
|
|
4367
4815
|
var EmptySideAppView = ({ component_key, data }) => {
|
|
4368
|
-
return /* @__PURE__ */
|
|
4369
|
-
/* @__PURE__ */
|
|
4370
|
-
/* @__PURE__ */
|
|
4816
|
+
return /* @__PURE__ */ jsxs20("div", { children: [
|
|
4817
|
+
/* @__PURE__ */ jsx35("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
|
|
4818
|
+
/* @__PURE__ */ jsx35("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
|
|
4371
4819
|
] });
|
|
4372
4820
|
};
|
|
4373
4821
|
var SideAppViewBrowser = () => {
|
|
@@ -4379,10 +4827,10 @@ var SideAppViewBrowser = () => {
|
|
|
4379
4827
|
openSideApp,
|
|
4380
4828
|
closeSideApp
|
|
4381
4829
|
} = useChatUIContext();
|
|
4382
|
-
const [activeKey, setActiveKey] =
|
|
4830
|
+
const [activeKey, setActiveKey] = useState19(
|
|
4383
4831
|
JSON.stringify(sideAppSelectedCard)
|
|
4384
4832
|
);
|
|
4385
|
-
const [items, setItems] =
|
|
4833
|
+
const [items, setItems] = useState19([]);
|
|
4386
4834
|
const add = (key, label, children) => {
|
|
4387
4835
|
const newActiveKey = key;
|
|
4388
4836
|
const newPanes = [...items];
|
|
@@ -4418,7 +4866,7 @@ var SideAppViewBrowser = () => {
|
|
|
4418
4866
|
remove(targetKey);
|
|
4419
4867
|
}
|
|
4420
4868
|
};
|
|
4421
|
-
|
|
4869
|
+
useEffect13(() => {
|
|
4422
4870
|
const SideAppView = getElement(sideAppSelectedCard?.component_key).side_app_view || EmptySideAppView;
|
|
4423
4871
|
const key = JSON.stringify(sideAppSelectedCard);
|
|
4424
4872
|
if (items.find((item) => item.key === key)) {
|
|
@@ -4428,7 +4876,7 @@ var SideAppViewBrowser = () => {
|
|
|
4428
4876
|
add(
|
|
4429
4877
|
key,
|
|
4430
4878
|
sideAppSelectedCard?.message || sideAppSelectedCard?.data.message || "\u672A\u547D\u540D",
|
|
4431
|
-
/* @__PURE__ */
|
|
4879
|
+
/* @__PURE__ */ jsx35(
|
|
4432
4880
|
SideAppView,
|
|
4433
4881
|
{
|
|
4434
4882
|
component_key: sideAppSelectedCard?.component_key || "",
|
|
@@ -4469,16 +4917,16 @@ var SideAppViewBrowser = () => {
|
|
|
4469
4917
|
const getSizeIcon = (size) => {
|
|
4470
4918
|
switch (size) {
|
|
4471
4919
|
case "middle":
|
|
4472
|
-
return /* @__PURE__ */
|
|
4920
|
+
return /* @__PURE__ */ jsx35(CompressOutlined, {});
|
|
4473
4921
|
case "large":
|
|
4474
|
-
return /* @__PURE__ */
|
|
4922
|
+
return /* @__PURE__ */ jsx35(ExpandOutlined, {});
|
|
4475
4923
|
case "full":
|
|
4476
|
-
return /* @__PURE__ */
|
|
4924
|
+
return /* @__PURE__ */ jsx35(FullscreenOutlined, {});
|
|
4477
4925
|
default:
|
|
4478
|
-
return /* @__PURE__ */
|
|
4926
|
+
return /* @__PURE__ */ jsx35(ExpandOutlined, {});
|
|
4479
4927
|
}
|
|
4480
4928
|
};
|
|
4481
|
-
return /* @__PURE__ */
|
|
4929
|
+
return /* @__PURE__ */ jsx35(
|
|
4482
4930
|
Tabs,
|
|
4483
4931
|
{
|
|
4484
4932
|
className: styles.tabContainer,
|
|
@@ -4486,9 +4934,9 @@ var SideAppViewBrowser = () => {
|
|
|
4486
4934
|
style: { height: "100%" },
|
|
4487
4935
|
hideAdd: true,
|
|
4488
4936
|
tabBarExtraContent: {
|
|
4489
|
-
right: /* @__PURE__ */
|
|
4490
|
-
/* @__PURE__ */
|
|
4491
|
-
|
|
4937
|
+
right: /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "4px" }, children: [
|
|
4938
|
+
/* @__PURE__ */ jsx35(
|
|
4939
|
+
Button15,
|
|
4492
4940
|
{
|
|
4493
4941
|
style: { margin: "8px 0" },
|
|
4494
4942
|
size: "large",
|
|
@@ -4498,13 +4946,13 @@ var SideAppViewBrowser = () => {
|
|
|
4498
4946
|
title: `\u5F53\u524D\u5C3A\u5BF8: ${getSizeLabel(sideAppSize)}, \u70B9\u51FB\u5207\u6362`
|
|
4499
4947
|
}
|
|
4500
4948
|
),
|
|
4501
|
-
/* @__PURE__ */
|
|
4502
|
-
|
|
4949
|
+
/* @__PURE__ */ jsx35(
|
|
4950
|
+
Button15,
|
|
4503
4951
|
{
|
|
4504
4952
|
style: { margin: "8px 0" },
|
|
4505
4953
|
size: "large",
|
|
4506
4954
|
type: "text",
|
|
4507
|
-
icon: /* @__PURE__ */
|
|
4955
|
+
icon: /* @__PURE__ */ jsx35(CloseOutlined, {}),
|
|
4508
4956
|
onClick: () => {
|
|
4509
4957
|
closeSideApp();
|
|
4510
4958
|
}
|
|
@@ -4521,10 +4969,10 @@ var SideAppViewBrowser = () => {
|
|
|
4521
4969
|
};
|
|
4522
4970
|
|
|
4523
4971
|
// src/components/Chat/LatticeChat.tsx
|
|
4524
|
-
import { jsx as
|
|
4972
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4525
4973
|
var LatticeChat = (props) => {
|
|
4526
4974
|
const { assistant_id, thread_id = "", menu, header, ...chatingProps } = props;
|
|
4527
|
-
return /* @__PURE__ */
|
|
4975
|
+
return /* @__PURE__ */ jsx36(
|
|
4528
4976
|
AgentThreadProvider,
|
|
4529
4977
|
{
|
|
4530
4978
|
assistantId: assistant_id,
|
|
@@ -4534,7 +4982,7 @@ var LatticeChat = (props) => {
|
|
|
4534
4982
|
enableReturnStateWhenStreamCompleted: true,
|
|
4535
4983
|
enableResumeStream: true
|
|
4536
4984
|
},
|
|
4537
|
-
children: /* @__PURE__ */
|
|
4985
|
+
children: /* @__PURE__ */ jsx36(ChatUIContextProvider, { children: /* @__PURE__ */ jsxs21(
|
|
4538
4986
|
"div",
|
|
4539
4987
|
{
|
|
4540
4988
|
style: {
|
|
@@ -4545,12 +4993,12 @@ var LatticeChat = (props) => {
|
|
|
4545
4993
|
},
|
|
4546
4994
|
children: [
|
|
4547
4995
|
header,
|
|
4548
|
-
/* @__PURE__ */
|
|
4996
|
+
/* @__PURE__ */ jsx36(
|
|
4549
4997
|
ColumnLayout,
|
|
4550
4998
|
{
|
|
4551
4999
|
menu,
|
|
4552
|
-
left: thread_id ? /* @__PURE__ */
|
|
4553
|
-
right: /* @__PURE__ */
|
|
5000
|
+
left: thread_id ? /* @__PURE__ */ jsx36(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx36("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
|
|
5001
|
+
right: /* @__PURE__ */ jsx36(SideAppViewBrowser, {})
|
|
4554
5002
|
}
|
|
4555
5003
|
)
|
|
4556
5004
|
]
|
|
@@ -4563,23 +5011,23 @@ var LatticeChat = (props) => {
|
|
|
4563
5011
|
// src/components/Chat/ConversationContext.tsx
|
|
4564
5012
|
import {
|
|
4565
5013
|
createContext as createContext6,
|
|
4566
|
-
useCallback as
|
|
5014
|
+
useCallback as useCallback12,
|
|
4567
5015
|
useContext as useContext6,
|
|
4568
|
-
useEffect as
|
|
5016
|
+
useEffect as useEffect15,
|
|
4569
5017
|
useMemo as useMemo7,
|
|
4570
5018
|
useRef as useRef10,
|
|
4571
|
-
useState as
|
|
5019
|
+
useState as useState22
|
|
4572
5020
|
} from "react";
|
|
4573
5021
|
|
|
4574
5022
|
// src/components/Chat/AssistantContext.tsx
|
|
4575
5023
|
import {
|
|
4576
5024
|
createContext as createContext5,
|
|
4577
|
-
useCallback as
|
|
5025
|
+
useCallback as useCallback11,
|
|
4578
5026
|
useContext as useContext5,
|
|
4579
|
-
useEffect as
|
|
5027
|
+
useEffect as useEffect14,
|
|
4580
5028
|
useMemo as useMemo6,
|
|
4581
5029
|
useRef as useRef9,
|
|
4582
|
-
useState as
|
|
5030
|
+
useState as useState21
|
|
4583
5031
|
} from "react";
|
|
4584
5032
|
import {
|
|
4585
5033
|
Client as Client2
|
|
@@ -4588,11 +5036,11 @@ import {
|
|
|
4588
5036
|
// src/components/Chat/LatticeChatShellContext.tsx
|
|
4589
5037
|
import {
|
|
4590
5038
|
createContext as createContext4,
|
|
4591
|
-
useCallback as
|
|
5039
|
+
useCallback as useCallback10,
|
|
4592
5040
|
useContext as useContext4,
|
|
4593
|
-
useState as
|
|
5041
|
+
useState as useState20
|
|
4594
5042
|
} from "react";
|
|
4595
|
-
import { jsx as
|
|
5043
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4596
5044
|
var DEFAULT_CONFIG = {
|
|
4597
5045
|
baseURL: "http://localhost:4001",
|
|
4598
5046
|
apiKey: "",
|
|
@@ -4618,7 +5066,7 @@ var LatticeChatShellContextProvider = ({
|
|
|
4618
5066
|
persistToLocalStorage = false,
|
|
4619
5067
|
localStorageKey = "lattice_chat_shell_config"
|
|
4620
5068
|
}) => {
|
|
4621
|
-
const loadInitialConfig =
|
|
5069
|
+
const loadInitialConfig = useCallback10(() => {
|
|
4622
5070
|
if (persistToLocalStorage && typeof window !== "undefined") {
|
|
4623
5071
|
try {
|
|
4624
5072
|
const stored = localStorage.getItem(localStorageKey);
|
|
@@ -4632,9 +5080,9 @@ var LatticeChatShellContextProvider = ({
|
|
|
4632
5080
|
}
|
|
4633
5081
|
return { ...DEFAULT_CONFIG, ...initialConfig };
|
|
4634
5082
|
}, [persistToLocalStorage, localStorageKey, initialConfig]);
|
|
4635
|
-
const [config, setConfig] =
|
|
4636
|
-
const [settingsModalOpen, setSettingsModalOpen] =
|
|
4637
|
-
const saveToLocalStorage =
|
|
5083
|
+
const [config, setConfig] = useState20(loadInitialConfig);
|
|
5084
|
+
const [settingsModalOpen, setSettingsModalOpen] = useState20(false);
|
|
5085
|
+
const saveToLocalStorage = useCallback10(
|
|
4638
5086
|
(newConfig) => {
|
|
4639
5087
|
if (persistToLocalStorage && typeof window !== "undefined") {
|
|
4640
5088
|
try {
|
|
@@ -4646,7 +5094,7 @@ var LatticeChatShellContextProvider = ({
|
|
|
4646
5094
|
},
|
|
4647
5095
|
[persistToLocalStorage, localStorageKey]
|
|
4648
5096
|
);
|
|
4649
|
-
const updateConfig =
|
|
5097
|
+
const updateConfig = useCallback10(
|
|
4650
5098
|
(updates) => {
|
|
4651
5099
|
setConfig((prev) => {
|
|
4652
5100
|
const newConfig = { ...prev, ...updates };
|
|
@@ -4656,7 +5104,7 @@ var LatticeChatShellContextProvider = ({
|
|
|
4656
5104
|
},
|
|
4657
5105
|
[saveToLocalStorage]
|
|
4658
5106
|
);
|
|
4659
|
-
const updateConfigValue =
|
|
5107
|
+
const updateConfigValue = useCallback10(
|
|
4660
5108
|
(key, value) => {
|
|
4661
5109
|
setConfig((prev) => {
|
|
4662
5110
|
const newConfig = { ...prev, [key]: value };
|
|
@@ -4666,12 +5114,12 @@ var LatticeChatShellContextProvider = ({
|
|
|
4666
5114
|
},
|
|
4667
5115
|
[saveToLocalStorage]
|
|
4668
5116
|
);
|
|
4669
|
-
const resetConfig =
|
|
5117
|
+
const resetConfig = useCallback10(() => {
|
|
4670
5118
|
const defaultConfig = { ...DEFAULT_CONFIG, ...initialConfig };
|
|
4671
5119
|
setConfig(defaultConfig);
|
|
4672
5120
|
saveToLocalStorage(defaultConfig);
|
|
4673
5121
|
}, [initialConfig, saveToLocalStorage]);
|
|
4674
|
-
return /* @__PURE__ */
|
|
5122
|
+
return /* @__PURE__ */ jsx37(
|
|
4675
5123
|
LatticeChatShellContext.Provider,
|
|
4676
5124
|
{
|
|
4677
5125
|
value: {
|
|
@@ -4697,7 +5145,7 @@ var useLatticeChatShellContext = () => {
|
|
|
4697
5145
|
};
|
|
4698
5146
|
|
|
4699
5147
|
// src/components/Chat/AssistantContext.tsx
|
|
4700
|
-
import { jsx as
|
|
5148
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
4701
5149
|
var AssistantContext = createContext5({
|
|
4702
5150
|
assistants: [],
|
|
4703
5151
|
currentAssistant: null,
|
|
@@ -4740,17 +5188,17 @@ var AssistantContextProvider = ({
|
|
|
4740
5188
|
}),
|
|
4741
5189
|
[baseURL, apiKey, transport]
|
|
4742
5190
|
);
|
|
4743
|
-
const [state, setState] =
|
|
5191
|
+
const [state, setState] = useState21({
|
|
4744
5192
|
assistants: [],
|
|
4745
5193
|
currentAssistant: null,
|
|
4746
5194
|
isLoading: false,
|
|
4747
5195
|
error: null
|
|
4748
5196
|
});
|
|
4749
5197
|
const assistantsRef = useRef9([]);
|
|
4750
|
-
|
|
5198
|
+
useEffect14(() => {
|
|
4751
5199
|
assistantsRef.current = state.assistants;
|
|
4752
5200
|
}, [state.assistants]);
|
|
4753
|
-
const listAssistants =
|
|
5201
|
+
const listAssistants = useCallback11(async () => {
|
|
4754
5202
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
4755
5203
|
try {
|
|
4756
5204
|
const assistants = await client.assistants.list();
|
|
@@ -4767,7 +5215,7 @@ var AssistantContextProvider = ({
|
|
|
4767
5215
|
}));
|
|
4768
5216
|
}
|
|
4769
5217
|
}, [client]);
|
|
4770
|
-
const getAssistant =
|
|
5218
|
+
const getAssistant = useCallback11(
|
|
4771
5219
|
async (id) => {
|
|
4772
5220
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
4773
5221
|
try {
|
|
@@ -4790,7 +5238,7 @@ var AssistantContextProvider = ({
|
|
|
4790
5238
|
},
|
|
4791
5239
|
[client]
|
|
4792
5240
|
);
|
|
4793
|
-
const createAssistant =
|
|
5241
|
+
const createAssistant = useCallback11(
|
|
4794
5242
|
async (options) => {
|
|
4795
5243
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
4796
5244
|
try {
|
|
@@ -4812,7 +5260,7 @@ var AssistantContextProvider = ({
|
|
|
4812
5260
|
},
|
|
4813
5261
|
[client]
|
|
4814
5262
|
);
|
|
4815
|
-
const updateAssistant =
|
|
5263
|
+
const updateAssistant = useCallback11(
|
|
4816
5264
|
async (id, options) => {
|
|
4817
5265
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
4818
5266
|
try {
|
|
@@ -4837,7 +5285,7 @@ var AssistantContextProvider = ({
|
|
|
4837
5285
|
},
|
|
4838
5286
|
[client]
|
|
4839
5287
|
);
|
|
4840
|
-
const deleteAssistant =
|
|
5288
|
+
const deleteAssistant = useCallback11(
|
|
4841
5289
|
async (id) => {
|
|
4842
5290
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
4843
5291
|
try {
|
|
@@ -4859,7 +5307,7 @@ var AssistantContextProvider = ({
|
|
|
4859
5307
|
},
|
|
4860
5308
|
[client]
|
|
4861
5309
|
);
|
|
4862
|
-
const selectAssistant =
|
|
5310
|
+
const selectAssistant = useCallback11(
|
|
4863
5311
|
async (id) => {
|
|
4864
5312
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
4865
5313
|
try {
|
|
@@ -4890,21 +5338,21 @@ var AssistantContextProvider = ({
|
|
|
4890
5338
|
},
|
|
4891
5339
|
[client]
|
|
4892
5340
|
);
|
|
4893
|
-
const clearCurrentAssistant =
|
|
5341
|
+
const clearCurrentAssistant = useCallback11(() => {
|
|
4894
5342
|
setState((prev) => ({
|
|
4895
5343
|
...prev,
|
|
4896
5344
|
currentAssistant: null
|
|
4897
5345
|
}));
|
|
4898
5346
|
}, []);
|
|
4899
|
-
const refresh =
|
|
5347
|
+
const refresh = useCallback11(async () => {
|
|
4900
5348
|
await listAssistants();
|
|
4901
5349
|
}, [listAssistants]);
|
|
4902
|
-
|
|
5350
|
+
useEffect14(() => {
|
|
4903
5351
|
if (autoLoad) {
|
|
4904
5352
|
listAssistants();
|
|
4905
5353
|
}
|
|
4906
5354
|
}, [autoLoad, listAssistants]);
|
|
4907
|
-
|
|
5355
|
+
useEffect14(() => {
|
|
4908
5356
|
if (state.assistants.length > 0) {
|
|
4909
5357
|
const isCurrentAssistantValid = state.currentAssistant && state.assistants.some((a) => a.id === state.currentAssistant?.id);
|
|
4910
5358
|
if (!isCurrentAssistantValid) {
|
|
@@ -4932,7 +5380,7 @@ var AssistantContextProvider = ({
|
|
|
4932
5380
|
}
|
|
4933
5381
|
}
|
|
4934
5382
|
}, [initialAssistantId, state.assistants, state.currentAssistant]);
|
|
4935
|
-
return /* @__PURE__ */
|
|
5383
|
+
return /* @__PURE__ */ jsx38(
|
|
4936
5384
|
AssistantContext.Provider,
|
|
4937
5385
|
{
|
|
4938
5386
|
value: {
|
|
@@ -4962,7 +5410,7 @@ var useAssistantContext = () => {
|
|
|
4962
5410
|
|
|
4963
5411
|
// src/components/Chat/ConversationContext.tsx
|
|
4964
5412
|
import { Client as Client3 } from "@axiom-lattice/client-sdk";
|
|
4965
|
-
import { jsx as
|
|
5413
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4966
5414
|
var ConversationContext = createContext6({
|
|
4967
5415
|
assistantId: null,
|
|
4968
5416
|
thread: null,
|
|
@@ -5014,18 +5462,18 @@ var ConversationContextProvider = ({
|
|
|
5014
5462
|
}),
|
|
5015
5463
|
[baseURL, apiKey, assistantId, transport]
|
|
5016
5464
|
);
|
|
5017
|
-
const [threads, setThreads] =
|
|
5018
|
-
const [threadId, setThreadId] =
|
|
5019
|
-
const [isLoading, setIsLoading] =
|
|
5020
|
-
const [error, setError] =
|
|
5465
|
+
const [threads, setThreads] = useState22([]);
|
|
5466
|
+
const [threadId, setThreadId] = useState22(null);
|
|
5467
|
+
const [isLoading, setIsLoading] = useState22(false);
|
|
5468
|
+
const [error, setError] = useState22(null);
|
|
5021
5469
|
const loadedAssistantIdRef = useRef10(null);
|
|
5022
5470
|
const prevAssistantIdRef = useRef10(null);
|
|
5023
5471
|
const isLoadingRef = useRef10(false);
|
|
5024
5472
|
const clientRef = useRef10(client);
|
|
5025
|
-
|
|
5473
|
+
useEffect15(() => {
|
|
5026
5474
|
clientRef.current = client;
|
|
5027
5475
|
}, [client]);
|
|
5028
|
-
const loadThreads =
|
|
5476
|
+
const loadThreads = useCallback12(async () => {
|
|
5029
5477
|
const currentClient = clientRef.current;
|
|
5030
5478
|
if (!assistantId || !currentClient.assistantId) {
|
|
5031
5479
|
setThreads([]);
|
|
@@ -5084,7 +5532,7 @@ var ConversationContextProvider = ({
|
|
|
5084
5532
|
isLoadingRef.current = false;
|
|
5085
5533
|
}
|
|
5086
5534
|
}, [assistantId]);
|
|
5087
|
-
|
|
5535
|
+
useEffect15(() => {
|
|
5088
5536
|
const currentClient = clientRef.current;
|
|
5089
5537
|
const prevAssistantId = prevAssistantIdRef.current;
|
|
5090
5538
|
const assistantChanged = prevAssistantId !== assistantId;
|
|
@@ -5109,14 +5557,14 @@ var ConversationContextProvider = ({
|
|
|
5109
5557
|
}
|
|
5110
5558
|
return threads.find((t) => t.id === threadId) || null;
|
|
5111
5559
|
}, [assistantId, threadId, threads]);
|
|
5112
|
-
const setThread =
|
|
5560
|
+
const setThread = useCallback12((newThread) => {
|
|
5113
5561
|
if (newThread) {
|
|
5114
5562
|
setThreadId(newThread.id);
|
|
5115
5563
|
} else {
|
|
5116
5564
|
setThreadId(null);
|
|
5117
5565
|
}
|
|
5118
5566
|
}, []);
|
|
5119
|
-
const selectThread =
|
|
5567
|
+
const selectThread = useCallback12(
|
|
5120
5568
|
(targetThreadId) => {
|
|
5121
5569
|
const foundThread = threads.find((t) => t.id === targetThreadId);
|
|
5122
5570
|
if (foundThread) {
|
|
@@ -5125,7 +5573,7 @@ var ConversationContextProvider = ({
|
|
|
5125
5573
|
},
|
|
5126
5574
|
[threads]
|
|
5127
5575
|
);
|
|
5128
|
-
const createThread =
|
|
5576
|
+
const createThread = useCallback12(
|
|
5129
5577
|
async (label) => {
|
|
5130
5578
|
if (!assistantId || !client.assistantId) {
|
|
5131
5579
|
throw new Error("No assistant selected");
|
|
@@ -5150,7 +5598,7 @@ var ConversationContextProvider = ({
|
|
|
5150
5598
|
},
|
|
5151
5599
|
[assistantId, client, loadThreads]
|
|
5152
5600
|
);
|
|
5153
|
-
const listThreads =
|
|
5601
|
+
const listThreads = useCallback12(async () => {
|
|
5154
5602
|
if (!assistantId || !client.assistantId) {
|
|
5155
5603
|
return [];
|
|
5156
5604
|
}
|
|
@@ -5171,7 +5619,7 @@ var ConversationContextProvider = ({
|
|
|
5171
5619
|
setIsLoading(false);
|
|
5172
5620
|
}
|
|
5173
5621
|
}, [assistantId, client, threads]);
|
|
5174
|
-
const updateThread =
|
|
5622
|
+
const updateThread = useCallback12(
|
|
5175
5623
|
async (newThread) => {
|
|
5176
5624
|
if (!assistantId || !client.assistantId) {
|
|
5177
5625
|
throw new Error("No assistant selected");
|
|
@@ -5193,13 +5641,13 @@ var ConversationContextProvider = ({
|
|
|
5193
5641
|
},
|
|
5194
5642
|
[assistantId, client, loadThreads]
|
|
5195
5643
|
);
|
|
5196
|
-
const getThreadById =
|
|
5644
|
+
const getThreadById = useCallback12(
|
|
5197
5645
|
(targetThreadId) => {
|
|
5198
5646
|
return threads.find((t) => t.id === targetThreadId) || null;
|
|
5199
5647
|
},
|
|
5200
5648
|
[threads]
|
|
5201
5649
|
);
|
|
5202
|
-
const deleteThread =
|
|
5650
|
+
const deleteThread = useCallback12(
|
|
5203
5651
|
async (targetThreadId) => {
|
|
5204
5652
|
if (!assistantId || !client.assistantId) {
|
|
5205
5653
|
throw new Error("No assistant selected");
|
|
@@ -5222,10 +5670,10 @@ var ConversationContextProvider = ({
|
|
|
5222
5670
|
},
|
|
5223
5671
|
[threadId, assistantId, client, loadThreads]
|
|
5224
5672
|
);
|
|
5225
|
-
const clearThread =
|
|
5673
|
+
const clearThread = useCallback12(() => {
|
|
5226
5674
|
setThreadId(null);
|
|
5227
5675
|
}, []);
|
|
5228
|
-
return /* @__PURE__ */
|
|
5676
|
+
return /* @__PURE__ */ jsx39(
|
|
5229
5677
|
ConversationContext.Provider,
|
|
5230
5678
|
{
|
|
5231
5679
|
value: {
|
|
@@ -5263,7 +5711,7 @@ var useConversationContext = () => {
|
|
|
5263
5711
|
import { Conversations } from "@ant-design/x";
|
|
5264
5712
|
import { theme } from "antd";
|
|
5265
5713
|
import { useMemo as useMemo8 } from "react";
|
|
5266
|
-
import { jsx as
|
|
5714
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
5267
5715
|
var AgentConversations = () => {
|
|
5268
5716
|
const { token } = theme.useToken();
|
|
5269
5717
|
const { currentAssistant } = useAssistantContext();
|
|
@@ -5293,7 +5741,7 @@ var AgentConversations = () => {
|
|
|
5293
5741
|
}
|
|
5294
5742
|
await createThread();
|
|
5295
5743
|
};
|
|
5296
|
-
return /* @__PURE__ */
|
|
5744
|
+
return /* @__PURE__ */ jsx40(
|
|
5297
5745
|
Conversations,
|
|
5298
5746
|
{
|
|
5299
5747
|
creation: {
|
|
@@ -5311,8 +5759,8 @@ var AgentConversations = () => {
|
|
|
5311
5759
|
};
|
|
5312
5760
|
|
|
5313
5761
|
// src/components/Chat/ChatSidebar.tsx
|
|
5314
|
-
import { useState as
|
|
5315
|
-
import { Divider as Divider2, Tooltip as
|
|
5762
|
+
import { useState as useState23, useEffect as useEffect16, useRef as useRef11 } from "react";
|
|
5763
|
+
import { Divider as Divider2, Tooltip as Tooltip6 } from "antd";
|
|
5316
5764
|
import {
|
|
5317
5765
|
MenuFoldOutlined,
|
|
5318
5766
|
MenuUnfoldOutlined,
|
|
@@ -5322,7 +5770,7 @@ import {
|
|
|
5322
5770
|
// src/components/Chat/AssistantList.tsx
|
|
5323
5771
|
import { Conversations as Conversations2 } from "@ant-design/x";
|
|
5324
5772
|
import { Avatar as Avatar4, theme as theme2 } from "antd";
|
|
5325
|
-
import { jsx as
|
|
5773
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
5326
5774
|
var AssistantList = () => {
|
|
5327
5775
|
const { token } = theme2.useToken();
|
|
5328
5776
|
const { assistants, selectAssistant, currentAssistant } = useAssistantContext();
|
|
@@ -5334,7 +5782,7 @@ var AssistantList = () => {
|
|
|
5334
5782
|
const items = assistants.map((assistant) => ({
|
|
5335
5783
|
key: assistant.id,
|
|
5336
5784
|
label: assistant.name,
|
|
5337
|
-
icon: /* @__PURE__ */
|
|
5785
|
+
icon: /* @__PURE__ */ jsx41(
|
|
5338
5786
|
Avatar4,
|
|
5339
5787
|
{
|
|
5340
5788
|
size: "small",
|
|
@@ -5346,7 +5794,7 @@ var AssistantList = () => {
|
|
|
5346
5794
|
}
|
|
5347
5795
|
)
|
|
5348
5796
|
}));
|
|
5349
|
-
return /* @__PURE__ */
|
|
5797
|
+
return /* @__PURE__ */ jsx41(
|
|
5350
5798
|
Conversations2,
|
|
5351
5799
|
{
|
|
5352
5800
|
items,
|
|
@@ -5360,9 +5808,9 @@ var AssistantList = () => {
|
|
|
5360
5808
|
};
|
|
5361
5809
|
|
|
5362
5810
|
// src/components/Chat/ChatSidebar.tsx
|
|
5363
|
-
import { createStyles as
|
|
5364
|
-
import { Fragment as Fragment5, jsx as
|
|
5365
|
-
var
|
|
5811
|
+
import { createStyles as createStyles12 } from "antd-style";
|
|
5812
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5813
|
+
var useStyles4 = createStyles12(({ token, css }) => ({
|
|
5366
5814
|
sidebar: css`
|
|
5367
5815
|
display: flex;
|
|
5368
5816
|
flex-direction: column;
|
|
@@ -5567,11 +6015,11 @@ var ChatSidebar = ({
|
|
|
5567
6015
|
onSettingsClick,
|
|
5568
6016
|
defaultCollapsed = false
|
|
5569
6017
|
}) => {
|
|
5570
|
-
const { styles } =
|
|
6018
|
+
const { styles } = useStyles4();
|
|
5571
6019
|
const { setMenuCollapsed, menuCollapsed, sideAppVisible } = useChatUIContext();
|
|
5572
6020
|
const { setSettingsModalOpen } = useLatticeChatShellContext();
|
|
5573
|
-
const [isHovered, setIsHovered] =
|
|
5574
|
-
const [isFirstCollapse, setIsFirstCollapse] =
|
|
6021
|
+
const [isHovered, setIsHovered] = useState23(false);
|
|
6022
|
+
const [isFirstCollapse, setIsFirstCollapse] = useState23(false);
|
|
5575
6023
|
const prevIsCollapsedRef = useRef11(false);
|
|
5576
6024
|
const handleToggleCollapse = () => {
|
|
5577
6025
|
setMenuCollapsed(!menuCollapsed);
|
|
@@ -5581,7 +6029,7 @@ var ChatSidebar = ({
|
|
|
5581
6029
|
onSettingsClick?.();
|
|
5582
6030
|
};
|
|
5583
6031
|
const isCollapsed = menuCollapsed || sideAppVisible;
|
|
5584
|
-
|
|
6032
|
+
useEffect16(() => {
|
|
5585
6033
|
const prevIsCollapsed = prevIsCollapsedRef.current;
|
|
5586
6034
|
if (isCollapsed) {
|
|
5587
6035
|
const hasSeenFirstCollapse = localStorage.getItem(FIRST_COLLAPSE_KEY);
|
|
@@ -5610,54 +6058,54 @@ var ChatSidebar = ({
|
|
|
5610
6058
|
const handleMouseLeave = () => {
|
|
5611
6059
|
setIsHovered(false);
|
|
5612
6060
|
};
|
|
5613
|
-
return /* @__PURE__ */
|
|
5614
|
-
/* @__PURE__ */
|
|
6061
|
+
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
6062
|
+
/* @__PURE__ */ jsxs22(
|
|
5615
6063
|
"div",
|
|
5616
6064
|
{
|
|
5617
6065
|
className: `${styles.sidebar} ${isFirstCollapse ? "firstTimeHighlight" : ""}`,
|
|
5618
6066
|
onMouseEnter: handleMouseEnter,
|
|
5619
6067
|
onMouseLeave: handleMouseLeave,
|
|
5620
6068
|
children: [
|
|
5621
|
-
/* @__PURE__ */
|
|
5622
|
-
|
|
6069
|
+
/* @__PURE__ */ jsx42(
|
|
6070
|
+
Tooltip6,
|
|
5623
6071
|
{
|
|
5624
6072
|
title: "Move the mouse over the collapsed sidebar to see the assistants and threads",
|
|
5625
6073
|
open: isFirstCollapse,
|
|
5626
6074
|
placement: "right",
|
|
5627
|
-
children: isFirstCollapse && /* @__PURE__ */
|
|
6075
|
+
children: isFirstCollapse && /* @__PURE__ */ jsx42("div", { style: { marginTop: "400px" } })
|
|
5628
6076
|
}
|
|
5629
6077
|
),
|
|
5630
|
-
!isCollapsed && /* @__PURE__ */
|
|
5631
|
-
/* @__PURE__ */
|
|
5632
|
-
/* @__PURE__ */
|
|
5633
|
-
/* @__PURE__ */
|
|
5634
|
-
/* @__PURE__ */
|
|
6078
|
+
!isCollapsed && /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
6079
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.content, children: [
|
|
6080
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.section, children: [
|
|
6081
|
+
/* @__PURE__ */ jsx42("div", { className: styles.sectionTitle, children: "Assistants" }),
|
|
6082
|
+
/* @__PURE__ */ jsx42(AssistantList, {})
|
|
5635
6083
|
] }),
|
|
5636
|
-
/* @__PURE__ */
|
|
5637
|
-
/* @__PURE__ */
|
|
5638
|
-
/* @__PURE__ */
|
|
5639
|
-
/* @__PURE__ */
|
|
6084
|
+
/* @__PURE__ */ jsx42(Divider2, { className: styles.divider }),
|
|
6085
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.section, children: [
|
|
6086
|
+
/* @__PURE__ */ jsx42("div", { className: styles.sectionTitle, children: "Threads" }),
|
|
6087
|
+
/* @__PURE__ */ jsx42(AgentConversations, {})
|
|
5640
6088
|
] })
|
|
5641
6089
|
] }),
|
|
5642
|
-
/* @__PURE__ */
|
|
5643
|
-
/* @__PURE__ */
|
|
6090
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.footer, children: [
|
|
6091
|
+
/* @__PURE__ */ jsx42(
|
|
5644
6092
|
"button",
|
|
5645
6093
|
{
|
|
5646
6094
|
className: styles.actionButton,
|
|
5647
6095
|
onClick: handleToggleCollapse,
|
|
5648
6096
|
title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5649
6097
|
"aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5650
|
-
children: isCollapsed ? /* @__PURE__ */
|
|
6098
|
+
children: isCollapsed ? /* @__PURE__ */ jsx42(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx42(MenuFoldOutlined, {})
|
|
5651
6099
|
}
|
|
5652
6100
|
),
|
|
5653
|
-
/* @__PURE__ */
|
|
6101
|
+
/* @__PURE__ */ jsx42(
|
|
5654
6102
|
"button",
|
|
5655
6103
|
{
|
|
5656
6104
|
className: styles.actionButton,
|
|
5657
6105
|
onClick: handleSettingsClick,
|
|
5658
6106
|
title: "Settings",
|
|
5659
6107
|
"aria-label": "Settings",
|
|
5660
|
-
children: /* @__PURE__ */
|
|
6108
|
+
children: /* @__PURE__ */ jsx42(SettingOutlined, {})
|
|
5661
6109
|
}
|
|
5662
6110
|
)
|
|
5663
6111
|
] })
|
|
@@ -5665,43 +6113,43 @@ var ChatSidebar = ({
|
|
|
5665
6113
|
]
|
|
5666
6114
|
}
|
|
5667
6115
|
),
|
|
5668
|
-
isCollapsed && /* @__PURE__ */
|
|
6116
|
+
isCollapsed && /* @__PURE__ */ jsxs22(
|
|
5669
6117
|
"div",
|
|
5670
6118
|
{
|
|
5671
6119
|
className: `${styles.hoverOverlay} ${isHovered ? "visible" : ""}`,
|
|
5672
6120
|
onMouseEnter: handleMouseEnter,
|
|
5673
6121
|
onMouseLeave: handleMouseLeave,
|
|
5674
6122
|
children: [
|
|
5675
|
-
/* @__PURE__ */
|
|
5676
|
-
/* @__PURE__ */
|
|
5677
|
-
/* @__PURE__ */
|
|
5678
|
-
/* @__PURE__ */
|
|
6123
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.hoverContent, children: [
|
|
6124
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.section, children: [
|
|
6125
|
+
/* @__PURE__ */ jsx42("div", { className: styles.sectionTitle, children: "Assistants" }),
|
|
6126
|
+
/* @__PURE__ */ jsx42(AssistantList, {})
|
|
5679
6127
|
] }),
|
|
5680
|
-
/* @__PURE__ */
|
|
5681
|
-
/* @__PURE__ */
|
|
5682
|
-
/* @__PURE__ */
|
|
5683
|
-
/* @__PURE__ */
|
|
6128
|
+
/* @__PURE__ */ jsx42(Divider2, { className: styles.divider }),
|
|
6129
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.section, children: [
|
|
6130
|
+
/* @__PURE__ */ jsx42("div", { className: styles.sectionTitle, children: "Threads" }),
|
|
6131
|
+
/* @__PURE__ */ jsx42(AgentConversations, {})
|
|
5684
6132
|
] })
|
|
5685
6133
|
] }),
|
|
5686
|
-
/* @__PURE__ */
|
|
5687
|
-
/* @__PURE__ */
|
|
6134
|
+
/* @__PURE__ */ jsxs22("div", { className: styles.footer, children: [
|
|
6135
|
+
/* @__PURE__ */ jsx42(
|
|
5688
6136
|
"button",
|
|
5689
6137
|
{
|
|
5690
6138
|
className: styles.actionButton,
|
|
5691
6139
|
onClick: handleToggleCollapse,
|
|
5692
6140
|
title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5693
6141
|
"aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5694
|
-
children: isCollapsed ? /* @__PURE__ */
|
|
6142
|
+
children: isCollapsed ? /* @__PURE__ */ jsx42(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx42(MenuFoldOutlined, {})
|
|
5695
6143
|
}
|
|
5696
6144
|
),
|
|
5697
|
-
/* @__PURE__ */
|
|
6145
|
+
/* @__PURE__ */ jsx42(
|
|
5698
6146
|
"button",
|
|
5699
6147
|
{
|
|
5700
6148
|
className: styles.actionButton,
|
|
5701
6149
|
onClick: handleSettingsClick,
|
|
5702
6150
|
title: "Settings",
|
|
5703
6151
|
"aria-label": "Settings",
|
|
5704
|
-
children: /* @__PURE__ */
|
|
6152
|
+
children: /* @__PURE__ */ jsx42(SettingOutlined, {})
|
|
5705
6153
|
}
|
|
5706
6154
|
)
|
|
5707
6155
|
] })
|
|
@@ -5712,14 +6160,14 @@ var ChatSidebar = ({
|
|
|
5712
6160
|
};
|
|
5713
6161
|
|
|
5714
6162
|
// src/components/Chat/LatticeChatView.tsx
|
|
5715
|
-
import { jsx as
|
|
6163
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
5716
6164
|
var LatticeChatView = (props) => {
|
|
5717
6165
|
const { assistantId, thread } = useConversationContext();
|
|
5718
6166
|
const { currentAssistant } = useAssistantContext();
|
|
5719
6167
|
const {
|
|
5720
6168
|
config: { baseURL }
|
|
5721
6169
|
} = useLatticeChatShellContext();
|
|
5722
|
-
return assistantId && thread ? /* @__PURE__ */
|
|
6170
|
+
return assistantId && thread ? /* @__PURE__ */ jsx43(
|
|
5723
6171
|
AxiomLatticeProvider,
|
|
5724
6172
|
{
|
|
5725
6173
|
config: {
|
|
@@ -5728,14 +6176,14 @@ var LatticeChatView = (props) => {
|
|
|
5728
6176
|
assistantId,
|
|
5729
6177
|
transport: "sse"
|
|
5730
6178
|
},
|
|
5731
|
-
children: /* @__PURE__ */
|
|
6179
|
+
children: /* @__PURE__ */ jsx43(
|
|
5732
6180
|
LatticeChat,
|
|
5733
6181
|
{
|
|
5734
6182
|
thread_id: thread?.id,
|
|
5735
6183
|
assistant_id: assistantId,
|
|
5736
6184
|
name: currentAssistant?.name,
|
|
5737
6185
|
description: currentAssistant?.description,
|
|
5738
|
-
menu: /* @__PURE__ */
|
|
6186
|
+
menu: /* @__PURE__ */ jsx43(ChatSidebar, {})
|
|
5739
6187
|
}
|
|
5740
6188
|
)
|
|
5741
6189
|
}
|
|
@@ -5743,24 +6191,24 @@ var LatticeChatView = (props) => {
|
|
|
5743
6191
|
};
|
|
5744
6192
|
|
|
5745
6193
|
// src/components/Chat/SettingsModal.tsx
|
|
5746
|
-
import { useState as
|
|
6194
|
+
import { useState as useState24, useEffect as useEffect17, useRef as useRef12 } from "react";
|
|
5747
6195
|
import {
|
|
5748
6196
|
Modal,
|
|
5749
6197
|
Input,
|
|
5750
|
-
Button as
|
|
5751
|
-
message as
|
|
5752
|
-
Typography as
|
|
6198
|
+
Button as Button16,
|
|
6199
|
+
message as message5,
|
|
6200
|
+
Typography as Typography16,
|
|
5753
6201
|
Alert as Alert3,
|
|
5754
6202
|
Select,
|
|
5755
6203
|
Switch,
|
|
5756
|
-
Space as
|
|
6204
|
+
Space as Space15,
|
|
5757
6205
|
Tabs as Tabs2
|
|
5758
6206
|
} from "antd";
|
|
5759
6207
|
import {
|
|
5760
6208
|
SaveOutlined,
|
|
5761
6209
|
EnvironmentOutlined,
|
|
5762
|
-
ReloadOutlined as
|
|
5763
|
-
CheckCircleOutlined as
|
|
6210
|
+
ReloadOutlined as ReloadOutlined3,
|
|
6211
|
+
CheckCircleOutlined as CheckCircleOutlined5,
|
|
5764
6212
|
ApiOutlined,
|
|
5765
6213
|
LinkOutlined,
|
|
5766
6214
|
CheckCircleFilled,
|
|
@@ -5768,11 +6216,11 @@ import {
|
|
|
5768
6216
|
PlusOutlined,
|
|
5769
6217
|
CloudServerOutlined
|
|
5770
6218
|
} from "@ant-design/icons";
|
|
5771
|
-
import { createStyles as
|
|
5772
|
-
import { Fragment as Fragment6, jsx as
|
|
5773
|
-
var { Text:
|
|
6219
|
+
import { createStyles as createStyles13 } from "antd-style";
|
|
6220
|
+
import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6221
|
+
var { Text: Text14, Title: Title3 } = Typography16;
|
|
5774
6222
|
var { TextArea } = Input;
|
|
5775
|
-
var
|
|
6223
|
+
var useStyles5 = createStyles13(({ token, css }) => ({
|
|
5776
6224
|
// settingsModal: css`
|
|
5777
6225
|
// .ant-modal {
|
|
5778
6226
|
// max-width: 100vw !important;
|
|
@@ -6118,21 +6566,21 @@ var SETTINGS_MENU_ITEMS = [
|
|
|
6118
6566
|
{
|
|
6119
6567
|
key: "environment",
|
|
6120
6568
|
label: "Environment Variables",
|
|
6121
|
-
icon: /* @__PURE__ */
|
|
6569
|
+
icon: /* @__PURE__ */ jsx44(EnvironmentOutlined, {})
|
|
6122
6570
|
},
|
|
6123
6571
|
{
|
|
6124
6572
|
key: "models",
|
|
6125
6573
|
label: "Model Configuration",
|
|
6126
|
-
icon: /* @__PURE__ */
|
|
6574
|
+
icon: /* @__PURE__ */ jsx44(ApiOutlined, {})
|
|
6127
6575
|
}
|
|
6128
6576
|
];
|
|
6129
6577
|
var SettingsModal = ({
|
|
6130
6578
|
open,
|
|
6131
6579
|
onClose
|
|
6132
6580
|
}) => {
|
|
6133
|
-
const { styles } =
|
|
6581
|
+
const { styles } = useStyles5();
|
|
6134
6582
|
const { config: shellConfig, updateConfigValue } = useLatticeChatShellContext();
|
|
6135
|
-
const [connections, setConnections] =
|
|
6583
|
+
const [connections, setConnections] = useState24(() => {
|
|
6136
6584
|
if (typeof window !== "undefined") {
|
|
6137
6585
|
try {
|
|
6138
6586
|
const stored = localStorage.getItem("lattice_server_connections");
|
|
@@ -6155,21 +6603,21 @@ var SettingsModal = ({
|
|
|
6155
6603
|
}
|
|
6156
6604
|
return [];
|
|
6157
6605
|
});
|
|
6158
|
-
const [serverConfigs, setServerConfigs] =
|
|
6606
|
+
const [serverConfigs, setServerConfigs] = useState24({});
|
|
6159
6607
|
const connectionsRef = useRef12(connections);
|
|
6160
|
-
|
|
6608
|
+
useEffect17(() => {
|
|
6161
6609
|
connectionsRef.current = connections;
|
|
6162
6610
|
}, [connections]);
|
|
6163
|
-
const [activeTabKey, setActiveTabKey] =
|
|
6611
|
+
const [activeTabKey, setActiveTabKey] = useState24(
|
|
6164
6612
|
connections.length > 0 ? connections[0].id : ""
|
|
6165
6613
|
);
|
|
6166
|
-
const [activeMenu, setActiveMenu] =
|
|
6167
|
-
const [loading, setLoading] =
|
|
6168
|
-
const [showAddServerModal, setShowAddServerModal] =
|
|
6169
|
-
const [newServerUrl, setNewServerUrl] =
|
|
6170
|
-
const [newServerName, setNewServerName] =
|
|
6171
|
-
const [newServerApiKey, setNewServerApiKey] =
|
|
6172
|
-
const [addingServer, setAddingServer] =
|
|
6614
|
+
const [activeMenu, setActiveMenu] = useState24("environment");
|
|
6615
|
+
const [loading, setLoading] = useState24(false);
|
|
6616
|
+
const [showAddServerModal, setShowAddServerModal] = useState24(false);
|
|
6617
|
+
const [newServerUrl, setNewServerUrl] = useState24("");
|
|
6618
|
+
const [newServerName, setNewServerName] = useState24("");
|
|
6619
|
+
const [newServerApiKey, setNewServerApiKey] = useState24("");
|
|
6620
|
+
const [addingServer, setAddingServer] = useState24(false);
|
|
6173
6621
|
const saveConnections = (newConnections) => {
|
|
6174
6622
|
setConnections(newConnections);
|
|
6175
6623
|
if (typeof window !== "undefined") {
|
|
@@ -6308,7 +6756,7 @@ var SettingsModal = ({
|
|
|
6308
6756
|
}
|
|
6309
6757
|
} catch (error) {
|
|
6310
6758
|
console.error("Failed to load configuration:", error);
|
|
6311
|
-
|
|
6759
|
+
message5.error("Failed to load current configuration");
|
|
6312
6760
|
}
|
|
6313
6761
|
};
|
|
6314
6762
|
const loadModelsConfig = async (serverId) => {
|
|
@@ -6359,7 +6807,7 @@ var SettingsModal = ({
|
|
|
6359
6807
|
console.error("Failed to load models configuration:", error);
|
|
6360
6808
|
}
|
|
6361
6809
|
};
|
|
6362
|
-
|
|
6810
|
+
useEffect17(() => {
|
|
6363
6811
|
if (open && activeTabKey) {
|
|
6364
6812
|
initializeServerConfig(activeTabKey);
|
|
6365
6813
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
@@ -6368,7 +6816,7 @@ var SettingsModal = ({
|
|
|
6368
6816
|
}
|
|
6369
6817
|
}
|
|
6370
6818
|
}, [open, activeTabKey]);
|
|
6371
|
-
|
|
6819
|
+
useEffect17(() => {
|
|
6372
6820
|
if (open && activeTabKey) {
|
|
6373
6821
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
6374
6822
|
if (connection?.connected) {
|
|
@@ -6382,7 +6830,7 @@ var SettingsModal = ({
|
|
|
6382
6830
|
}, [open, activeTabKey, activeMenu]);
|
|
6383
6831
|
const handleAddServer = async () => {
|
|
6384
6832
|
if (!newServerUrl.trim()) {
|
|
6385
|
-
|
|
6833
|
+
message5.error("Please enter a server URL");
|
|
6386
6834
|
return;
|
|
6387
6835
|
}
|
|
6388
6836
|
let normalizedUrl = newServerUrl.trim();
|
|
@@ -6408,7 +6856,7 @@ var SettingsModal = ({
|
|
|
6408
6856
|
setNewServerUrl("");
|
|
6409
6857
|
setNewServerName("");
|
|
6410
6858
|
setNewServerApiKey("");
|
|
6411
|
-
|
|
6859
|
+
message5.success("Server added successfully");
|
|
6412
6860
|
};
|
|
6413
6861
|
const handleDeleteServer = (serverId) => {
|
|
6414
6862
|
const newConnections = connections.filter((c) => c.id !== serverId);
|
|
@@ -6425,7 +6873,7 @@ var SettingsModal = ({
|
|
|
6425
6873
|
setActiveTabKey("");
|
|
6426
6874
|
}
|
|
6427
6875
|
}
|
|
6428
|
-
|
|
6876
|
+
message5.success("Server deleted");
|
|
6429
6877
|
};
|
|
6430
6878
|
const handleTabChange = (newTabKey) => {
|
|
6431
6879
|
setConnections(
|
|
@@ -6439,12 +6887,12 @@ var SettingsModal = ({
|
|
|
6439
6887
|
const handleSave = async () => {
|
|
6440
6888
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
6441
6889
|
if (!connection || !connection.connected) {
|
|
6442
|
-
|
|
6890
|
+
message5.error("Please connect to a server first");
|
|
6443
6891
|
return;
|
|
6444
6892
|
}
|
|
6445
6893
|
const url = connection.url;
|
|
6446
6894
|
if (!url) {
|
|
6447
|
-
|
|
6895
|
+
message5.error("Please connect to a server first");
|
|
6448
6896
|
return;
|
|
6449
6897
|
}
|
|
6450
6898
|
try {
|
|
@@ -6508,23 +6956,23 @@ var SettingsModal = ({
|
|
|
6508
6956
|
const data = await response.json();
|
|
6509
6957
|
if (response.ok && data.success) {
|
|
6510
6958
|
if (data.requiresRestart && data.requiresRestart.length > 0) {
|
|
6511
|
-
|
|
6959
|
+
message5.warning(
|
|
6512
6960
|
`Configuration saved. Please restart the server for ${data.requiresRestart.join(
|
|
6513
6961
|
", "
|
|
6514
6962
|
)} to take effect.`,
|
|
6515
6963
|
5
|
|
6516
6964
|
);
|
|
6517
6965
|
} else {
|
|
6518
|
-
|
|
6966
|
+
message5.success("Configuration saved and applied successfully");
|
|
6519
6967
|
}
|
|
6520
6968
|
if (data.warnings && data.warnings.length > 0) {
|
|
6521
6969
|
data.warnings.forEach((warning) => {
|
|
6522
|
-
|
|
6970
|
+
message5.warning(warning, 5);
|
|
6523
6971
|
});
|
|
6524
6972
|
}
|
|
6525
6973
|
onClose();
|
|
6526
6974
|
} else {
|
|
6527
|
-
|
|
6975
|
+
message5.error(data.error || "Failed to save configuration");
|
|
6528
6976
|
}
|
|
6529
6977
|
} else if (activeMenu === "models") {
|
|
6530
6978
|
const validModels = config.models.filter(
|
|
@@ -6543,17 +6991,17 @@ var SettingsModal = ({
|
|
|
6543
6991
|
});
|
|
6544
6992
|
const data = await response.json();
|
|
6545
6993
|
if (response.ok && data.success) {
|
|
6546
|
-
|
|
6994
|
+
message5.success(
|
|
6547
6995
|
"Model configuration saved and registered successfully"
|
|
6548
6996
|
);
|
|
6549
6997
|
onClose();
|
|
6550
6998
|
} else {
|
|
6551
|
-
|
|
6999
|
+
message5.error(data.error || "Failed to save model configuration");
|
|
6552
7000
|
}
|
|
6553
7001
|
}
|
|
6554
7002
|
} catch (error) {
|
|
6555
7003
|
console.error("Failed to save configuration:", error);
|
|
6556
|
-
|
|
7004
|
+
message5.error(error.message || "Failed to save configuration");
|
|
6557
7005
|
} finally {
|
|
6558
7006
|
setLoading(false);
|
|
6559
7007
|
}
|
|
@@ -6569,25 +7017,25 @@ var SettingsModal = ({
|
|
|
6569
7017
|
}
|
|
6570
7018
|
}));
|
|
6571
7019
|
};
|
|
6572
|
-
return /* @__PURE__ */
|
|
6573
|
-
/* @__PURE__ */
|
|
7020
|
+
return /* @__PURE__ */ jsxs23("div", { className: styles.formContainer, children: [
|
|
7021
|
+
/* @__PURE__ */ jsx44(
|
|
6574
7022
|
Alert3,
|
|
6575
7023
|
{
|
|
6576
7024
|
message: "Configuration Effect",
|
|
6577
|
-
description: /* @__PURE__ */
|
|
6578
|
-
/* @__PURE__ */
|
|
6579
|
-
/* @__PURE__ */
|
|
6580
|
-
|
|
7025
|
+
description: /* @__PURE__ */ jsxs23("div", { children: [
|
|
7026
|
+
/* @__PURE__ */ jsxs23("div", { style: { marginBottom: 8 }, children: [
|
|
7027
|
+
/* @__PURE__ */ jsx44(
|
|
7028
|
+
CheckCircleOutlined5,
|
|
6581
7029
|
{
|
|
6582
7030
|
style: { color: "#52c41a", marginRight: 8 }
|
|
6583
7031
|
}
|
|
6584
7032
|
),
|
|
6585
|
-
/* @__PURE__ */
|
|
7033
|
+
/* @__PURE__ */ jsx44("strong", { children: "Immediately effective:" }),
|
|
6586
7034
|
" QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
|
|
6587
7035
|
] }),
|
|
6588
|
-
/* @__PURE__ */
|
|
6589
|
-
/* @__PURE__ */
|
|
6590
|
-
/* @__PURE__ */
|
|
7036
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7037
|
+
/* @__PURE__ */ jsx44(ReloadOutlined3, { style: { color: "#faad14", marginRight: 8 } }),
|
|
7038
|
+
/* @__PURE__ */ jsx44("strong", { children: "Requires restart:" }),
|
|
6591
7039
|
" PORT (server must be restarted to change port)"
|
|
6592
7040
|
] })
|
|
6593
7041
|
] }),
|
|
@@ -6596,8 +7044,8 @@ var SettingsModal = ({
|
|
|
6596
7044
|
className: styles.alertCard
|
|
6597
7045
|
}
|
|
6598
7046
|
),
|
|
6599
|
-
/* @__PURE__ */
|
|
6600
|
-
/* @__PURE__ */
|
|
7047
|
+
/* @__PURE__ */ jsx44("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ jsx44(Text14, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure environment variables in .env format (key=value). One variable per line. Leave password fields empty to keep current values." }) }),
|
|
7048
|
+
/* @__PURE__ */ jsx44(
|
|
6601
7049
|
TextArea,
|
|
6602
7050
|
{
|
|
6603
7051
|
value: config.envText,
|
|
@@ -6674,10 +7122,10 @@ QUEUE_NAME=tasks`,
|
|
|
6674
7122
|
}));
|
|
6675
7123
|
}
|
|
6676
7124
|
};
|
|
6677
|
-
return /* @__PURE__ */
|
|
6678
|
-
/* @__PURE__ */
|
|
6679
|
-
config.models.map((model, index) => /* @__PURE__ */
|
|
6680
|
-
/* @__PURE__ */
|
|
7125
|
+
return /* @__PURE__ */ jsxs23("div", { className: styles.formContainer, children: [
|
|
7126
|
+
/* @__PURE__ */ jsx44("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx44(Text14, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure model lattices. Each model will be registered with the provided key and can be used by agents." }) }),
|
|
7127
|
+
config.models.map((model, index) => /* @__PURE__ */ jsxs23("div", { className: styles.card, children: [
|
|
7128
|
+
/* @__PURE__ */ jsxs23(
|
|
6681
7129
|
"div",
|
|
6682
7130
|
{
|
|
6683
7131
|
style: {
|
|
@@ -6689,13 +7137,13 @@ QUEUE_NAME=tasks`,
|
|
|
6689
7137
|
borderBottom: "1px solid rgba(0, 0, 0, 0.06)"
|
|
6690
7138
|
},
|
|
6691
7139
|
children: [
|
|
6692
|
-
/* @__PURE__ */
|
|
6693
|
-
/* @__PURE__ */
|
|
7140
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7141
|
+
/* @__PURE__ */ jsxs23(Text14, { strong: true, style: { fontSize: 16 }, children: [
|
|
6694
7142
|
"Model ",
|
|
6695
7143
|
index + 1
|
|
6696
7144
|
] }),
|
|
6697
|
-
model.key && /* @__PURE__ */
|
|
6698
|
-
|
|
7145
|
+
model.key && /* @__PURE__ */ jsxs23(
|
|
7146
|
+
Text14,
|
|
6699
7147
|
{
|
|
6700
7148
|
type: "secondary",
|
|
6701
7149
|
style: { marginLeft: 8, fontSize: 12 },
|
|
@@ -6707,8 +7155,8 @@ QUEUE_NAME=tasks`,
|
|
|
6707
7155
|
}
|
|
6708
7156
|
)
|
|
6709
7157
|
] }),
|
|
6710
|
-
config.models.length > 1 && /* @__PURE__ */
|
|
6711
|
-
|
|
7158
|
+
config.models.length > 1 && /* @__PURE__ */ jsx44(
|
|
7159
|
+
Button16,
|
|
6712
7160
|
{
|
|
6713
7161
|
type: "text",
|
|
6714
7162
|
danger: true,
|
|
@@ -6724,10 +7172,10 @@ QUEUE_NAME=tasks`,
|
|
|
6724
7172
|
]
|
|
6725
7173
|
}
|
|
6726
7174
|
),
|
|
6727
|
-
/* @__PURE__ */
|
|
6728
|
-
/* @__PURE__ */
|
|
6729
|
-
/* @__PURE__ */
|
|
6730
|
-
/* @__PURE__ */
|
|
7175
|
+
/* @__PURE__ */ jsxs23(Space15, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
|
|
7176
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7177
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formLabel, children: "Key *" }),
|
|
7178
|
+
/* @__PURE__ */ jsx44(
|
|
6731
7179
|
Input,
|
|
6732
7180
|
{
|
|
6733
7181
|
placeholder: "e.g., default, gpt-4, claude",
|
|
@@ -6736,11 +7184,11 @@ QUEUE_NAME=tasks`,
|
|
|
6736
7184
|
style: { height: 40 }
|
|
6737
7185
|
}
|
|
6738
7186
|
),
|
|
6739
|
-
/* @__PURE__ */
|
|
7187
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formDescription, children: "Unique identifier for this model" })
|
|
6740
7188
|
] }),
|
|
6741
|
-
/* @__PURE__ */
|
|
6742
|
-
/* @__PURE__ */
|
|
6743
|
-
/* @__PURE__ */
|
|
7189
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7190
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formLabel, children: "Provider *" }),
|
|
7191
|
+
/* @__PURE__ */ jsx44(
|
|
6744
7192
|
Select,
|
|
6745
7193
|
{
|
|
6746
7194
|
style: { width: "100%", height: 40 },
|
|
@@ -6756,9 +7204,9 @@ QUEUE_NAME=tasks`,
|
|
|
6756
7204
|
}
|
|
6757
7205
|
)
|
|
6758
7206
|
] }),
|
|
6759
|
-
/* @__PURE__ */
|
|
6760
|
-
/* @__PURE__ */
|
|
6761
|
-
/* @__PURE__ */
|
|
7207
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7208
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formLabel, children: "Model Name *" }),
|
|
7209
|
+
/* @__PURE__ */ jsx44(
|
|
6762
7210
|
Input,
|
|
6763
7211
|
{
|
|
6764
7212
|
placeholder: "e.g., gpt-4, claude-3-opus, kimi-k2-250905",
|
|
@@ -6768,9 +7216,9 @@ QUEUE_NAME=tasks`,
|
|
|
6768
7216
|
}
|
|
6769
7217
|
)
|
|
6770
7218
|
] }),
|
|
6771
|
-
/* @__PURE__ */
|
|
6772
|
-
/* @__PURE__ */
|
|
6773
|
-
/* @__PURE__ */
|
|
7219
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7220
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formLabel, children: "API Key" }),
|
|
7221
|
+
/* @__PURE__ */ jsx44(
|
|
6774
7222
|
Input.Password,
|
|
6775
7223
|
{
|
|
6776
7224
|
placeholder: "Enter your API key",
|
|
@@ -6779,11 +7227,11 @@ QUEUE_NAME=tasks`,
|
|
|
6779
7227
|
style: { height: 40 }
|
|
6780
7228
|
}
|
|
6781
7229
|
),
|
|
6782
|
-
/* @__PURE__ */
|
|
7230
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
|
|
6783
7231
|
] }),
|
|
6784
|
-
/* @__PURE__ */
|
|
6785
|
-
/* @__PURE__ */
|
|
6786
|
-
/* @__PURE__ */
|
|
7232
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7233
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formLabel, children: "Base URL" }),
|
|
7234
|
+
/* @__PURE__ */ jsx44(
|
|
6787
7235
|
Input,
|
|
6788
7236
|
{
|
|
6789
7237
|
placeholder: "e.g., https://api.openai.com/v1",
|
|
@@ -6792,22 +7240,22 @@ QUEUE_NAME=tasks`,
|
|
|
6792
7240
|
style: { height: 40 }
|
|
6793
7241
|
}
|
|
6794
7242
|
),
|
|
6795
|
-
/* @__PURE__ */
|
|
7243
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formDescription, children: "Optional custom base URL for the API" })
|
|
6796
7244
|
] }),
|
|
6797
|
-
/* @__PURE__ */
|
|
6798
|
-
/* @__PURE__ */
|
|
7245
|
+
/* @__PURE__ */ jsx44("div", { children: /* @__PURE__ */ jsxs23(Space15, { children: [
|
|
7246
|
+
/* @__PURE__ */ jsx44(
|
|
6799
7247
|
Switch,
|
|
6800
7248
|
{
|
|
6801
7249
|
checked: model.streaming,
|
|
6802
7250
|
onChange: (checked) => handleModelChange(index, "streaming", checked)
|
|
6803
7251
|
}
|
|
6804
7252
|
),
|
|
6805
|
-
/* @__PURE__ */
|
|
7253
|
+
/* @__PURE__ */ jsx44(Text14, { children: "Enable Streaming" })
|
|
6806
7254
|
] }) }),
|
|
6807
|
-
/* @__PURE__ */
|
|
6808
|
-
/* @__PURE__ */
|
|
6809
|
-
/* @__PURE__ */
|
|
6810
|
-
/* @__PURE__ */
|
|
7255
|
+
/* @__PURE__ */ jsxs23("div", { style: { display: "flex", gap: 20 }, children: [
|
|
7256
|
+
/* @__PURE__ */ jsxs23("div", { style: { flex: 1 }, children: [
|
|
7257
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formLabel, children: "Max Tokens" }),
|
|
7258
|
+
/* @__PURE__ */ jsx44(
|
|
6811
7259
|
Input,
|
|
6812
7260
|
{
|
|
6813
7261
|
type: "number",
|
|
@@ -6822,9 +7270,9 @@ QUEUE_NAME=tasks`,
|
|
|
6822
7270
|
}
|
|
6823
7271
|
)
|
|
6824
7272
|
] }),
|
|
6825
|
-
/* @__PURE__ */
|
|
6826
|
-
/* @__PURE__ */
|
|
6827
|
-
/* @__PURE__ */
|
|
7273
|
+
/* @__PURE__ */ jsxs23("div", { style: { flex: 1 }, children: [
|
|
7274
|
+
/* @__PURE__ */ jsx44(Text14, { className: styles.formLabel, children: "Temperature" }),
|
|
7275
|
+
/* @__PURE__ */ jsx44(
|
|
6828
7276
|
Input,
|
|
6829
7277
|
{
|
|
6830
7278
|
type: "number",
|
|
@@ -6843,8 +7291,8 @@ QUEUE_NAME=tasks`,
|
|
|
6843
7291
|
] })
|
|
6844
7292
|
] })
|
|
6845
7293
|
] }, index)),
|
|
6846
|
-
/* @__PURE__ */
|
|
6847
|
-
|
|
7294
|
+
/* @__PURE__ */ jsx44(
|
|
7295
|
+
Button16,
|
|
6848
7296
|
{
|
|
6849
7297
|
type: "dashed",
|
|
6850
7298
|
onClick: handleAddModel,
|
|
@@ -6871,8 +7319,8 @@ QUEUE_NAME=tasks`,
|
|
|
6871
7319
|
);
|
|
6872
7320
|
const currentConnection = connections.find((c) => c.id === activeTabKey);
|
|
6873
7321
|
const renderTabLabel = (connection) => {
|
|
6874
|
-
return /* @__PURE__ */
|
|
6875
|
-
/* @__PURE__ */
|
|
7322
|
+
return /* @__PURE__ */ jsxs23("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
7323
|
+
/* @__PURE__ */ jsx44(
|
|
6876
7324
|
CloudServerOutlined,
|
|
6877
7325
|
{
|
|
6878
7326
|
style: {
|
|
@@ -6881,14 +7329,14 @@ QUEUE_NAME=tasks`,
|
|
|
6881
7329
|
}
|
|
6882
7330
|
}
|
|
6883
7331
|
),
|
|
6884
|
-
/* @__PURE__ */
|
|
6885
|
-
connection.connected && /* @__PURE__ */
|
|
7332
|
+
/* @__PURE__ */ jsx44("span", { children: connection.name }),
|
|
7333
|
+
connection.connected && /* @__PURE__ */ jsx44(
|
|
6886
7334
|
CheckCircleFilled,
|
|
6887
7335
|
{
|
|
6888
7336
|
style: { color: "#52c41a", fontSize: 12, marginLeft: 8 }
|
|
6889
7337
|
}
|
|
6890
7338
|
),
|
|
6891
|
-
connection.error && !connection.connecting && /* @__PURE__ */
|
|
7339
|
+
connection.error && !connection.connecting && /* @__PURE__ */ jsx44(
|
|
6892
7340
|
CloseCircleFilled,
|
|
6893
7341
|
{
|
|
6894
7342
|
style: { color: "#ff4d4f", fontSize: 12, marginLeft: 8 }
|
|
@@ -6899,35 +7347,35 @@ QUEUE_NAME=tasks`,
|
|
|
6899
7347
|
const tabItems = connections.map((connection) => ({
|
|
6900
7348
|
key: connection.id,
|
|
6901
7349
|
label: renderTabLabel(connection),
|
|
6902
|
-
children: /* @__PURE__ */
|
|
6903
|
-
/* @__PURE__ */
|
|
7350
|
+
children: /* @__PURE__ */ jsx44("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx44(Fragment6, { children: /* @__PURE__ */ jsxs23("div", { style: { display: "flex", height: "100%" }, children: [
|
|
7351
|
+
/* @__PURE__ */ jsx44("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs23(
|
|
6904
7352
|
"div",
|
|
6905
7353
|
{
|
|
6906
7354
|
className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
|
|
6907
7355
|
onClick: () => setActiveMenu(item.key),
|
|
6908
7356
|
children: [
|
|
6909
|
-
/* @__PURE__ */
|
|
6910
|
-
/* @__PURE__ */
|
|
7357
|
+
/* @__PURE__ */ jsx44("span", { className: styles.menuItemIcon, children: item.icon }),
|
|
7358
|
+
/* @__PURE__ */ jsx44("span", { className: styles.menuItemText, children: item.label })
|
|
6911
7359
|
]
|
|
6912
7360
|
},
|
|
6913
7361
|
item.key
|
|
6914
7362
|
)) }),
|
|
6915
|
-
/* @__PURE__ */
|
|
6916
|
-
/* @__PURE__ */
|
|
6917
|
-
/* @__PURE__ */
|
|
6918
|
-
/* @__PURE__ */
|
|
6919
|
-
/* @__PURE__ */
|
|
7363
|
+
/* @__PURE__ */ jsxs23("div", { className: styles.content, children: [
|
|
7364
|
+
/* @__PURE__ */ jsxs23("div", { className: styles.contentHeader, children: [
|
|
7365
|
+
/* @__PURE__ */ jsxs23("div", { className: styles.contentHeaderLeft, children: [
|
|
7366
|
+
/* @__PURE__ */ jsx44(Title3, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
|
|
7367
|
+
/* @__PURE__ */ jsxs23(Text14, { className: styles.contentDescription, children: [
|
|
6920
7368
|
activeMenu === "environment" && "Manage environment variables for the gateway server",
|
|
6921
7369
|
activeMenu === "models" && "Configure and register model lattices for use by agents"
|
|
6922
7370
|
] })
|
|
6923
7371
|
] }),
|
|
6924
|
-
/* @__PURE__ */
|
|
6925
|
-
/* @__PURE__ */
|
|
6926
|
-
/* @__PURE__ */
|
|
6927
|
-
|
|
7372
|
+
/* @__PURE__ */ jsxs23("div", { className: styles.contentHeaderRight, children: [
|
|
7373
|
+
/* @__PURE__ */ jsx44(Button16, { onClick: onClose, children: "Cancel" }),
|
|
7374
|
+
/* @__PURE__ */ jsx44(
|
|
7375
|
+
Button16,
|
|
6928
7376
|
{
|
|
6929
7377
|
type: "primary",
|
|
6930
|
-
icon: /* @__PURE__ */
|
|
7378
|
+
icon: /* @__PURE__ */ jsx44(SaveOutlined, {}),
|
|
6931
7379
|
onClick: handleSave,
|
|
6932
7380
|
loading,
|
|
6933
7381
|
children: "Save Configuration"
|
|
@@ -6935,9 +7383,9 @@ QUEUE_NAME=tasks`,
|
|
|
6935
7383
|
)
|
|
6936
7384
|
] })
|
|
6937
7385
|
] }),
|
|
6938
|
-
/* @__PURE__ */
|
|
7386
|
+
/* @__PURE__ */ jsx44("div", { className: styles.contentBody, children: renderContent(connection.id) })
|
|
6939
7387
|
] })
|
|
6940
|
-
] }) }) : /* @__PURE__ */
|
|
7388
|
+
] }) }) : /* @__PURE__ */ jsx44(
|
|
6941
7389
|
"div",
|
|
6942
7390
|
{
|
|
6943
7391
|
style: {
|
|
@@ -6949,29 +7397,29 @@ QUEUE_NAME=tasks`,
|
|
|
6949
7397
|
gap: 16,
|
|
6950
7398
|
padding: 48
|
|
6951
7399
|
},
|
|
6952
|
-
children: connection.connecting ? /* @__PURE__ */
|
|
6953
|
-
/* @__PURE__ */
|
|
6954
|
-
/* @__PURE__ */
|
|
6955
|
-
/* @__PURE__ */
|
|
7400
|
+
children: connection.connecting ? /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
|
7401
|
+
/* @__PURE__ */ jsx44(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
|
|
7402
|
+
/* @__PURE__ */ jsx44(Title3, { level: 4, children: "Connecting..." }),
|
|
7403
|
+
/* @__PURE__ */ jsxs23(Text14, { type: "secondary", style: { textAlign: "center" }, children: [
|
|
6956
7404
|
"Connecting to ",
|
|
6957
7405
|
connection.url
|
|
6958
7406
|
] })
|
|
6959
|
-
] }) : /* @__PURE__ */
|
|
6960
|
-
/* @__PURE__ */
|
|
6961
|
-
/* @__PURE__ */
|
|
6962
|
-
/* @__PURE__ */
|
|
6963
|
-
|
|
7407
|
+
] }) : /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
|
7408
|
+
/* @__PURE__ */ jsx44(LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
|
|
7409
|
+
/* @__PURE__ */ jsx44(Title3, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
|
|
7410
|
+
/* @__PURE__ */ jsx44(
|
|
7411
|
+
Text14,
|
|
6964
7412
|
{
|
|
6965
7413
|
type: "secondary",
|
|
6966
7414
|
style: { textAlign: "center", maxWidth: 400 },
|
|
6967
7415
|
children: connection.error ? `Failed to connect to ${connection.url}. Please check the server URL and try again.` : `Click "Reconnect" to connect to ${connection.url}`
|
|
6968
7416
|
}
|
|
6969
7417
|
),
|
|
6970
|
-
/* @__PURE__ */
|
|
6971
|
-
|
|
7418
|
+
/* @__PURE__ */ jsx44(
|
|
7419
|
+
Button16,
|
|
6972
7420
|
{
|
|
6973
7421
|
type: "primary",
|
|
6974
|
-
icon: /* @__PURE__ */
|
|
7422
|
+
icon: /* @__PURE__ */ jsx44(LinkOutlined, {}),
|
|
6975
7423
|
onClick: () => checkConnection(connection.id),
|
|
6976
7424
|
loading: connection.connecting,
|
|
6977
7425
|
style: { marginTop: 16 },
|
|
@@ -6983,8 +7431,8 @@ QUEUE_NAME=tasks`,
|
|
|
6983
7431
|
) }),
|
|
6984
7432
|
closable: connections.length > 1
|
|
6985
7433
|
}));
|
|
6986
|
-
return /* @__PURE__ */
|
|
6987
|
-
/* @__PURE__ */
|
|
7434
|
+
return /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
|
7435
|
+
/* @__PURE__ */ jsx44(
|
|
6988
7436
|
Modal,
|
|
6989
7437
|
{
|
|
6990
7438
|
open,
|
|
@@ -6993,7 +7441,7 @@ QUEUE_NAME=tasks`,
|
|
|
6993
7441
|
width: "80%",
|
|
6994
7442
|
footer: null,
|
|
6995
7443
|
title: "Settings",
|
|
6996
|
-
children: /* @__PURE__ */
|
|
7444
|
+
children: /* @__PURE__ */ jsx44("div", { children: /* @__PURE__ */ jsx44(
|
|
6997
7445
|
Tabs2,
|
|
6998
7446
|
{
|
|
6999
7447
|
activeKey: activeTabKey,
|
|
@@ -7007,7 +7455,7 @@ QUEUE_NAME=tasks`,
|
|
|
7007
7455
|
}
|
|
7008
7456
|
},
|
|
7009
7457
|
items: tabItems,
|
|
7010
|
-
addIcon: /* @__PURE__ */
|
|
7458
|
+
addIcon: /* @__PURE__ */ jsxs23(
|
|
7011
7459
|
"div",
|
|
7012
7460
|
{
|
|
7013
7461
|
style: {
|
|
@@ -7017,8 +7465,8 @@ QUEUE_NAME=tasks`,
|
|
|
7017
7465
|
padding: "4px 8px"
|
|
7018
7466
|
},
|
|
7019
7467
|
children: [
|
|
7020
|
-
/* @__PURE__ */
|
|
7021
|
-
/* @__PURE__ */
|
|
7468
|
+
/* @__PURE__ */ jsx44(PlusOutlined, {}),
|
|
7469
|
+
/* @__PURE__ */ jsx44("span", { children: "Add Server" })
|
|
7022
7470
|
]
|
|
7023
7471
|
}
|
|
7024
7472
|
)
|
|
@@ -7026,7 +7474,7 @@ QUEUE_NAME=tasks`,
|
|
|
7026
7474
|
) })
|
|
7027
7475
|
}
|
|
7028
7476
|
),
|
|
7029
|
-
/* @__PURE__ */
|
|
7477
|
+
/* @__PURE__ */ jsx44(
|
|
7030
7478
|
Modal,
|
|
7031
7479
|
{
|
|
7032
7480
|
title: "Add New Server",
|
|
@@ -7040,10 +7488,10 @@ QUEUE_NAME=tasks`,
|
|
|
7040
7488
|
},
|
|
7041
7489
|
confirmLoading: addingServer,
|
|
7042
7490
|
className: styles.addServerModal,
|
|
7043
|
-
children: /* @__PURE__ */
|
|
7044
|
-
/* @__PURE__ */
|
|
7045
|
-
/* @__PURE__ */
|
|
7046
|
-
/* @__PURE__ */
|
|
7491
|
+
children: /* @__PURE__ */ jsxs23(Space15, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
|
|
7492
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7493
|
+
/* @__PURE__ */ jsx44(Text14, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
|
|
7494
|
+
/* @__PURE__ */ jsx44(
|
|
7047
7495
|
Input,
|
|
7048
7496
|
{
|
|
7049
7497
|
placeholder: "e.g., Production Server",
|
|
@@ -7052,11 +7500,11 @@ QUEUE_NAME=tasks`,
|
|
|
7052
7500
|
onPressEnter: handleAddServer
|
|
7053
7501
|
}
|
|
7054
7502
|
),
|
|
7055
|
-
/* @__PURE__ */
|
|
7503
|
+
/* @__PURE__ */ jsx44(Text14, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
|
|
7056
7504
|
] }),
|
|
7057
|
-
/* @__PURE__ */
|
|
7058
|
-
/* @__PURE__ */
|
|
7059
|
-
/* @__PURE__ */
|
|
7505
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7506
|
+
/* @__PURE__ */ jsx44(Text14, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
|
|
7507
|
+
/* @__PURE__ */ jsx44(
|
|
7060
7508
|
Input,
|
|
7061
7509
|
{
|
|
7062
7510
|
placeholder: "e.g., http://localhost:4001",
|
|
@@ -7065,11 +7513,11 @@ QUEUE_NAME=tasks`,
|
|
|
7065
7513
|
onPressEnter: handleAddServer
|
|
7066
7514
|
}
|
|
7067
7515
|
),
|
|
7068
|
-
/* @__PURE__ */
|
|
7516
|
+
/* @__PURE__ */ jsx44(Text14, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
|
|
7069
7517
|
] }),
|
|
7070
|
-
/* @__PURE__ */
|
|
7071
|
-
/* @__PURE__ */
|
|
7072
|
-
/* @__PURE__ */
|
|
7518
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
7519
|
+
/* @__PURE__ */ jsx44(Text14, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
|
|
7520
|
+
/* @__PURE__ */ jsx44(
|
|
7073
7521
|
Input.Password,
|
|
7074
7522
|
{
|
|
7075
7523
|
placeholder: "Optional: Enter API key for authentication",
|
|
@@ -7078,7 +7526,7 @@ QUEUE_NAME=tasks`,
|
|
|
7078
7526
|
onPressEnter: handleAddServer
|
|
7079
7527
|
}
|
|
7080
7528
|
),
|
|
7081
|
-
/* @__PURE__ */
|
|
7529
|
+
/* @__PURE__ */ jsx44(Text14, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
|
|
7082
7530
|
] })
|
|
7083
7531
|
] })
|
|
7084
7532
|
}
|
|
@@ -7087,10 +7535,10 @@ QUEUE_NAME=tasks`,
|
|
|
7087
7535
|
};
|
|
7088
7536
|
|
|
7089
7537
|
// src/components/Chat/AgentServerSetting.tsx
|
|
7090
|
-
import { jsx as
|
|
7538
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
7091
7539
|
var AgentServerSetting = () => {
|
|
7092
7540
|
const { settingsModalOpen, setSettingsModalOpen } = useLatticeChatShellContext();
|
|
7093
|
-
return /* @__PURE__ */
|
|
7541
|
+
return /* @__PURE__ */ jsx45(
|
|
7094
7542
|
SettingsModal,
|
|
7095
7543
|
{
|
|
7096
7544
|
open: settingsModalOpen,
|
|
@@ -7100,11 +7548,11 @@ var AgentServerSetting = () => {
|
|
|
7100
7548
|
};
|
|
7101
7549
|
|
|
7102
7550
|
// src/components/Chat/LatticeChatShell.tsx
|
|
7103
|
-
import { jsx as
|
|
7551
|
+
import { jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
7104
7552
|
var LatticeChatShell = (props) => {
|
|
7105
|
-
return /* @__PURE__ */
|
|
7106
|
-
/* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ jsxs24(LatticeChatShellContextProvider, { ...props, children: [
|
|
7554
|
+
/* @__PURE__ */ jsx46(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx46(ConversationContextProvider, { children: /* @__PURE__ */ jsx46(LatticeChatView, {}) }) }),
|
|
7555
|
+
/* @__PURE__ */ jsx46(AgentServerSetting, {})
|
|
7108
7556
|
] });
|
|
7109
7557
|
};
|
|
7110
7558
|
export {
|
|
@@ -7126,6 +7574,7 @@ export {
|
|
|
7126
7574
|
LatticeChatShellContextProvider,
|
|
7127
7575
|
MDResponse,
|
|
7128
7576
|
MDViewFormItem,
|
|
7577
|
+
ScheduleButton,
|
|
7129
7578
|
SideAppViewBrowser,
|
|
7130
7579
|
getElement,
|
|
7131
7580
|
regsiterElement,
|