@axiom-lattice/react-sdk 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentDetailSideApp-TIU7UQZH.mjs → AgentDetailSideApp-QZPV7MNB.mjs} +6 -6
- package/dist/{AgentGovernanceWorkbench-CWFRVPS5.mjs → AgentGovernanceWorkbench-25C3AKQI.mjs} +7 -7
- package/dist/{MessageGraph-XRSLD6VY.mjs → MessageGraph-JX6Y3VFH.mjs} +2 -2
- package/dist/{ReactChart-IW27RELF.mjs → ReactChart-LYUXL5M6.mjs} +2 -2
- package/dist/{TasksSideApp-5UTBVBIW.mjs → TasksSideApp-TWDLVB4D.mjs} +3 -3
- package/dist/{TeamWorkspace-WZ7EHM3X.mjs → TeamWorkspace-FGFAUD5Z.mjs} +2 -2
- package/dist/{TopologyRuntimeView-77JCSNTK.mjs → TopologyRuntimeView-O3VL4A7R.mjs} +3 -3
- package/dist/{WorkflowAutomationView-AVGN2L6Y.mjs → WorkflowAutomationView-D4YMZLRJ.mjs} +5 -5
- package/dist/{chunk-NE5RWDYD.mjs → chunk-3ZEMSWAC.mjs} +2 -2
- package/dist/{chunk-MFFUZVR5.mjs → chunk-466FV4VM.mjs} +2 -2
- package/dist/{chunk-CLCJX35D.mjs → chunk-6BWBE7MR.mjs} +6 -6
- package/dist/{chunk-QLFWQ4HR.mjs → chunk-7JDWJZ5M.mjs} +11 -11
- package/dist/{chunk-VQT22AKU.mjs → chunk-JJIGSAPR.mjs} +127 -220
- package/dist/chunk-JJIGSAPR.mjs.map +1 -0
- package/dist/{chunk-GJTDVFBS.mjs → chunk-QABSNIMF.mjs} +2 -2
- package/dist/{chunk-VLQM75ZM.mjs → chunk-UZWBRDTU.mjs} +4 -4
- package/dist/{embed-page-AgentDetailSideApp-XCP4LY7Y.js → embed-page-AgentDetailSideApp-JYVZKSUU.js} +1 -1
- package/dist/embed-page-AgentGovernanceWorkbench-SD2EHW2B.js +1 -0
- package/dist/{embed-page-MessageGraph-D77CYFAG.js → embed-page-MessageGraph-GLQXKAVC.js} +1 -1
- package/dist/{embed-page-ReactChart-TBDJOTZ5.js → embed-page-ReactChart-74MHCE2K.js} +1 -1
- package/dist/{embed-page-TasksSideApp-BVCIAE24.js → embed-page-TasksSideApp-DA4LUTMD.js} +1 -1
- package/dist/{embed-page-TeamWorkspace-JFEKNVFP.js → embed-page-TeamWorkspace-DUB3L6V6.js} +1 -1
- package/dist/{embed-page-TopologyRuntimeView-42TN76MK.js → embed-page-TopologyRuntimeView-NFBHAICN.js} +1 -1
- package/dist/{embed-page-WorkflowAutomationView-JLP4UHPP.js → embed-page-WorkflowAutomationView-43YGTXGF.js} +1 -1
- package/dist/{embed-page-chunk-K2U3JD67.js → embed-page-chunk-BVSC3MSO.js} +1 -1
- package/dist/{embed-page-chunk-5NJ3O2GK.js → embed-page-chunk-C4ZV4IXK.js} +2 -2
- package/dist/{embed-page-chunk-I3OONX3N.js → embed-page-chunk-DWIBLGBW.js} +1 -1
- package/dist/{embed-page-chunk-H64UEFHS.js → embed-page-chunk-GKHIPXZ2.js} +1 -1
- package/dist/{embed-page-chunk-YYDZ6ZBV.js → embed-page-chunk-P477ZTUO.js} +5 -5
- package/dist/{embed-page-chunk-GUSAII2D.js → embed-page-chunk-UHH575CK.js} +1 -1
- package/dist/embed-page.js +1 -1
- package/dist/index.d.mts +17 -20
- package/dist/index.d.ts +17 -20
- package/dist/index.js +467 -694
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +89 -219
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-VQT22AKU.mjs.map +0 -1
- package/dist/embed-page-AgentGovernanceWorkbench-BBDKEIBI.js +0 -5
- /package/dist/{AgentDetailSideApp-TIU7UQZH.mjs.map → AgentDetailSideApp-QZPV7MNB.mjs.map} +0 -0
- /package/dist/{AgentGovernanceWorkbench-CWFRVPS5.mjs.map → AgentGovernanceWorkbench-25C3AKQI.mjs.map} +0 -0
- /package/dist/{MessageGraph-XRSLD6VY.mjs.map → MessageGraph-JX6Y3VFH.mjs.map} +0 -0
- /package/dist/{ReactChart-IW27RELF.mjs.map → ReactChart-LYUXL5M6.mjs.map} +0 -0
- /package/dist/{TasksSideApp-5UTBVBIW.mjs.map → TasksSideApp-TWDLVB4D.mjs.map} +0 -0
- /package/dist/{TeamWorkspace-WZ7EHM3X.mjs.map → TeamWorkspace-FGFAUD5Z.mjs.map} +0 -0
- /package/dist/{TopologyRuntimeView-77JCSNTK.mjs.map → TopologyRuntimeView-O3VL4A7R.mjs.map} +0 -0
- /package/dist/{WorkflowAutomationView-AVGN2L6Y.mjs.map → WorkflowAutomationView-D4YMZLRJ.mjs.map} +0 -0
- /package/dist/{chunk-NE5RWDYD.mjs.map → chunk-3ZEMSWAC.mjs.map} +0 -0
- /package/dist/{chunk-MFFUZVR5.mjs.map → chunk-466FV4VM.mjs.map} +0 -0
- /package/dist/{chunk-CLCJX35D.mjs.map → chunk-6BWBE7MR.mjs.map} +0 -0
- /package/dist/{chunk-QLFWQ4HR.mjs.map → chunk-7JDWJZ5M.mjs.map} +0 -0
- /package/dist/{chunk-GJTDVFBS.mjs.map → chunk-QABSNIMF.mjs.map} +0 -0
- /package/dist/{chunk-VLQM75ZM.mjs.map → chunk-UZWBRDTU.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowAutomationView
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UZWBRDTU.mjs";
|
|
4
4
|
import {
|
|
5
5
|
SkillFlow_default,
|
|
6
6
|
SkillNode_default
|
|
7
7
|
} from "./chunk-UDSGQ7R7.mjs";
|
|
8
8
|
import {
|
|
9
|
-
AgentCardStats,
|
|
10
9
|
AgentGovernanceWorkbench,
|
|
11
10
|
AgentGraphView,
|
|
12
11
|
AgentList,
|
|
13
12
|
CreateAssistantModal_default
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JJIGSAPR.mjs";
|
|
15
14
|
import {
|
|
16
15
|
AgentChatApp,
|
|
17
16
|
AgentConfigGraph,
|
|
@@ -19,19 +18,20 @@ import {
|
|
|
19
18
|
AgentDetailView,
|
|
20
19
|
AgentEvalPanel,
|
|
21
20
|
AgentOverview,
|
|
21
|
+
MiniBarChart,
|
|
22
22
|
buildAgentConfigGraphData,
|
|
23
23
|
buildAgentGraphData,
|
|
24
24
|
buildAgentListItems,
|
|
25
25
|
getRoundRepresentativeScore,
|
|
26
26
|
isTrainingRound,
|
|
27
27
|
toAttachmentItems
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-6BWBE7MR.mjs";
|
|
29
|
+
import "./chunk-3ZEMSWAC.mjs";
|
|
30
|
+
import "./chunk-QABSNIMF.mjs";
|
|
31
31
|
import {
|
|
32
32
|
WorkflowCanvas_default,
|
|
33
33
|
WorkflowNode_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-466FV4VM.mjs";
|
|
35
35
|
import "./chunk-7FWCKQNB.mjs";
|
|
36
36
|
import {
|
|
37
37
|
A2AKeyList,
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
useWebPush,
|
|
193
193
|
useWorkspaceContext,
|
|
194
194
|
useWorkspaceContextOptional
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-7JDWJZ5M.mjs";
|
|
196
196
|
import {
|
|
197
197
|
Background,
|
|
198
198
|
Controls,
|
|
@@ -406,7 +406,6 @@ import {
|
|
|
406
406
|
Button,
|
|
407
407
|
message,
|
|
408
408
|
Typography,
|
|
409
|
-
Alert,
|
|
410
409
|
Select,
|
|
411
410
|
Switch,
|
|
412
411
|
Space,
|
|
@@ -414,9 +413,6 @@ import {
|
|
|
414
413
|
} from "antd";
|
|
415
414
|
import {
|
|
416
415
|
SaveOutlined,
|
|
417
|
-
EnvironmentOutlined,
|
|
418
|
-
ReloadOutlined,
|
|
419
|
-
CheckCircleOutlined,
|
|
420
416
|
ApiOutlined,
|
|
421
417
|
LinkOutlined,
|
|
422
418
|
CheckCircleFilled,
|
|
@@ -427,7 +423,6 @@ import {
|
|
|
427
423
|
import { createStyles } from "antd-style";
|
|
428
424
|
import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
429
425
|
var { Text, Title } = Typography;
|
|
430
|
-
var { TextArea } = Input;
|
|
431
426
|
var useStyles = createStyles(({ token, css }) => ({
|
|
432
427
|
// settingsModal: css`
|
|
433
428
|
// .ant-modal {
|
|
@@ -770,11 +765,6 @@ var useStyles = createStyles(({ token, css }) => ({
|
|
|
770
765
|
`
|
|
771
766
|
}));
|
|
772
767
|
var SETTINGS_MENU_ITEMS = [
|
|
773
|
-
{
|
|
774
|
-
key: "environment",
|
|
775
|
-
labelKey: "chatConfig.settings.menu.environment",
|
|
776
|
-
icon: /* @__PURE__ */ jsx5(EnvironmentOutlined, {})
|
|
777
|
-
},
|
|
778
768
|
{
|
|
779
769
|
key: "models",
|
|
780
770
|
labelKey: "chatConfig.settings.menu.models",
|
|
@@ -819,7 +809,7 @@ var SettingsModal = ({
|
|
|
819
809
|
const [activeTabKey, setActiveTabKey] = useState(
|
|
820
810
|
connections.length > 0 ? connections[0].id : ""
|
|
821
811
|
);
|
|
822
|
-
const [activeMenu, setActiveMenu] = useState("
|
|
812
|
+
const [activeMenu, setActiveMenu] = useState("models");
|
|
823
813
|
const [loading, setLoading] = useState(false);
|
|
824
814
|
const [showAddServerModal, setShowAddServerModal] = useState(false);
|
|
825
815
|
const [newServerUrl, setNewServerUrl] = useState("");
|
|
@@ -844,7 +834,6 @@ var SettingsModal = ({
|
|
|
844
834
|
setServerConfigs((prev) => ({
|
|
845
835
|
...prev,
|
|
846
836
|
[serverId]: {
|
|
847
|
-
envText: "",
|
|
848
837
|
models: [
|
|
849
838
|
{
|
|
850
839
|
key: "",
|
|
@@ -875,7 +864,7 @@ var SettingsModal = ({
|
|
|
875
864
|
if (connection.apiKey) {
|
|
876
865
|
headers["Authorization"] = `Bearer ${connection.apiKey}`;
|
|
877
866
|
}
|
|
878
|
-
const response = await fetch(`${url}/
|
|
867
|
+
const response = await fetch(`${url}/health`, {
|
|
879
868
|
method: "GET",
|
|
880
869
|
signal: controller.signal,
|
|
881
870
|
headers
|
|
@@ -920,53 +909,6 @@ var SettingsModal = ({
|
|
|
920
909
|
)
|
|
921
910
|
);
|
|
922
911
|
};
|
|
923
|
-
const loadCurrentConfig = async (serverId) => {
|
|
924
|
-
const connection = connectionsRef.current.find((c) => c.id === serverId);
|
|
925
|
-
if (!connection || !connection.connected) return;
|
|
926
|
-
const url = connection.url;
|
|
927
|
-
if (!url) return;
|
|
928
|
-
try {
|
|
929
|
-
const headers = {};
|
|
930
|
-
if (connection.apiKey) {
|
|
931
|
-
headers["Authorization"] = `Bearer ${connection.apiKey}`;
|
|
932
|
-
}
|
|
933
|
-
const response = await fetch(`${url}/api/config`, {
|
|
934
|
-
headers
|
|
935
|
-
});
|
|
936
|
-
if (response.ok) {
|
|
937
|
-
const data = await response.json();
|
|
938
|
-
if (data.success && data.data) {
|
|
939
|
-
const lines = [];
|
|
940
|
-
const configData = data.data;
|
|
941
|
-
if (configData.port !== void 0) {
|
|
942
|
-
lines.push(`PORT=${configData.port}`);
|
|
943
|
-
}
|
|
944
|
-
if (configData.queueServiceType) {
|
|
945
|
-
lines.push(`QUEUE_SERVICE_TYPE=${configData.queueServiceType}`);
|
|
946
|
-
}
|
|
947
|
-
if (configData.redisUrl) {
|
|
948
|
-
lines.push(`REDIS_URL=${configData.redisUrl}`);
|
|
949
|
-
}
|
|
950
|
-
if (configData.redisPassword) {
|
|
951
|
-
lines.push(`REDIS_PASSWORD=`);
|
|
952
|
-
}
|
|
953
|
-
if (configData.queueName) {
|
|
954
|
-
lines.push(`QUEUE_NAME=${configData.queueName}`);
|
|
955
|
-
}
|
|
956
|
-
setServerConfigs((prev) => ({
|
|
957
|
-
...prev,
|
|
958
|
-
[serverId]: {
|
|
959
|
-
...prev[serverId],
|
|
960
|
-
envText: lines.join("\n")
|
|
961
|
-
}
|
|
962
|
-
}));
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
} catch (error) {
|
|
966
|
-
console.error("Failed to load configuration:", error);
|
|
967
|
-
message.error(t("chatConfig.settings.loadConfigFailed"));
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
912
|
const loadModelsConfig = async (serverId) => {
|
|
971
913
|
const connection = connectionsRef.current.find((c) => c.id === serverId);
|
|
972
914
|
if (!connection || !connection.connected) return;
|
|
@@ -1038,11 +980,7 @@ var SettingsModal = ({
|
|
|
1038
980
|
if (open && activeTabKey) {
|
|
1039
981
|
const connection = connections.find((c) => c.id === activeTabKey);
|
|
1040
982
|
if (connection?.connected) {
|
|
1041
|
-
|
|
1042
|
-
loadCurrentConfig(activeTabKey);
|
|
1043
|
-
} else if (activeMenu === "models") {
|
|
1044
|
-
loadModelsConfig(activeTabKey);
|
|
1045
|
-
}
|
|
983
|
+
loadModelsConfig(activeTabKey);
|
|
1046
984
|
}
|
|
1047
985
|
}
|
|
1048
986
|
}, [open, activeTabKey, activeMenu]);
|
|
@@ -1116,81 +1054,7 @@ var SettingsModal = ({
|
|
|
1116
1054
|
try {
|
|
1117
1055
|
setLoading(true);
|
|
1118
1056
|
const config = serverConfigs[activeTabKey];
|
|
1119
|
-
if (activeMenu === "
|
|
1120
|
-
const configObj = {};
|
|
1121
|
-
const lines = config.envText.split("\n");
|
|
1122
|
-
for (const line of lines) {
|
|
1123
|
-
const trimmedLine = line.trim();
|
|
1124
|
-
if (!trimmedLine || trimmedLine.startsWith("#")) {
|
|
1125
|
-
continue;
|
|
1126
|
-
}
|
|
1127
|
-
const equalIndex = trimmedLine.indexOf("=");
|
|
1128
|
-
if (equalIndex === -1) {
|
|
1129
|
-
continue;
|
|
1130
|
-
}
|
|
1131
|
-
const key = trimmedLine.substring(0, equalIndex).trim();
|
|
1132
|
-
const value = trimmedLine.substring(equalIndex + 1).trim();
|
|
1133
|
-
if (!key) {
|
|
1134
|
-
continue;
|
|
1135
|
-
}
|
|
1136
|
-
const upperKey = key.toUpperCase();
|
|
1137
|
-
if (upperKey === "PORT") {
|
|
1138
|
-
if (value) {
|
|
1139
|
-
configObj.port = Number(value);
|
|
1140
|
-
}
|
|
1141
|
-
} else if (upperKey === "QUEUE_SERVICE_TYPE") {
|
|
1142
|
-
if (value) {
|
|
1143
|
-
configObj.queueServiceType = value;
|
|
1144
|
-
}
|
|
1145
|
-
} else if (upperKey === "REDIS_URL") {
|
|
1146
|
-
if (value) {
|
|
1147
|
-
configObj.redisUrl = value;
|
|
1148
|
-
}
|
|
1149
|
-
} else if (upperKey === "REDIS_PASSWORD") {
|
|
1150
|
-
if (value) {
|
|
1151
|
-
configObj.redisPassword = value;
|
|
1152
|
-
}
|
|
1153
|
-
} else if (upperKey === "QUEUE_NAME") {
|
|
1154
|
-
if (value) {
|
|
1155
|
-
configObj.queueName = value;
|
|
1156
|
-
}
|
|
1157
|
-
} else {
|
|
1158
|
-
if (value) {
|
|
1159
|
-
configObj[key] = value;
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
const headers = {
|
|
1164
|
-
"Content-Type": "application/json"
|
|
1165
|
-
};
|
|
1166
|
-
if (connection.apiKey) {
|
|
1167
|
-
headers["Authorization"] = `Bearer ${connection.apiKey}`;
|
|
1168
|
-
}
|
|
1169
|
-
const response = await fetch(`${url}/api/config`, {
|
|
1170
|
-
method: "PUT",
|
|
1171
|
-
headers,
|
|
1172
|
-
body: JSON.stringify({ config: configObj })
|
|
1173
|
-
});
|
|
1174
|
-
const data = await response.json();
|
|
1175
|
-
if (response.ok && data.success) {
|
|
1176
|
-
if (data.requiresRestart && data.requiresRestart.length > 0) {
|
|
1177
|
-
message.warning(
|
|
1178
|
-
t("chatConfig.settings.restartWarning", { services: data.requiresRestart.join(", ") }),
|
|
1179
|
-
5
|
|
1180
|
-
);
|
|
1181
|
-
} else {
|
|
1182
|
-
message.success(t("chatConfig.settings.savedApplied"));
|
|
1183
|
-
}
|
|
1184
|
-
if (data.warnings && data.warnings.length > 0) {
|
|
1185
|
-
data.warnings.forEach((warning) => {
|
|
1186
|
-
message.warning(warning, 5);
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
onClose();
|
|
1190
|
-
} else {
|
|
1191
|
-
message.error(data.error || t("chatConfig.settings.saveFailed"));
|
|
1192
|
-
}
|
|
1193
|
-
} else if (activeMenu === "models") {
|
|
1057
|
+
if (activeMenu === "models") {
|
|
1194
1058
|
const validModels = config.models.filter((m) => m.key && m.model && m.provider).map((m) => {
|
|
1195
1059
|
if (m.apiKey) return m;
|
|
1196
1060
|
const { apiKey: _omitted, ...rest } = m;
|
|
@@ -1222,71 +1086,8 @@ var SettingsModal = ({
|
|
|
1222
1086
|
setLoading(false);
|
|
1223
1087
|
}
|
|
1224
1088
|
};
|
|
1225
|
-
const renderEnvironmentSettings = (serverId) => {
|
|
1226
|
-
const config = serverConfigs[serverId] || { envText: "", models: [] };
|
|
1227
|
-
const setEnvText = (text) => {
|
|
1228
|
-
setServerConfigs((prev) => ({
|
|
1229
|
-
...prev,
|
|
1230
|
-
[serverId]: {
|
|
1231
|
-
...prev[serverId],
|
|
1232
|
-
envText: text
|
|
1233
|
-
}
|
|
1234
|
-
}));
|
|
1235
|
-
};
|
|
1236
|
-
return /* @__PURE__ */ jsxs2("div", { className: styles.formContainer, children: [
|
|
1237
|
-
/* @__PURE__ */ jsx5(
|
|
1238
|
-
Alert,
|
|
1239
|
-
{
|
|
1240
|
-
message: t("chatConfig.settings.alert.title"),
|
|
1241
|
-
description: /* @__PURE__ */ jsxs2("div", { children: [
|
|
1242
|
-
/* @__PURE__ */ jsxs2("div", { style: { marginBottom: 8 }, children: [
|
|
1243
|
-
/* @__PURE__ */ jsx5(
|
|
1244
|
-
CheckCircleOutlined,
|
|
1245
|
-
{
|
|
1246
|
-
style: { color: "#52c41a", marginRight: 8 }
|
|
1247
|
-
}
|
|
1248
|
-
),
|
|
1249
|
-
/* @__PURE__ */ jsx5("strong", { children: t("chatConfig.settings.alert.immediate") }),
|
|
1250
|
-
" QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
|
|
1251
|
-
] }),
|
|
1252
|
-
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1253
|
-
/* @__PURE__ */ jsx5(ReloadOutlined, { style: { color: "#faad14", marginRight: 8 } }),
|
|
1254
|
-
/* @__PURE__ */ jsx5("strong", { children: t("chatConfig.settings.alert.restart") }),
|
|
1255
|
-
" ",
|
|
1256
|
-
t("chatConfig.settings.alert.restartDetail")
|
|
1257
|
-
] })
|
|
1258
|
-
] }),
|
|
1259
|
-
type: "info",
|
|
1260
|
-
showIcon: true,
|
|
1261
|
-
className: styles.alertCard
|
|
1262
|
-
}
|
|
1263
|
-
),
|
|
1264
|
-
/* @__PURE__ */ jsx5("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ jsx5(Text, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: t("chatConfig.settings.envHint") }) }),
|
|
1265
|
-
/* @__PURE__ */ jsx5(
|
|
1266
|
-
TextArea,
|
|
1267
|
-
{
|
|
1268
|
-
value: config.envText,
|
|
1269
|
-
onChange: (e) => setEnvText(e.target.value),
|
|
1270
|
-
placeholder: `PORT=4001
|
|
1271
|
-
QUEUE_SERVICE_TYPE=redis
|
|
1272
|
-
REDIS_URL=redis://localhost:6379
|
|
1273
|
-
REDIS_PASSWORD=
|
|
1274
|
-
QUEUE_NAME=tasks`,
|
|
1275
|
-
rows: 18,
|
|
1276
|
-
className: styles.textArea,
|
|
1277
|
-
style: {
|
|
1278
|
-
fontFamily: "SF Mono, Monaco, Inconsolata, Roboto Mono, monospace",
|
|
1279
|
-
fontSize: 13,
|
|
1280
|
-
padding: "16px",
|
|
1281
|
-
lineHeight: 1.6
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
)
|
|
1285
|
-
] });
|
|
1286
|
-
};
|
|
1287
1089
|
const renderModelSettings = (serverId) => {
|
|
1288
1090
|
const config = serverConfigs[serverId] || {
|
|
1289
|
-
envText: "",
|
|
1290
1091
|
models: [
|
|
1291
1092
|
{
|
|
1292
1093
|
key: "",
|
|
@@ -1520,8 +1321,6 @@ QUEUE_NAME=tasks`,
|
|
|
1520
1321
|
};
|
|
1521
1322
|
const renderContent = (serverId) => {
|
|
1522
1323
|
switch (activeMenu) {
|
|
1523
|
-
case "environment":
|
|
1524
|
-
return renderEnvironmentSettings(serverId);
|
|
1525
1324
|
case "models":
|
|
1526
1325
|
return renderModelSettings(serverId);
|
|
1527
1326
|
default:
|
|
@@ -1578,10 +1377,7 @@ QUEUE_NAME=tasks`,
|
|
|
1578
1377
|
/* @__PURE__ */ jsxs2("div", { className: styles.contentHeader, children: [
|
|
1579
1378
|
/* @__PURE__ */ jsxs2("div", { className: styles.contentHeaderLeft, children: [
|
|
1580
1379
|
/* @__PURE__ */ jsx5(Title, { level: 3, className: styles.contentTitle, children: activeMenuItem ? t(activeMenuItem.labelKey) : void 0 }),
|
|
1581
|
-
/* @__PURE__ */
|
|
1582
|
-
activeMenu === "environment" && t("chatConfig.settings.menu.environment.desc"),
|
|
1583
|
-
activeMenu === "models" && t("chatConfig.settings.menu.models.desc")
|
|
1584
|
-
] })
|
|
1380
|
+
/* @__PURE__ */ jsx5(Text, { className: styles.contentDescription, children: activeMenu === "models" && t("chatConfig.settings.menu.models.desc") })
|
|
1585
1381
|
] }),
|
|
1586
1382
|
/* @__PURE__ */ jsxs2("div", { className: styles.contentHeaderRight, children: [
|
|
1587
1383
|
/* @__PURE__ */ jsx5(Button, { onClick: onClose, children: t("common.cancel") }),
|
|
@@ -3495,14 +3291,88 @@ var AssistantFlowInner = ({ onChat }) => {
|
|
|
3495
3291
|
var AssistantFlow = (props) => /* @__PURE__ */ jsx10(ReactFlowProvider, { children: /* @__PURE__ */ jsx10(AssistantFlowInner, { ...props }) });
|
|
3496
3292
|
var AssistantFlow_default = AssistantFlow;
|
|
3497
3293
|
|
|
3294
|
+
// src/components/Governance/AgentCardStats.tsx
|
|
3295
|
+
import { Tooltip as Tooltip2 } from "antd";
|
|
3296
|
+
import { createStyles as createStyles3 } from "antd-style";
|
|
3297
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3298
|
+
var fmtActive = (iso, t) => {
|
|
3299
|
+
if (!iso) return "\u2014";
|
|
3300
|
+
const diff = Date.now() - new Date(iso).getTime();
|
|
3301
|
+
const minutes = Math.floor(diff / 6e4);
|
|
3302
|
+
if (minutes < 1) return t ? t("common.time.justNow") : "just now";
|
|
3303
|
+
if (minutes < 60) return t ? t("common.time.minutesAgo", { count: minutes }) : `${minutes}m ago`;
|
|
3304
|
+
const hours = Math.floor(minutes / 60);
|
|
3305
|
+
if (hours < 24) return t ? t("common.time.hoursAgo", { count: hours }) : `${hours}h ago`;
|
|
3306
|
+
const days = Math.floor(hours / 24);
|
|
3307
|
+
return t ? t("common.time.daysAgo", { count: days }) : `${days}d ago`;
|
|
3308
|
+
};
|
|
3309
|
+
var scoreColor = (score) => {
|
|
3310
|
+
if (score === null) return "#d9d9d9";
|
|
3311
|
+
return score >= 80 ? "#22c55e" : score >= 50 ? "#f59e0b" : "#ef4444";
|
|
3312
|
+
};
|
|
3313
|
+
var useStyles3 = createStyles3(({ css }) => ({
|
|
3314
|
+
row: css`
|
|
3315
|
+
display: flex;
|
|
3316
|
+
justify-content: space-between;
|
|
3317
|
+
align-items: flex-end;
|
|
3318
|
+
`
|
|
3319
|
+
}));
|
|
3320
|
+
var valueStyle = {
|
|
3321
|
+
fontSize: 16,
|
|
3322
|
+
fontWeight: 700,
|
|
3323
|
+
lineHeight: 1.2,
|
|
3324
|
+
cursor: "help"
|
|
3325
|
+
};
|
|
3326
|
+
var labelStyle = {
|
|
3327
|
+
fontSize: 10,
|
|
3328
|
+
color: "rgba(0, 0, 0, 0.45)",
|
|
3329
|
+
whiteSpace: "nowrap",
|
|
3330
|
+
marginTop: 1
|
|
3331
|
+
};
|
|
3332
|
+
var metricColumn = {
|
|
3333
|
+
display: "flex",
|
|
3334
|
+
flexDirection: "column",
|
|
3335
|
+
alignItems: "center"
|
|
3336
|
+
};
|
|
3337
|
+
var AgentCardStats = ({ stats }) => {
|
|
3338
|
+
const { styles } = useStyles3();
|
|
3339
|
+
const t = useT();
|
|
3340
|
+
if (!stats) {
|
|
3341
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", fontSize: 11, color: "#d9d9d9" }, children: [
|
|
3342
|
+
/* @__PURE__ */ jsx11("span", { style: { flex: 1 }, children: t("governance.cardStats.scoreEmpty") }),
|
|
3343
|
+
/* @__PURE__ */ jsx11("span", { style: { flex: 1 }, children: t("governance.cardStats.threadsEmpty") })
|
|
3344
|
+
] });
|
|
3345
|
+
}
|
|
3346
|
+
const score = stats.evalScore !== null ? Number(stats.evalScore).toFixed(1) : "\u2014";
|
|
3347
|
+
const threads = stats.threadCount > 0 ? stats.threadCount : "\u2014";
|
|
3348
|
+
const scoreTextColor = scoreColor(stats.evalScore);
|
|
3349
|
+
const passRate = stats.evalPassRate !== null ? `${stats.evalPassRate}%` : "\u2014";
|
|
3350
|
+
return /* @__PURE__ */ jsxs7("div", { className: styles.row, children: [
|
|
3351
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 16, alignItems: "flex-end" }, children: [
|
|
3352
|
+
/* @__PURE__ */ jsx11(Tooltip2, { title: t("governance.cardStats.evalTooltip", { score, passRate, runs: stats.evalRuns }), children: /* @__PURE__ */ jsxs7("div", { style: metricColumn, children: [
|
|
3353
|
+
/* @__PURE__ */ jsx11("span", { style: { ...valueStyle, color: scoreTextColor }, children: score }),
|
|
3354
|
+
/* @__PURE__ */ jsx11("span", { className: "lattice-stat-label", style: labelStyle, children: t("governance.cardStats.evalScore") })
|
|
3355
|
+
] }) }),
|
|
3356
|
+
/* @__PURE__ */ jsx11(Tooltip2, { title: stats.lastActive ? t("governance.cardStats.conversationsTooltipActive", { total: stats.threadCount, last7d: stats.last7d, last30d: stats.last30d, lastActive: fmtActive(stats.lastActive, t) }) : t("governance.cardStats.conversationsTooltip", { total: stats.threadCount, last7d: stats.last7d, last30d: stats.last30d }), children: /* @__PURE__ */ jsxs7("div", { style: metricColumn, children: [
|
|
3357
|
+
/* @__PURE__ */ jsx11("span", { style: { ...valueStyle, color: threads === "\u2014" ? "#d9d9d9" : "#595959" }, children: threads }),
|
|
3358
|
+
/* @__PURE__ */ jsx11("span", { className: "lattice-stat-label", style: labelStyle, children: t("governance.cardStats.threads") })
|
|
3359
|
+
] }) })
|
|
3360
|
+
] }),
|
|
3361
|
+
stats.daily7d.length > 0 && /* @__PURE__ */ jsxs7("div", { style: metricColumn, children: [
|
|
3362
|
+
/* @__PURE__ */ jsx11(MiniBarChart, { values: stats.daily7d, width: 40, height: 24, color: "#8c8c8c" }),
|
|
3363
|
+
/* @__PURE__ */ jsx11("span", { className: "lattice-stat-label", style: labelStyle, children: t("governance.cardStats.threads7d") })
|
|
3364
|
+
] })
|
|
3365
|
+
] });
|
|
3366
|
+
};
|
|
3367
|
+
|
|
3498
3368
|
// src/components/Chat/LatticeAgentWorkspace.tsx
|
|
3499
|
-
import { jsx as
|
|
3369
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
3500
3370
|
var LatticeAgentWorkspace = ({
|
|
3501
3371
|
workspaceId,
|
|
3502
3372
|
projectId = "default",
|
|
3503
3373
|
assistant_id,
|
|
3504
3374
|
...chatProps
|
|
3505
|
-
}) => /* @__PURE__ */
|
|
3375
|
+
}) => /* @__PURE__ */ jsx12(WorkspaceContextProvider, { workspaceId, projectId, children: /* @__PURE__ */ jsx12(AssistantContextProvider, { autoLoad: true, initialAssistantId: assistant_id, children: /* @__PURE__ */ jsx12(LatticeChat, { showProjectSelector: false, assistant_id, ...chatProps }) }) });
|
|
3506
3376
|
export {
|
|
3507
3377
|
A2AKeyList,
|
|
3508
3378
|
AgentCardStats,
|