@axiom-lattice/react-sdk 2.1.76 → 2.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +116 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8779,7 +8779,7 @@ import { Typography as Typography43 } from "antd";
|
|
|
8779
8779
|
import {
|
|
8780
8780
|
CloudUploadOutlined,
|
|
8781
8781
|
PaperClipOutlined,
|
|
8782
|
-
ReloadOutlined as
|
|
8782
|
+
ReloadOutlined as ReloadOutlined4,
|
|
8783
8783
|
FileImageOutlined as FileImageOutlined5,
|
|
8784
8784
|
FileTextOutlined as FileTextOutlined10,
|
|
8785
8785
|
FilePdfOutlined as FilePdfOutlined5,
|
|
@@ -8982,7 +8982,7 @@ import {
|
|
|
8982
8982
|
Space as Space30,
|
|
8983
8983
|
Typography as Typography42
|
|
8984
8984
|
} from "antd";
|
|
8985
|
-
import React51, { useCallback as useCallback34, useContext as useContext10, useEffect as useEffect46, useRef as
|
|
8985
|
+
import React51, { useCallback as useCallback34, useContext as useContext10, useEffect as useEffect46, useRef as useRef24, useState as useState66 } from "react";
|
|
8986
8986
|
import { BrainCircuit as BrainCircuit3 } from "lucide-react";
|
|
8987
8987
|
|
|
8988
8988
|
// src/components/GenUI/HITLContainer.tsx
|
|
@@ -10050,7 +10050,7 @@ import React43, {
|
|
|
10050
10050
|
import { WorkspaceClient, Client as Client2 } from "@axiom-lattice/client-sdk";
|
|
10051
10051
|
|
|
10052
10052
|
// src/components/Chat/WorkspaceResourceManager.tsx
|
|
10053
|
-
import { useMemo as useMemo19, useEffect as useEffect40, useRef as
|
|
10053
|
+
import { useMemo as useMemo19, useEffect as useEffect40, useRef as useRef18, useState as useState57 } from "react";
|
|
10054
10054
|
import { FolderOpen as FolderOpen2, Activity as Activity3, Database as Database4, Plug as Plug2, Bot as Bot2, Wrench, Zap, LogOut as LogOut3, Building2 as Building23, Key, Share2, History, Inbox, FlaskConical as FlaskConical3 } from "lucide-react";
|
|
10055
10055
|
import { Modal as Modal13, Avatar as Avatar8, Popover as Popover2, Button as Button41 } from "antd";
|
|
10056
10056
|
|
|
@@ -19039,7 +19039,7 @@ var TopologyAutomationView = () => {
|
|
|
19039
19039
|
};
|
|
19040
19040
|
|
|
19041
19041
|
// src/components/Chat/TopologyRuntimeView.tsx
|
|
19042
|
-
import { useEffect as useEffect37, useState as useState52, useMemo as useMemo17, useCallback as useCallback31 } from "react";
|
|
19042
|
+
import { useEffect as useEffect37, useState as useState52, useMemo as useMemo17, useCallback as useCallback31, useRef as useRef17 } from "react";
|
|
19043
19043
|
import {
|
|
19044
19044
|
Spin as Spin10,
|
|
19045
19045
|
Empty as Empty6,
|
|
@@ -19050,13 +19050,16 @@ import {
|
|
|
19050
19050
|
Card as Card17,
|
|
19051
19051
|
Drawer as Drawer2,
|
|
19052
19052
|
Badge as Badge5,
|
|
19053
|
-
|
|
19053
|
+
Tooltip as Tooltip13,
|
|
19054
|
+
Progress as Progress3,
|
|
19055
|
+
Switch as Switch3
|
|
19054
19056
|
} from "antd";
|
|
19055
19057
|
import {
|
|
19056
19058
|
CheckCircleOutlined as CheckCircleOutlined5,
|
|
19057
19059
|
SyncOutlined as SyncOutlined2,
|
|
19058
19060
|
CloseCircleOutlined as CloseCircleOutlined2,
|
|
19059
|
-
ClockCircleOutlined as ClockCircleOutlined3
|
|
19061
|
+
ClockCircleOutlined as ClockCircleOutlined3,
|
|
19062
|
+
ReloadOutlined as ReloadOutlined2
|
|
19060
19063
|
} from "@ant-design/icons";
|
|
19061
19064
|
import {
|
|
19062
19065
|
ReactFlow as ReactFlow4,
|
|
@@ -19550,20 +19553,59 @@ function RunSummaryBanner({ run, agentName }) {
|
|
|
19550
19553
|
}
|
|
19551
19554
|
);
|
|
19552
19555
|
}
|
|
19553
|
-
var RunDetail = ({ run, agentName, open, onClose }) => {
|
|
19556
|
+
var RunDetail = ({ run, agentName, open, onClose, onRunUpdate, autoRefresh }) => {
|
|
19554
19557
|
const { get } = useApi();
|
|
19555
19558
|
const [steps, setSteps] = useState52([]);
|
|
19556
19559
|
const [loading, setLoading] = useState52(false);
|
|
19560
|
+
const stepsPollTimeoutRef = useRef17(null);
|
|
19561
|
+
const stepsPollSessionRef = useRef17(0);
|
|
19562
|
+
const fetchSteps = useCallback31(async () => {
|
|
19563
|
+
try {
|
|
19564
|
+
const [stepsRes, runsRes] = await Promise.all([
|
|
19565
|
+
get(
|
|
19566
|
+
`/api/workflows/runs/${run.id}/steps`
|
|
19567
|
+
),
|
|
19568
|
+
get(
|
|
19569
|
+
"/api/workflows/runs"
|
|
19570
|
+
)
|
|
19571
|
+
]);
|
|
19572
|
+
if (stepsRes.success) setSteps(stepsRes.data?.records || []);
|
|
19573
|
+
if (runsRes.success && runsRes.data?.records) {
|
|
19574
|
+
const matched = runsRes.data.records.find((r) => r.id === run.id);
|
|
19575
|
+
if (matched) onRunUpdate(matched);
|
|
19576
|
+
}
|
|
19577
|
+
} catch {
|
|
19578
|
+
}
|
|
19579
|
+
}, [get, run.id, onRunUpdate]);
|
|
19557
19580
|
useEffect37(() => {
|
|
19558
19581
|
if (!open) return;
|
|
19559
19582
|
setLoading(true);
|
|
19560
|
-
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
|
|
19566
|
-
|
|
19583
|
+
fetchSteps().finally(() => setLoading(false));
|
|
19584
|
+
}, [open, run.id, fetchSteps]);
|
|
19585
|
+
useEffect37(() => {
|
|
19586
|
+
if (stepsPollTimeoutRef.current) {
|
|
19587
|
+
clearTimeout(stepsPollTimeoutRef.current);
|
|
19588
|
+
stepsPollTimeoutRef.current = null;
|
|
19589
|
+
}
|
|
19590
|
+
if (!open || run.status !== "running" || !autoRefresh) return;
|
|
19591
|
+
const sessionId = Date.now();
|
|
19592
|
+
stepsPollSessionRef.current = sessionId;
|
|
19593
|
+
const poll = async () => {
|
|
19594
|
+
if (stepsPollSessionRef.current !== sessionId) return;
|
|
19595
|
+
await fetchSteps();
|
|
19596
|
+
if (stepsPollSessionRef.current === sessionId) {
|
|
19597
|
+
stepsPollTimeoutRef.current = setTimeout(poll, POLLING_INTERVAL);
|
|
19598
|
+
}
|
|
19599
|
+
};
|
|
19600
|
+
poll();
|
|
19601
|
+
return () => {
|
|
19602
|
+
stepsPollSessionRef.current = 0;
|
|
19603
|
+
if (stepsPollTimeoutRef.current) {
|
|
19604
|
+
clearTimeout(stepsPollTimeoutRef.current);
|
|
19605
|
+
stepsPollTimeoutRef.current = null;
|
|
19606
|
+
}
|
|
19607
|
+
};
|
|
19608
|
+
}, [open, run.status, fetchSteps, autoRefresh]);
|
|
19567
19609
|
return /* @__PURE__ */ jsxs50(
|
|
19568
19610
|
Drawer2,
|
|
19569
19611
|
{
|
|
@@ -19595,6 +19637,7 @@ var RunDetail = ({ run, agentName, open, onClose }) => {
|
|
|
19595
19637
|
}
|
|
19596
19638
|
);
|
|
19597
19639
|
};
|
|
19640
|
+
var POLLING_INTERVAL = 3e3;
|
|
19598
19641
|
var TopologyRuntimeView = () => {
|
|
19599
19642
|
const { get } = useApi();
|
|
19600
19643
|
const [runs, setRuns] = useState52([]);
|
|
@@ -19602,9 +19645,46 @@ var TopologyRuntimeView = () => {
|
|
|
19602
19645
|
const [loading, setLoading] = useState52(true);
|
|
19603
19646
|
const [error, setError] = useState52(null);
|
|
19604
19647
|
const [selectedRun, setSelectedRun] = useState52(null);
|
|
19648
|
+
const [autoRefresh, setAutoRefresh] = useState52(true);
|
|
19649
|
+
const pollingSessionRef = useRef17(0);
|
|
19650
|
+
const handleRunUpdate = useCallback31((updated) => {
|
|
19651
|
+
setRuns(
|
|
19652
|
+
(prev) => prev.map((r) => r.id === updated.id ? updated : r)
|
|
19653
|
+
);
|
|
19654
|
+
setSelectedRun((prev) => prev?.id === updated.id ? updated : prev);
|
|
19655
|
+
}, []);
|
|
19656
|
+
const refreshRuns = useCallback31(async () => {
|
|
19657
|
+
setLoading(true);
|
|
19658
|
+
try {
|
|
19659
|
+
const defsRes = await get("/api/workflows/definitions");
|
|
19660
|
+
const nameMap = {};
|
|
19661
|
+
if (defsRes.success && defsRes.data?.records) {
|
|
19662
|
+
defsRes.data.records.forEach((d) => {
|
|
19663
|
+
nameMap[d.assistantId] = d.assistantName;
|
|
19664
|
+
});
|
|
19665
|
+
}
|
|
19666
|
+
setAgentNames(nameMap);
|
|
19667
|
+
const runsRes = await get("/api/workflows/runs");
|
|
19668
|
+
if (runsRes.success && runsRes.data?.records) {
|
|
19669
|
+
runsRes.data.records.sort(
|
|
19670
|
+
(a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime()
|
|
19671
|
+
);
|
|
19672
|
+
setRuns(runsRes.data.records);
|
|
19673
|
+
setSelectedRun((prev) => {
|
|
19674
|
+
if (!prev) return null;
|
|
19675
|
+
return runsRes.data.records.find((r) => r.id === prev.id) || prev;
|
|
19676
|
+
});
|
|
19677
|
+
}
|
|
19678
|
+
setError(null);
|
|
19679
|
+
} catch (err) {
|
|
19680
|
+
setError(err instanceof Error ? err.message : "Failed to load workflow runs");
|
|
19681
|
+
} finally {
|
|
19682
|
+
setLoading(false);
|
|
19683
|
+
}
|
|
19684
|
+
}, [get]);
|
|
19605
19685
|
useEffect37(() => {
|
|
19606
19686
|
let cancelled = false;
|
|
19607
|
-
const
|
|
19687
|
+
const init2 = async () => {
|
|
19608
19688
|
try {
|
|
19609
19689
|
setLoading(true);
|
|
19610
19690
|
const defsRes = await get("/api/workflows/definitions");
|
|
@@ -19633,11 +19713,16 @@ var TopologyRuntimeView = () => {
|
|
|
19633
19713
|
if (!cancelled) setLoading(false);
|
|
19634
19714
|
}
|
|
19635
19715
|
};
|
|
19636
|
-
|
|
19716
|
+
init2();
|
|
19637
19717
|
return () => {
|
|
19638
19718
|
cancelled = true;
|
|
19639
19719
|
};
|
|
19640
19720
|
}, [get]);
|
|
19721
|
+
useEffect37(() => {
|
|
19722
|
+
return () => {
|
|
19723
|
+
pollingSessionRef.current = 0;
|
|
19724
|
+
};
|
|
19725
|
+
}, []);
|
|
19641
19726
|
if (loading) {
|
|
19642
19727
|
return /* @__PURE__ */ jsx76("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%" }, children: /* @__PURE__ */ jsx76(Spin10, { size: "large" }) });
|
|
19643
19728
|
}
|
|
@@ -19648,7 +19733,27 @@ var TopologyRuntimeView = () => {
|
|
|
19648
19733
|
return /* @__PURE__ */ jsx76(Empty6, { description: "No workflow runs yet. Execute a processing agent to see results here." });
|
|
19649
19734
|
}
|
|
19650
19735
|
return /* @__PURE__ */ jsxs50("div", { style: { padding: 16, overflow: "auto", height: "100%" }, children: [
|
|
19651
|
-
/* @__PURE__ */
|
|
19736
|
+
/* @__PURE__ */ jsxs50("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 16 }, children: [
|
|
19737
|
+
/* @__PURE__ */ jsx76(Title5, { level: 5, style: { marginBottom: 0 }, children: "Workflow Runs" }),
|
|
19738
|
+
/* @__PURE__ */ jsxs50(Space23, { size: 8, children: [
|
|
19739
|
+
/* @__PURE__ */ jsx76(Text27, { type: "secondary", style: { fontSize: 11 }, children: "Auto-refresh" }),
|
|
19740
|
+
/* @__PURE__ */ jsx76(
|
|
19741
|
+
Switch3,
|
|
19742
|
+
{
|
|
19743
|
+
size: "small",
|
|
19744
|
+
checked: autoRefresh,
|
|
19745
|
+
onChange: setAutoRefresh
|
|
19746
|
+
}
|
|
19747
|
+
),
|
|
19748
|
+
/* @__PURE__ */ jsx76(Tooltip13, { title: "Refresh now", children: /* @__PURE__ */ jsx76(
|
|
19749
|
+
ReloadOutlined2,
|
|
19750
|
+
{
|
|
19751
|
+
style: { cursor: "pointer", color: "#999" },
|
|
19752
|
+
onClick: () => refreshRuns()
|
|
19753
|
+
}
|
|
19754
|
+
) })
|
|
19755
|
+
] })
|
|
19756
|
+
] }),
|
|
19652
19757
|
/* @__PURE__ */ jsx76(
|
|
19653
19758
|
List7,
|
|
19654
19759
|
{
|
|
@@ -19704,7 +19809,9 @@ var TopologyRuntimeView = () => {
|
|
|
19704
19809
|
run: selectedRun,
|
|
19705
19810
|
agentName: agentNames[selectedRun.assistantId] || selectedRun.assistantId,
|
|
19706
19811
|
open: !!selectedRun,
|
|
19707
|
-
onClose: () => setSelectedRun(null)
|
|
19812
|
+
onClose: () => setSelectedRun(null),
|
|
19813
|
+
onRunUpdate: handleRunUpdate,
|
|
19814
|
+
autoRefresh
|
|
19708
19815
|
}
|
|
19709
19816
|
)
|
|
19710
19817
|
] });
|
|
@@ -19713,7 +19820,7 @@ var TopologyRuntimeView = () => {
|
|
|
19713
19820
|
// src/components/Chat/TopologyInboxView.tsx
|
|
19714
19821
|
import { useEffect as useEffect38, useState as useState53 } from "react";
|
|
19715
19822
|
import { Card as Card18, Typography as Typography31, Spin as Spin11, Empty as Empty7, List as List8, Button as Button37, Space as Space24, Tag as Tag17 } from "antd";
|
|
19716
|
-
import { InboxOutlined, ReloadOutlined as
|
|
19823
|
+
import { InboxOutlined, ReloadOutlined as ReloadOutlined3 } from "@ant-design/icons";
|
|
19717
19824
|
import { jsx as jsx77, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
19718
19825
|
var { Text: Text28, Title: Title6 } = Typography31;
|
|
19719
19826
|
var TopologyInboxView = () => {
|
|
@@ -19770,7 +19877,7 @@ var TopologyInboxView = () => {
|
|
|
19770
19877
|
/* @__PURE__ */ jsx77(
|
|
19771
19878
|
Button37,
|
|
19772
19879
|
{
|
|
19773
|
-
icon: /* @__PURE__ */ jsx77(
|
|
19880
|
+
icon: /* @__PURE__ */ jsx77(ReloadOutlined3, {}),
|
|
19774
19881
|
onClick: fetchInbox,
|
|
19775
19882
|
loading,
|
|
19776
19883
|
size: "small",
|
|
@@ -21001,8 +21108,8 @@ var WorkspaceResourceManager = ({
|
|
|
21001
21108
|
logo
|
|
21002
21109
|
}) => {
|
|
21003
21110
|
const { openContentApp, menuCollapsed, setMenuCollapsed } = useChatUIContext();
|
|
21004
|
-
const hasOpenedDefault =
|
|
21005
|
-
const hasRegistered =
|
|
21111
|
+
const hasOpenedDefault = useRef18(false);
|
|
21112
|
+
const hasRegistered = useRef18(false);
|
|
21006
21113
|
useEffect40(() => {
|
|
21007
21114
|
if (!hasRegistered.current) {
|
|
21008
21115
|
hasRegistered.current = true;
|
|
@@ -21617,7 +21724,7 @@ var WorkspaceContextProvider = ({
|
|
|
21617
21724
|
};
|
|
21618
21725
|
|
|
21619
21726
|
// src/components/Chat/DatabasePicker.tsx
|
|
21620
|
-
import { useRef as
|
|
21727
|
+
import { useRef as useRef19, useState as useState59 } from "react";
|
|
21621
21728
|
import { Modal as Modal14, List as List9, Checkbox as Checkbox5, Spin as Spin13, Empty as Empty11, Typography as Typography36, Button as Button42, Space as Space25, Tooltip as Tooltip14 } from "antd";
|
|
21622
21729
|
import { Database as Database5 } from "lucide-react";
|
|
21623
21730
|
import { Fragment as Fragment14, jsx as jsx84, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
@@ -21627,7 +21734,7 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
21627
21734
|
const [loading, setLoading] = useState59(false);
|
|
21628
21735
|
const [selectedDatabases, setSelectedDatabases] = useState59([]);
|
|
21629
21736
|
const { get } = useApi();
|
|
21630
|
-
const fetchedRef =
|
|
21737
|
+
const fetchedRef = useRef19(false);
|
|
21631
21738
|
const loadDatabases = async () => {
|
|
21632
21739
|
setLoading(true);
|
|
21633
21740
|
try {
|
|
@@ -21767,7 +21874,7 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
21767
21874
|
};
|
|
21768
21875
|
|
|
21769
21876
|
// src/components/Chat/SkillPicker.tsx
|
|
21770
|
-
import { useRef as
|
|
21877
|
+
import { useRef as useRef20, useState as useState60 } from "react";
|
|
21771
21878
|
import { Modal as Modal15, List as List10, Checkbox as Checkbox6, Spin as Spin14, Empty as Empty12, Typography as Typography37, Button as Button43, Space as Space26, Tooltip as Tooltip15 } from "antd";
|
|
21772
21879
|
import { BrainCircuit } from "lucide-react";
|
|
21773
21880
|
import { Fragment as Fragment15, jsx as jsx85, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
@@ -21777,7 +21884,7 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
|
21777
21884
|
const [loading, setLoading] = useState60(false);
|
|
21778
21885
|
const [selectedSkills, setSelectedSkills] = useState60([]);
|
|
21779
21886
|
const { get } = useApi();
|
|
21780
|
-
const fetchedRef =
|
|
21887
|
+
const fetchedRef = useRef20(false);
|
|
21781
21888
|
const loadSkills = async () => {
|
|
21782
21889
|
setLoading(true);
|
|
21783
21890
|
try {
|
|
@@ -21917,7 +22024,7 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
|
21917
22024
|
};
|
|
21918
22025
|
|
|
21919
22026
|
// src/components/Chat/AgentPicker.tsx
|
|
21920
|
-
import { useRef as
|
|
22027
|
+
import { useRef as useRef21, useState as useState61 } from "react";
|
|
21921
22028
|
import { Modal as Modal16, List as List11, Empty as Empty13, Typography as Typography38, Button as Button44, Tooltip as Tooltip16 } from "antd";
|
|
21922
22029
|
import { Bot as Bot3 } from "lucide-react";
|
|
21923
22030
|
import { Fragment as Fragment16, jsx as jsx86, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
@@ -21926,7 +22033,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
21926
22033
|
const [loading, setLoading] = useState61(false);
|
|
21927
22034
|
const [selectedAgent, setSelectedAgent] = useState61(null);
|
|
21928
22035
|
const { assistants, currentAssistant, selectAssistant } = useAssistantContext();
|
|
21929
|
-
const fetchedRef =
|
|
22036
|
+
const fetchedRef = useRef21(false);
|
|
21930
22037
|
const handleOpenModal = () => {
|
|
21931
22038
|
setSelectedAgent(currentAssistant?.id || null);
|
|
21932
22039
|
setModalOpen(true);
|
|
@@ -22033,7 +22140,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
22033
22140
|
};
|
|
22034
22141
|
|
|
22035
22142
|
// src/components/Chat/MetricsDataSourcePicker.tsx
|
|
22036
|
-
import { useEffect as useEffect43, useState as useState62, useRef as
|
|
22143
|
+
import { useEffect as useEffect43, useState as useState62, useRef as useRef22 } from "react";
|
|
22037
22144
|
import { Modal as Modal17, List as List12, Spin as Spin16, Empty as Empty14, Typography as Typography39, Button as Button45, Tag as Tag21, Tooltip as Tooltip17 } from "antd";
|
|
22038
22145
|
import { Database as Database6, Check as Check4, Server as Server3 } from "lucide-react";
|
|
22039
22146
|
import { Fragment as Fragment17, jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
@@ -22048,7 +22155,7 @@ var MetricsDataSourcePicker = ({
|
|
|
22048
22155
|
const { config } = useLatticeChatShellContext();
|
|
22049
22156
|
const { customRunConfig, updateCustomRunConfig } = useConversationContext();
|
|
22050
22157
|
const { get } = useApi();
|
|
22051
|
-
const hasInitializedRef =
|
|
22158
|
+
const hasInitializedRef = useRef22(false);
|
|
22052
22159
|
const loadDataSources = async () => {
|
|
22053
22160
|
setLoading(true);
|
|
22054
22161
|
try {
|
|
@@ -22373,7 +22480,7 @@ var MetricsDataSourcePicker = ({
|
|
|
22373
22480
|
};
|
|
22374
22481
|
|
|
22375
22482
|
// src/components/Chat/ModelSelector.tsx
|
|
22376
|
-
import { useState as useState63, useEffect as useEffect44, useCallback as useCallback33, useRef as
|
|
22483
|
+
import { useState as useState63, useEffect as useEffect44, useCallback as useCallback33, useRef as useRef23 } from "react";
|
|
22377
22484
|
import { Select as Select7 } from "antd";
|
|
22378
22485
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
22379
22486
|
var ModelSelector = ({
|
|
@@ -22387,8 +22494,8 @@ var ModelSelector = ({
|
|
|
22387
22494
|
const [internalValue, setInternalValue] = useState63(null);
|
|
22388
22495
|
const [dropdownOpen, setDropdownOpen] = useState63(false);
|
|
22389
22496
|
const [isHovered, setIsHovered] = useState63(false);
|
|
22390
|
-
const hasFetchedRef =
|
|
22391
|
-
const hasSetDefaultRef =
|
|
22497
|
+
const hasFetchedRef = useRef23(false);
|
|
22498
|
+
const hasSetDefaultRef = useRef23(false);
|
|
22392
22499
|
const { get } = useApi();
|
|
22393
22500
|
const selectedModelConfig = value !== void 0 ? value : internalValue;
|
|
22394
22501
|
const setSelectedModelConfig = useCallback33((config) => {
|
|
@@ -23139,7 +23246,7 @@ var Chating = ({
|
|
|
23139
23246
|
const [attachedFiles, setAttachedFiles] = useState66([]);
|
|
23140
23247
|
const { styles } = useStyle();
|
|
23141
23248
|
const [headerOpen, setHeaderOpen] = useState66(false);
|
|
23142
|
-
const attachmentsRef =
|
|
23249
|
+
const attachmentsRef = useRef24(null);
|
|
23143
23250
|
const senderRef = React51.useRef(null);
|
|
23144
23251
|
const {
|
|
23145
23252
|
assistantId,
|
|
@@ -23451,7 +23558,7 @@ var Chating = ({
|
|
|
23451
23558
|
Button46,
|
|
23452
23559
|
{
|
|
23453
23560
|
type: "text",
|
|
23454
|
-
icon: /* @__PURE__ */ jsx91(
|
|
23561
|
+
icon: /* @__PURE__ */ jsx91(ReloadOutlined4, {}),
|
|
23455
23562
|
onClick: () => {
|
|
23456
23563
|
loadMessages();
|
|
23457
23564
|
}
|
|
@@ -23883,7 +23990,7 @@ import {
|
|
|
23883
23990
|
PauseCircleOutlined,
|
|
23884
23991
|
PlayCircleOutlined as PlayCircleOutlined2,
|
|
23885
23992
|
StopOutlined,
|
|
23886
|
-
ReloadOutlined as
|
|
23993
|
+
ReloadOutlined as ReloadOutlined5,
|
|
23887
23994
|
CheckCircleOutlined as CheckCircleOutlined7,
|
|
23888
23995
|
CloseCircleOutlined as CloseCircleOutlined3,
|
|
23889
23996
|
ExclamationCircleOutlined,
|
|
@@ -24218,7 +24325,7 @@ var ScheduleViewer = ({ data }) => {
|
|
|
24218
24325
|
Button48,
|
|
24219
24326
|
{
|
|
24220
24327
|
type: "text",
|
|
24221
|
-
icon: /* @__PURE__ */ jsx94(
|
|
24328
|
+
icon: /* @__PURE__ */ jsx94(ReloadOutlined5, { spin: loading }),
|
|
24222
24329
|
onClick: handleRefresh,
|
|
24223
24330
|
loading
|
|
24224
24331
|
}
|
|
@@ -27858,7 +27965,7 @@ var TaskBoard = ({
|
|
|
27858
27965
|
};
|
|
27859
27966
|
|
|
27860
27967
|
// src/components/GenUI/elements/Mailbox.tsx
|
|
27861
|
-
import { useState as useState73, useMemo as useMemo28, useRef as
|
|
27968
|
+
import { useState as useState73, useMemo as useMemo28, useRef as useRef25, useEffect as useEffect48 } from "react";
|
|
27862
27969
|
import { jsx as jsx109, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
27863
27970
|
var useStyle16 = () => {
|
|
27864
27971
|
return {
|
|
@@ -28145,7 +28252,7 @@ var TeamChat = ({ data }) => {
|
|
|
28145
28252
|
const styles = useStyle16();
|
|
28146
28253
|
const { teamName, currentUser, teammates, messages, onSendMessage } = data || {};
|
|
28147
28254
|
const [inputValue, setInputValue] = useState73("");
|
|
28148
|
-
const messagesEndRef =
|
|
28255
|
+
const messagesEndRef = useRef25(null);
|
|
28149
28256
|
const sortedMessages = useMemo28(() => {
|
|
28150
28257
|
return [...messages || []].sort(
|
|
28151
28258
|
(a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime()
|
|
@@ -28328,7 +28435,7 @@ import { Button as Button53, Typography as Typography56 } from "antd";
|
|
|
28328
28435
|
import { ExpandOutlined as ExpandOutlined2 } from "@ant-design/icons";
|
|
28329
28436
|
|
|
28330
28437
|
// src/streaming-html/StreamingHTMLRenderer.tsx
|
|
28331
|
-
import React61, { useEffect as useEffect49, useRef as
|
|
28438
|
+
import React61, { useEffect as useEffect49, useRef as useRef26, useCallback as useCallback36, useState as useState74 } from "react";
|
|
28332
28439
|
|
|
28333
28440
|
// src/streaming-html/show-widget-css-generator.ts
|
|
28334
28441
|
function generateShowWidgetCSS(tokens) {
|
|
@@ -29019,14 +29126,14 @@ var StreamingHTMLRenderer = ({
|
|
|
29019
29126
|
title,
|
|
29020
29127
|
loadingMessages
|
|
29021
29128
|
}) => {
|
|
29022
|
-
const iframeRef =
|
|
29023
|
-
const containerRef =
|
|
29024
|
-
const resizeObserverRef =
|
|
29025
|
-
const prevHTMLRef =
|
|
29026
|
-
const isReadyRef =
|
|
29027
|
-
const pendingChunksRef =
|
|
29028
|
-
const isCompleteRef =
|
|
29029
|
-
const isScriptExecuted =
|
|
29129
|
+
const iframeRef = useRef26(null);
|
|
29130
|
+
const containerRef = useRef26(null);
|
|
29131
|
+
const resizeObserverRef = useRef26(null);
|
|
29132
|
+
const prevHTMLRef = useRef26("");
|
|
29133
|
+
const isReadyRef = useRef26(false);
|
|
29134
|
+
const pendingChunksRef = useRef26([]);
|
|
29135
|
+
const isCompleteRef = useRef26(isComplete);
|
|
29136
|
+
const isScriptExecuted = useRef26(false);
|
|
29030
29137
|
const [iframeHeight, setIframeHeight] = React61.useState(0);
|
|
29031
29138
|
const [iframeWidth, setIframeWidth] = React61.useState(void 0);
|
|
29032
29139
|
const [currentMessageIndex, setCurrentMessageIndex] = useState74(0);
|
|
@@ -29852,7 +29959,7 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
29852
29959
|
};
|
|
29853
29960
|
|
|
29854
29961
|
// src/components/Chat/ProjectSelector.tsx
|
|
29855
|
-
import { useState as useState76, useCallback as useCallback39, useMemo as useMemo29, useRef as
|
|
29962
|
+
import { useState as useState76, useCallback as useCallback39, useMemo as useMemo29, useRef as useRef27 } from "react";
|
|
29856
29963
|
import { Modal as Modal20, Input as Input15, Button as Button54, message as message18 } from "antd";
|
|
29857
29964
|
import { createStyles as createStyles35 } from "antd-style";
|
|
29858
29965
|
import { Folder, ChevronDown as ChevronDown6, Building2 as Building24 } from "lucide-react";
|
|
@@ -30089,13 +30196,13 @@ var ProjectSelector = ({
|
|
|
30089
30196
|
createProject
|
|
30090
30197
|
} = useWorkspaceContext();
|
|
30091
30198
|
const [isWorkspaceListOpen, setIsWorkspaceListOpen] = useState76(false);
|
|
30092
|
-
const workspaceDropdownRef =
|
|
30199
|
+
const workspaceDropdownRef = useRef27(null);
|
|
30093
30200
|
const [isProjectListOpen, setIsProjectListOpen] = useState76(false);
|
|
30094
30201
|
const [isModalOpen, setIsModalOpen] = useState76(false);
|
|
30095
30202
|
const [projectName, setProjectName] = useState76("");
|
|
30096
30203
|
const [validationError, setValidationError] = useState76(null);
|
|
30097
30204
|
const [isCreating, setIsCreating] = useState76(false);
|
|
30098
|
-
const projectNameInputRef =
|
|
30205
|
+
const projectNameInputRef = useRef27(null);
|
|
30099
30206
|
const currentProject = useMemo29(() => {
|
|
30100
30207
|
return projects.find((p) => p.id === projectId);
|
|
30101
30208
|
}, [projects, projectId]);
|
|
@@ -31447,7 +31554,7 @@ var LatticeChatView = (props) => {
|
|
|
31447
31554
|
};
|
|
31448
31555
|
|
|
31449
31556
|
// src/components/Chat/SettingsModal.tsx
|
|
31450
|
-
import { useState as useState79, useEffect as useEffect52, useRef as
|
|
31557
|
+
import { useState as useState79, useEffect as useEffect52, useRef as useRef28 } from "react";
|
|
31451
31558
|
import {
|
|
31452
31559
|
Modal as Modal22,
|
|
31453
31560
|
Input as Input16,
|
|
@@ -31457,14 +31564,14 @@ import {
|
|
|
31457
31564
|
Typography as Typography57,
|
|
31458
31565
|
Alert as Alert9,
|
|
31459
31566
|
Select as Select8,
|
|
31460
|
-
Switch as
|
|
31567
|
+
Switch as Switch4,
|
|
31461
31568
|
Space as Space39,
|
|
31462
31569
|
Tabs as Tabs3
|
|
31463
31570
|
} from "antd";
|
|
31464
31571
|
import {
|
|
31465
31572
|
SaveOutlined as SaveOutlined2,
|
|
31466
31573
|
EnvironmentOutlined,
|
|
31467
|
-
ReloadOutlined as
|
|
31574
|
+
ReloadOutlined as ReloadOutlined6,
|
|
31468
31575
|
CheckCircleOutlined as CheckCircleOutlined9,
|
|
31469
31576
|
ApiOutlined,
|
|
31470
31577
|
LinkOutlined as LinkOutlined2,
|
|
@@ -31860,7 +31967,7 @@ var SettingsModal = ({
|
|
|
31860
31967
|
return [];
|
|
31861
31968
|
});
|
|
31862
31969
|
const [serverConfigs, setServerConfigs] = useState79({});
|
|
31863
|
-
const connectionsRef =
|
|
31970
|
+
const connectionsRef = useRef28(connections);
|
|
31864
31971
|
useEffect52(() => {
|
|
31865
31972
|
connectionsRef.current = connections;
|
|
31866
31973
|
}, [connections]);
|
|
@@ -32300,7 +32407,7 @@ var SettingsModal = ({
|
|
|
32300
32407
|
" QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
|
|
32301
32408
|
] }),
|
|
32302
32409
|
/* @__PURE__ */ jsxs89("div", { children: [
|
|
32303
|
-
/* @__PURE__ */ jsx123(
|
|
32410
|
+
/* @__PURE__ */ jsx123(ReloadOutlined6, { style: { color: "#faad14", marginRight: 8 } }),
|
|
32304
32411
|
/* @__PURE__ */ jsx123("strong", { children: "Requires restart:" }),
|
|
32305
32412
|
" PORT (server must be restarted to change port)"
|
|
32306
32413
|
] })
|
|
@@ -32510,7 +32617,7 @@ QUEUE_NAME=tasks`,
|
|
|
32510
32617
|
] }),
|
|
32511
32618
|
/* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsxs89(Space39, { children: [
|
|
32512
32619
|
/* @__PURE__ */ jsx123(
|
|
32513
|
-
|
|
32620
|
+
Switch4,
|
|
32514
32621
|
{
|
|
32515
32622
|
checked: model.streaming,
|
|
32516
32623
|
onChange: (checked) => handleModelChange(index, "streaming", checked)
|