@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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentDetailView,
|
|
3
|
-
MiniBarChart,
|
|
4
3
|
ReferenceFilesUpload,
|
|
5
4
|
buildAgentGraphData,
|
|
6
5
|
buildAgentListItems,
|
|
@@ -11,17 +10,17 @@ import {
|
|
|
11
10
|
shortHash,
|
|
12
11
|
startLearningRound,
|
|
13
12
|
statusHex
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6BWBE7MR.mjs";
|
|
15
14
|
import {
|
|
16
15
|
TrainingContextCard
|
|
17
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3ZEMSWAC.mjs";
|
|
18
17
|
import {
|
|
19
18
|
EntityListView,
|
|
20
19
|
FilterSelect,
|
|
21
20
|
ProjectScopeProvider_default,
|
|
22
21
|
useSideAppOpener,
|
|
23
22
|
useWorkspaceContext
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7JDWJZ5M.mjs";
|
|
25
24
|
import {
|
|
26
25
|
Background,
|
|
27
26
|
Controls,
|
|
@@ -46,7 +45,7 @@ import { message as message2, Modal as Modal3 } from "antd";
|
|
|
46
45
|
|
|
47
46
|
// src/components/Governance/AgentList.tsx
|
|
48
47
|
import { useMemo as useMemo2, useState as useState2 } from "react";
|
|
49
|
-
import { Tag, Tooltip
|
|
48
|
+
import { Tag, Tooltip } from "antd";
|
|
50
49
|
import { Bot, Pencil, PlayCircle, FlaskConical, Network, Trash2 } from "lucide-react";
|
|
51
50
|
|
|
52
51
|
// src/components/Governance/AgentGraphView.tsx
|
|
@@ -196,82 +195,8 @@ var AgentGraphViewInner = ({ assistants, onNodeClick }) => {
|
|
|
196
195
|
};
|
|
197
196
|
var AgentGraphView = (props) => /* @__PURE__ */ jsx2(ReactFlowProvider, { children: /* @__PURE__ */ jsx2(AgentGraphViewInner, { ...props }) });
|
|
198
197
|
|
|
199
|
-
// src/components/Governance/AgentCardStats.tsx
|
|
200
|
-
import { Tooltip } from "antd";
|
|
201
|
-
import { createStyles } from "antd-style";
|
|
202
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
203
|
-
var fmtActive = (iso, t) => {
|
|
204
|
-
if (!iso) return "\u2014";
|
|
205
|
-
const diff = Date.now() - new Date(iso).getTime();
|
|
206
|
-
const minutes = Math.floor(diff / 6e4);
|
|
207
|
-
if (minutes < 1) return t ? t("common.time.justNow") : "just now";
|
|
208
|
-
if (minutes < 60) return t ? t("common.time.minutesAgo", { count: minutes }) : `${minutes}m ago`;
|
|
209
|
-
const hours = Math.floor(minutes / 60);
|
|
210
|
-
if (hours < 24) return t ? t("common.time.hoursAgo", { count: hours }) : `${hours}h ago`;
|
|
211
|
-
const days = Math.floor(hours / 24);
|
|
212
|
-
return t ? t("common.time.daysAgo", { count: days }) : `${days}d ago`;
|
|
213
|
-
};
|
|
214
|
-
var scoreColor = (score) => {
|
|
215
|
-
if (score === null) return "#d9d9d9";
|
|
216
|
-
return score >= 80 ? "#22c55e" : score >= 50 ? "#f59e0b" : "#ef4444";
|
|
217
|
-
};
|
|
218
|
-
var useStyles = createStyles(({ css }) => ({
|
|
219
|
-
row: css`
|
|
220
|
-
display: flex;
|
|
221
|
-
justify-content: space-between;
|
|
222
|
-
align-items: flex-end;
|
|
223
|
-
`
|
|
224
|
-
}));
|
|
225
|
-
var valueStyle = {
|
|
226
|
-
fontSize: 16,
|
|
227
|
-
fontWeight: 700,
|
|
228
|
-
lineHeight: 1.2,
|
|
229
|
-
cursor: "help"
|
|
230
|
-
};
|
|
231
|
-
var labelStyle = {
|
|
232
|
-
fontSize: 10,
|
|
233
|
-
color: "rgba(0, 0, 0, 0.45)",
|
|
234
|
-
whiteSpace: "nowrap",
|
|
235
|
-
marginTop: 1
|
|
236
|
-
};
|
|
237
|
-
var metricColumn = {
|
|
238
|
-
display: "flex",
|
|
239
|
-
flexDirection: "column",
|
|
240
|
-
alignItems: "center"
|
|
241
|
-
};
|
|
242
|
-
var AgentCardStats = ({ stats }) => {
|
|
243
|
-
const { styles } = useStyles();
|
|
244
|
-
const t = useT();
|
|
245
|
-
if (!stats) {
|
|
246
|
-
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", fontSize: 11, color: "#d9d9d9" }, children: [
|
|
247
|
-
/* @__PURE__ */ jsx3("span", { style: { flex: 1 }, children: t("governance.cardStats.scoreEmpty") }),
|
|
248
|
-
/* @__PURE__ */ jsx3("span", { style: { flex: 1 }, children: t("governance.cardStats.threadsEmpty") })
|
|
249
|
-
] });
|
|
250
|
-
}
|
|
251
|
-
const score = stats.evalScore !== null ? Number(stats.evalScore).toFixed(1) : "\u2014";
|
|
252
|
-
const threads = stats.threadCount > 0 ? stats.threadCount : "\u2014";
|
|
253
|
-
const scoreTextColor = scoreColor(stats.evalScore);
|
|
254
|
-
const passRate = stats.evalPassRate !== null ? `${stats.evalPassRate}%` : "\u2014";
|
|
255
|
-
return /* @__PURE__ */ jsxs3("div", { className: styles.row, children: [
|
|
256
|
-
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: 16, alignItems: "flex-end" }, children: [
|
|
257
|
-
/* @__PURE__ */ jsx3(Tooltip, { title: t("governance.cardStats.evalTooltip", { score, passRate, runs: stats.evalRuns }), children: /* @__PURE__ */ jsxs3("div", { style: metricColumn, children: [
|
|
258
|
-
/* @__PURE__ */ jsx3("span", { style: { ...valueStyle, color: scoreTextColor }, children: score }),
|
|
259
|
-
/* @__PURE__ */ jsx3("span", { className: "lattice-stat-label", style: labelStyle, children: t("governance.cardStats.evalScore") })
|
|
260
|
-
] }) }),
|
|
261
|
-
/* @__PURE__ */ jsx3(Tooltip, { 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__ */ jsxs3("div", { style: metricColumn, children: [
|
|
262
|
-
/* @__PURE__ */ jsx3("span", { style: { ...valueStyle, color: threads === "\u2014" ? "#d9d9d9" : "#595959" }, children: threads }),
|
|
263
|
-
/* @__PURE__ */ jsx3("span", { className: "lattice-stat-label", style: labelStyle, children: t("governance.cardStats.threads") })
|
|
264
|
-
] }) })
|
|
265
|
-
] }),
|
|
266
|
-
stats.daily7d.length > 0 && /* @__PURE__ */ jsxs3("div", { style: metricColumn, children: [
|
|
267
|
-
/* @__PURE__ */ jsx3(MiniBarChart, { values: stats.daily7d, width: 40, height: 24, color: "#8c8c8c" }),
|
|
268
|
-
/* @__PURE__ */ jsx3("span", { className: "lattice-stat-label", style: labelStyle, children: t("governance.cardStats.threads7d") })
|
|
269
|
-
] })
|
|
270
|
-
] });
|
|
271
|
-
};
|
|
272
|
-
|
|
273
198
|
// src/components/Governance/AgentList.tsx
|
|
274
|
-
import { Fragment, jsx as
|
|
199
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
275
200
|
var TYPE_TABS = [
|
|
276
201
|
{ key: "all", labelKey: "governance.list.tab.all" },
|
|
277
202
|
{ key: "capability", labelKey: "governance.list.tab.capability" },
|
|
@@ -282,7 +207,6 @@ var TYPE_TABS = [
|
|
|
282
207
|
var AgentList = ({
|
|
283
208
|
items,
|
|
284
209
|
assistants = [],
|
|
285
|
-
stats,
|
|
286
210
|
loading,
|
|
287
211
|
onItemClick,
|
|
288
212
|
onOpenPlayground,
|
|
@@ -342,13 +266,13 @@ var AgentList = ({
|
|
|
342
266
|
mode: "graph",
|
|
343
267
|
icon: Network,
|
|
344
268
|
label: t("governance.list.viewMode.graph"),
|
|
345
|
-
render: () => /* @__PURE__ */
|
|
269
|
+
render: () => /* @__PURE__ */ jsx3(AgentGraphView, { assistants, onNodeClick: onItemClick })
|
|
346
270
|
}
|
|
347
271
|
],
|
|
348
272
|
[assistants, onItemClick, t]
|
|
349
273
|
);
|
|
350
|
-
return /* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
275
|
+
/* @__PURE__ */ jsx3(
|
|
352
276
|
"span",
|
|
353
277
|
{
|
|
354
278
|
"data-testid": "agent-list-state",
|
|
@@ -358,7 +282,7 @@ var AgentList = ({
|
|
|
358
282
|
"aria-hidden": "true"
|
|
359
283
|
}
|
|
360
284
|
),
|
|
361
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ jsx3(
|
|
362
286
|
EntityListView,
|
|
363
287
|
{
|
|
364
288
|
title: t("governance.list.title"),
|
|
@@ -369,9 +293,9 @@ var AgentList = ({
|
|
|
369
293
|
tabs: TYPE_TABS.map((tab) => ({ key: tab.key, label: t(tab.labelKey) })),
|
|
370
294
|
activeTab,
|
|
371
295
|
onTabChange: (key) => setActiveTab(key),
|
|
372
|
-
headerLeft: /* @__PURE__ */
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
/* @__PURE__ */
|
|
296
|
+
headerLeft: /* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
297
|
+
/* @__PURE__ */ jsx3(FilterSelect, { value: domainFilter, onChange: setDomainFilter, options: allDomains, placeholder: t("governance.list.filter.domain"), allLabel: t("governance.list.filter.allDomains") }),
|
|
298
|
+
/* @__PURE__ */ jsx3(
|
|
375
299
|
FilterSelect,
|
|
376
300
|
{
|
|
377
301
|
value: statusFilter,
|
|
@@ -388,7 +312,7 @@ var AgentList = ({
|
|
|
388
312
|
] }),
|
|
389
313
|
renderIcon: (item) => {
|
|
390
314
|
const typeColor = colorHex(getTypeBadgeInfo(item.type).color);
|
|
391
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ jsx3(
|
|
392
316
|
"div",
|
|
393
317
|
{
|
|
394
318
|
title: t("governance.list.typeIconTitle", { type: item.type }),
|
|
@@ -403,19 +327,19 @@ var AgentList = ({
|
|
|
403
327
|
justifyContent: "center",
|
|
404
328
|
flexShrink: 0
|
|
405
329
|
},
|
|
406
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ jsx3(Bot, { size: 18 })
|
|
407
331
|
}
|
|
408
332
|
);
|
|
409
333
|
},
|
|
410
|
-
renderPrimary: (item) => /* @__PURE__ */
|
|
334
|
+
renderPrimary: (item) => /* @__PURE__ */ jsx3("span", { "data-testid": "agent-name", "data-agent-id": item.id, children: item.name }),
|
|
411
335
|
renderSecondary: (item) => item.description || void 0,
|
|
412
|
-
renderDetails: (item) => /* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
item.tags.map((tag) => /* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
336
|
+
renderDetails: (item) => /* @__PURE__ */ jsxs3("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 8, flexWrap: "wrap" }, children: [
|
|
337
|
+
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: 4, flexWrap: "wrap", alignItems: "center" }, children: [
|
|
338
|
+
item.tags.map((tag) => /* @__PURE__ */ jsx3(Tag, { color: "magenta", style: { margin: 0, borderRadius: 10, border: "none" }, children: tag }, tag)),
|
|
339
|
+
/* @__PURE__ */ jsx3(Tag, { color: getTypeBadgeInfo(item.type).color, style: { margin: 0, borderRadius: 10, border: "none" }, children: item.type })
|
|
416
340
|
] }),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: 8, flexShrink: 0 }, children: [
|
|
342
|
+
/* @__PURE__ */ jsx3(Tooltip, { title: t("governance.list.statusTooltip", { status: item.status }), children: /* @__PURE__ */ jsx3(
|
|
419
343
|
"span",
|
|
420
344
|
{
|
|
421
345
|
style: {
|
|
@@ -428,10 +352,9 @@ var AgentList = ({
|
|
|
428
352
|
}
|
|
429
353
|
}
|
|
430
354
|
) }),
|
|
431
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ jsx3("span", { style: { fontSize: 12, color: "#8c8c8c" }, children: item.version })
|
|
432
356
|
] })
|
|
433
357
|
] }),
|
|
434
|
-
renderFooter: (item) => /* @__PURE__ */ jsx4("div", { style: { borderTop: "1px dashed #f0f0f0", paddingTop: 10 }, children: /* @__PURE__ */ jsx4(AgentCardStats, { stats: stats?.[item.id] }) }),
|
|
435
358
|
itemActions,
|
|
436
359
|
actionsStyle: "icon",
|
|
437
360
|
actionsPosition: "hover",
|
|
@@ -439,7 +362,7 @@ var AgentList = ({
|
|
|
439
362
|
createLabel: t("governance.list.create"),
|
|
440
363
|
onCreateClick: onCreate,
|
|
441
364
|
viewModeExtensions,
|
|
442
|
-
emptyIcon: /* @__PURE__ */
|
|
365
|
+
emptyIcon: /* @__PURE__ */ jsx3(Bot, { size: 48, style: { opacity: 0.5 } }),
|
|
443
366
|
emptyTitle: t("governance.list.emptyTitle"),
|
|
444
367
|
emptyDescription: t("governance.list.emptyDescription")
|
|
445
368
|
}
|
|
@@ -468,7 +391,7 @@ import { PlusOutlined, ForkOutlined as ForkOutlined2, ApiOutlined, ExperimentOut
|
|
|
468
391
|
// src/components/Chat/ParentAgentSelector.tsx
|
|
469
392
|
import { useCallback, useEffect as useEffect2, useState as useState3 } from "react";
|
|
470
393
|
import { Select, Typography } from "antd";
|
|
471
|
-
import { jsx as
|
|
394
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
472
395
|
var { Text } = Typography;
|
|
473
396
|
var ParentAgentSelector = ({
|
|
474
397
|
onSelect,
|
|
@@ -509,7 +432,7 @@ var ParentAgentSelector = ({
|
|
|
509
432
|
void fetchAssistants();
|
|
510
433
|
}
|
|
511
434
|
};
|
|
512
|
-
return /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ jsx4(
|
|
513
436
|
Select,
|
|
514
437
|
{
|
|
515
438
|
showSearch: true,
|
|
@@ -526,9 +449,9 @@ var ParentAgentSelector = ({
|
|
|
526
449
|
label: assistant.name || assistant.id,
|
|
527
450
|
description: assistant.description
|
|
528
451
|
})),
|
|
529
|
-
optionRender: (option) => /* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
option.data.description && /* @__PURE__ */
|
|
452
|
+
optionRender: (option) => /* @__PURE__ */ jsxs4("div", { children: [
|
|
453
|
+
/* @__PURE__ */ jsx4("div", { children: option.label }),
|
|
454
|
+
option.data.description && /* @__PURE__ */ jsx4(Text, { type: "secondary", style: { fontSize: 12 }, children: option.data.description })
|
|
532
455
|
] })
|
|
533
456
|
}
|
|
534
457
|
);
|
|
@@ -537,7 +460,7 @@ var ParentAgentSelector = ({
|
|
|
537
460
|
// src/components/Chat/SubAgentInheritList.tsx
|
|
538
461
|
import { List, Switch, Input, Typography as Typography2, Tag as Tag2, theme } from "antd";
|
|
539
462
|
import { ForkOutlined, LinkOutlined } from "@ant-design/icons";
|
|
540
|
-
import { jsx as
|
|
463
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
541
464
|
var { Text: Text2 } = Typography2;
|
|
542
465
|
var SubAgentInheritList = ({
|
|
543
466
|
subAgentKeys,
|
|
@@ -561,16 +484,16 @@ var SubAgentInheritList = ({
|
|
|
561
484
|
if (subAgentKeys.length === 0) {
|
|
562
485
|
return null;
|
|
563
486
|
}
|
|
564
|
-
return /* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
/* @__PURE__ */
|
|
487
|
+
return /* @__PURE__ */ jsxs5("div", { children: [
|
|
488
|
+
/* @__PURE__ */ jsx5(Text2, { type: "secondary", style: { display: "block", marginBottom: 8 }, children: t("chatConfig.subAgentInherit.hint") }),
|
|
489
|
+
/* @__PURE__ */ jsx5(
|
|
567
490
|
List,
|
|
568
491
|
{
|
|
569
492
|
size: "small",
|
|
570
493
|
bordered: true,
|
|
571
494
|
dataSource: decisions,
|
|
572
495
|
style: { borderRadius: token.borderRadius },
|
|
573
|
-
renderItem: (decision) => /* @__PURE__ */
|
|
496
|
+
renderItem: (decision) => /* @__PURE__ */ jsxs5(
|
|
574
497
|
List.Item,
|
|
575
498
|
{
|
|
576
499
|
style: {
|
|
@@ -581,14 +504,14 @@ var SubAgentInheritList = ({
|
|
|
581
504
|
padding: "8px 16px"
|
|
582
505
|
},
|
|
583
506
|
children: [
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
586
|
-
decision.clone ? /* @__PURE__ */
|
|
587
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
508
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
509
|
+
decision.clone ? /* @__PURE__ */ jsx5(ForkOutlined, { style: { color: token.colorPrimary } }) : /* @__PURE__ */ jsx5(LinkOutlined, { style: { color: token.colorTextSecondary } }),
|
|
510
|
+
/* @__PURE__ */ jsx5(Text2, { style: { fontFamily: "monospace" }, children: decision.originalKey })
|
|
588
511
|
] }),
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
513
|
+
/* @__PURE__ */ jsx5(Tag2, { color: decision.clone ? "blue" : "default", children: decision.clone ? t("chatConfig.subAgentInherit.clone") : t("chatConfig.subAgentInherit.reuse") }),
|
|
514
|
+
/* @__PURE__ */ jsx5(
|
|
592
515
|
Switch,
|
|
593
516
|
{
|
|
594
517
|
size: "small",
|
|
@@ -598,7 +521,7 @@ var SubAgentInheritList = ({
|
|
|
598
521
|
)
|
|
599
522
|
] })
|
|
600
523
|
] }),
|
|
601
|
-
decision.clone && /* @__PURE__ */
|
|
524
|
+
decision.clone && /* @__PURE__ */ jsx5(
|
|
602
525
|
Input,
|
|
603
526
|
{
|
|
604
527
|
size: "small",
|
|
@@ -627,7 +550,7 @@ function getLocalRuntimeCommandError(options, t) {
|
|
|
627
550
|
}
|
|
628
551
|
|
|
629
552
|
// src/components/Chat/CreateAssistantModal.tsx
|
|
630
|
-
import { Fragment as Fragment2, jsx as
|
|
553
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
631
554
|
var { TextArea } = Input2;
|
|
632
555
|
var { Text: Text3 } = Typography3;
|
|
633
556
|
var AGENT_CARD_PATH = "/.well-known/agent-card.json";
|
|
@@ -1101,7 +1024,7 @@ var CreateAssistantModal = ({
|
|
|
1101
1024
|
};
|
|
1102
1025
|
const parentSubAgents = parentAssistant?.graphDefinition?.subAgents || [];
|
|
1103
1026
|
const showSubAgentList = creationMode === "extend" && parentAssistant && parentSubAgents.length > 0;
|
|
1104
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ jsxs6(
|
|
1105
1028
|
Modal,
|
|
1106
1029
|
{
|
|
1107
1030
|
title: t("chatConfig.createAssistant.title"),
|
|
@@ -1111,7 +1034,7 @@ var CreateAssistantModal = ({
|
|
|
1111
1034
|
onCancel();
|
|
1112
1035
|
},
|
|
1113
1036
|
footer: [
|
|
1114
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ jsx6(
|
|
1115
1038
|
Button,
|
|
1116
1039
|
{
|
|
1117
1040
|
onClick: () => {
|
|
@@ -1122,11 +1045,11 @@ var CreateAssistantModal = ({
|
|
|
1122
1045
|
},
|
|
1123
1046
|
"cancel"
|
|
1124
1047
|
),
|
|
1125
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ jsx6(
|
|
1126
1049
|
Button,
|
|
1127
1050
|
{
|
|
1128
1051
|
type: "primary",
|
|
1129
|
-
icon: creationMode === "extend" ? /* @__PURE__ */
|
|
1052
|
+
icon: creationMode === "extend" ? /* @__PURE__ */ jsx6(ForkOutlined2, {}) : creationMode === "learn" ? /* @__PURE__ */ jsx6(ExperimentOutlined, {}) : /* @__PURE__ */ jsx6(PlusOutlined, {}),
|
|
1130
1053
|
loading,
|
|
1131
1054
|
disabled: creationMode === "learn" && (workspaceLoading || !trainingProject),
|
|
1132
1055
|
onClick: handleSubmit,
|
|
@@ -1137,8 +1060,8 @@ var CreateAssistantModal = ({
|
|
|
1137
1060
|
],
|
|
1138
1061
|
width: 760,
|
|
1139
1062
|
children: [
|
|
1140
|
-
creationMode === "extend" && /* @__PURE__ */
|
|
1141
|
-
/* @__PURE__ */
|
|
1063
|
+
creationMode === "extend" && /* @__PURE__ */ jsxs6("div", { style: { marginBottom: 20 }, children: [
|
|
1064
|
+
/* @__PURE__ */ jsx6(
|
|
1142
1065
|
Text3,
|
|
1143
1066
|
{
|
|
1144
1067
|
type: "secondary",
|
|
@@ -1146,14 +1069,14 @@ var CreateAssistantModal = ({
|
|
|
1146
1069
|
children: t("chatConfig.createAssistant.parentAgent")
|
|
1147
1070
|
}
|
|
1148
1071
|
),
|
|
1149
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ jsx6(
|
|
1150
1073
|
ParentAgentSelector,
|
|
1151
1074
|
{
|
|
1152
1075
|
value: parentAssistant?.id,
|
|
1153
1076
|
onSelect: handleParentSelect
|
|
1154
1077
|
}
|
|
1155
1078
|
),
|
|
1156
|
-
parentAssistant && /* @__PURE__ */
|
|
1079
|
+
parentAssistant && /* @__PURE__ */ jsx6(
|
|
1157
1080
|
Text3,
|
|
1158
1081
|
{
|
|
1159
1082
|
type: "secondary",
|
|
@@ -1162,10 +1085,10 @@ var CreateAssistantModal = ({
|
|
|
1162
1085
|
}
|
|
1163
1086
|
)
|
|
1164
1087
|
] }),
|
|
1165
|
-
creationMode === "extend" && parentAssistant && /* @__PURE__ */
|
|
1166
|
-
creationMode === "learn" && /* @__PURE__ */
|
|
1167
|
-
/* @__PURE__ */
|
|
1168
|
-
/* @__PURE__ */
|
|
1088
|
+
creationMode === "extend" && parentAssistant && /* @__PURE__ */ jsx6(Divider, { style: { margin: "12px 0" } }),
|
|
1089
|
+
creationMode === "learn" && /* @__PURE__ */ jsxs6("div", { children: [
|
|
1090
|
+
/* @__PURE__ */ jsx6(Text3, { style: { display: "block", marginBottom: 8 }, children: t("chatConfig.createAssistant.learnHint") }),
|
|
1091
|
+
/* @__PURE__ */ jsx6(
|
|
1169
1092
|
Input2.TextArea,
|
|
1170
1093
|
{
|
|
1171
1094
|
rows: 3,
|
|
@@ -1174,10 +1097,10 @@ var CreateAssistantModal = ({
|
|
|
1174
1097
|
placeholder: "e.g. Handle price disputes using the price protection policy"
|
|
1175
1098
|
}
|
|
1176
1099
|
),
|
|
1177
|
-
trainingProject && /* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
/* @__PURE__ */
|
|
1180
|
-
/* @__PURE__ */
|
|
1100
|
+
trainingProject && /* @__PURE__ */ jsxs6("div", { style: { marginTop: 12 }, children: [
|
|
1101
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, marginBottom: 8 }, children: [
|
|
1102
|
+
/* @__PURE__ */ jsx6(Text3, { type: "secondary", children: t("chatConfig.createAssistant.referenceFiles") }),
|
|
1103
|
+
/* @__PURE__ */ jsx6(
|
|
1181
1104
|
TrainingContextCard,
|
|
1182
1105
|
{
|
|
1183
1106
|
project: trainingProject,
|
|
@@ -1188,10 +1111,10 @@ var CreateAssistantModal = ({
|
|
|
1188
1111
|
}
|
|
1189
1112
|
)
|
|
1190
1113
|
] }),
|
|
1191
|
-
/* @__PURE__ */
|
|
1192
|
-
/* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ jsx6(ReferenceFilesUpload, { projectId: trainingProject.id, value: learnRefFiles, onChange: setLearnRefFiles }),
|
|
1115
|
+
/* @__PURE__ */ jsx6(Text3, { type: "secondary", style: { display: "block", marginTop: 6, fontSize: 12 }, children: t("chatConfig.createAssistant.referenceFilesHint") })
|
|
1193
1116
|
] }),
|
|
1194
|
-
!trainingProject && !workspaceLoading && /* @__PURE__ */
|
|
1117
|
+
!trainingProject && !workspaceLoading && /* @__PURE__ */ jsx6("div", { style: { marginTop: 12 }, children: /* @__PURE__ */ jsx6(
|
|
1195
1118
|
TrainingContextCard,
|
|
1196
1119
|
{
|
|
1197
1120
|
project: trainingProject,
|
|
@@ -1202,7 +1125,7 @@ var CreateAssistantModal = ({
|
|
|
1202
1125
|
}
|
|
1203
1126
|
) })
|
|
1204
1127
|
] }),
|
|
1205
|
-
creationMode !== "learn" && /* @__PURE__ */
|
|
1128
|
+
creationMode !== "learn" && /* @__PURE__ */ jsxs6(
|
|
1206
1129
|
Form,
|
|
1207
1130
|
{
|
|
1208
1131
|
form,
|
|
@@ -1210,7 +1133,7 @@ var CreateAssistantModal = ({
|
|
|
1210
1133
|
autoComplete: "off",
|
|
1211
1134
|
initialValues: { type: "react", agentCardProtocol: "https://", a2aMode: "remote" },
|
|
1212
1135
|
children: [
|
|
1213
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx6(
|
|
1214
1137
|
Form.Item,
|
|
1215
1138
|
{
|
|
1216
1139
|
name: "key",
|
|
@@ -1223,20 +1146,20 @@ var CreateAssistantModal = ({
|
|
|
1223
1146
|
}
|
|
1224
1147
|
],
|
|
1225
1148
|
style: { marginBottom: 16 },
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1149
|
+
children: /* @__PURE__ */ jsx6(Input2, { placeholder: "e.g., my_assistant" })
|
|
1227
1150
|
}
|
|
1228
1151
|
),
|
|
1229
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ jsx6(
|
|
1230
1153
|
Form.Item,
|
|
1231
1154
|
{
|
|
1232
1155
|
name: "name",
|
|
1233
1156
|
label: t("chatConfig.createAssistant.field.name"),
|
|
1234
1157
|
rules: [{ required: true, message: t("chatConfig.createAssistant.validation.nameRequired") }],
|
|
1235
1158
|
style: { marginBottom: 16 },
|
|
1236
|
-
children: /* @__PURE__ */
|
|
1159
|
+
children: /* @__PURE__ */ jsx6(Input2, { placeholder: "e.g., My Assistant" })
|
|
1237
1160
|
}
|
|
1238
1161
|
),
|
|
1239
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ jsx6(
|
|
1240
1163
|
Form.Item,
|
|
1241
1164
|
{
|
|
1242
1165
|
name: "description",
|
|
@@ -1245,7 +1168,7 @@ var CreateAssistantModal = ({
|
|
|
1245
1168
|
{ required: true, message: t("chatConfig.createAssistant.validation.descriptionRequired") }
|
|
1246
1169
|
],
|
|
1247
1170
|
style: { marginBottom: 16 },
|
|
1248
|
-
children: /* @__PURE__ */
|
|
1171
|
+
children: /* @__PURE__ */ jsx6(
|
|
1249
1172
|
TextArea,
|
|
1250
1173
|
{
|
|
1251
1174
|
placeholder: t("chatConfig.createAssistant.descriptionPlaceholder"),
|
|
@@ -1254,14 +1177,14 @@ var CreateAssistantModal = ({
|
|
|
1254
1177
|
)
|
|
1255
1178
|
}
|
|
1256
1179
|
),
|
|
1257
|
-
/* @__PURE__ */
|
|
1180
|
+
/* @__PURE__ */ jsx6(
|
|
1258
1181
|
Form.Item,
|
|
1259
1182
|
{
|
|
1260
1183
|
name: "type",
|
|
1261
1184
|
label: t("chatConfig.createAssistant.field.agentType"),
|
|
1262
1185
|
rules: [{ required: true }],
|
|
1263
1186
|
style: { marginBottom: 16 },
|
|
1264
|
-
children: /* @__PURE__ */
|
|
1187
|
+
children: /* @__PURE__ */ jsx6(
|
|
1265
1188
|
Segmented,
|
|
1266
1189
|
{
|
|
1267
1190
|
options: [
|
|
@@ -1276,7 +1199,7 @@ var CreateAssistantModal = ({
|
|
|
1276
1199
|
)
|
|
1277
1200
|
}
|
|
1278
1201
|
),
|
|
1279
|
-
/* @__PURE__ */
|
|
1202
|
+
/* @__PURE__ */ jsx6(
|
|
1280
1203
|
Text3,
|
|
1281
1204
|
{
|
|
1282
1205
|
type: "secondary",
|
|
@@ -1284,8 +1207,8 @@ var CreateAssistantModal = ({
|
|
|
1284
1207
|
children: t(AGENT_TYPE_DESCRIPTION_KEYS[selectedType] ?? "chatConfig.createAssistant.typeDesc.react")
|
|
1285
1208
|
}
|
|
1286
1209
|
),
|
|
1287
|
-
isA2ARemote && /* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1210
|
+
isA2ARemote && /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1211
|
+
/* @__PURE__ */ jsx6(Form.Item, { label: t("chatConfig.createAssistant.field.connectionMode"), style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs6(
|
|
1289
1212
|
Radio.Group,
|
|
1290
1213
|
{
|
|
1291
1214
|
value: a2aMode,
|
|
@@ -1301,14 +1224,14 @@ var CreateAssistantModal = ({
|
|
|
1301
1224
|
optionType: "button",
|
|
1302
1225
|
buttonStyle: "solid",
|
|
1303
1226
|
children: [
|
|
1304
|
-
/* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */
|
|
1227
|
+
/* @__PURE__ */ jsx6(Radio.Button, { value: "remote", children: t("chatConfig.createAssistant.mode.remoteUrl") }),
|
|
1228
|
+
/* @__PURE__ */ jsx6(Radio.Button, { value: "local", children: t("chatConfig.createAssistant.mode.localManaged") })
|
|
1306
1229
|
]
|
|
1307
1230
|
}
|
|
1308
1231
|
) }),
|
|
1309
|
-
/* @__PURE__ */
|
|
1310
|
-
a2aMode === "local" && /* @__PURE__ */
|
|
1311
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ jsx6(Form.Item, { name: "a2aMode", noStyle: true, hidden: true, children: /* @__PURE__ */ jsx6(Input2, {}) }),
|
|
1233
|
+
a2aMode === "local" && /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1234
|
+
/* @__PURE__ */ jsx6(Form.Item, { label: t("chatConfig.createAssistant.field.template"), style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx6(
|
|
1312
1235
|
Select2,
|
|
1313
1236
|
{
|
|
1314
1237
|
placeholder: t("chatConfig.createAssistant.templatePlaceholder"),
|
|
@@ -1323,10 +1246,10 @@ var CreateAssistantModal = ({
|
|
|
1323
1246
|
value: t2.key,
|
|
1324
1247
|
label: t2.name || t2.key
|
|
1325
1248
|
})),
|
|
1326
|
-
notFoundContent: templatesLoading ? void 0 : /* @__PURE__ */
|
|
1249
|
+
notFoundContent: templatesLoading ? void 0 : /* @__PURE__ */ jsx6(Text3, { type: "secondary", style: { padding: 8, display: "block" }, children: t("chatConfig.createAssistant.noTemplates") })
|
|
1327
1250
|
}
|
|
1328
1251
|
) }),
|
|
1329
|
-
!a2aTemplateKey && /* @__PURE__ */
|
|
1252
|
+
!a2aTemplateKey && /* @__PURE__ */ jsx6(Fragment2, { children: !showCustomCommand ? /* @__PURE__ */ jsx6(
|
|
1330
1253
|
Button,
|
|
1331
1254
|
{
|
|
1332
1255
|
type: "link",
|
|
@@ -1334,8 +1257,8 @@ var CreateAssistantModal = ({
|
|
|
1334
1257
|
style: { padding: 0, marginBottom: 16, display: "block" },
|
|
1335
1258
|
children: t("chatConfig.createAssistant.customCommand")
|
|
1336
1259
|
}
|
|
1337
|
-
) : /* @__PURE__ */
|
|
1338
|
-
/* @__PURE__ */
|
|
1260
|
+
) : /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1261
|
+
/* @__PURE__ */ jsx6(
|
|
1339
1262
|
Form.Item,
|
|
1340
1263
|
{
|
|
1341
1264
|
name: "commandExecutable",
|
|
@@ -1346,28 +1269,28 @@ var CreateAssistantModal = ({
|
|
|
1346
1269
|
message: t("chatConfig.createAssistant.validation.executableRequired")
|
|
1347
1270
|
}],
|
|
1348
1271
|
style: { marginBottom: 16 },
|
|
1349
|
-
children: /* @__PURE__ */
|
|
1272
|
+
children: /* @__PURE__ */ jsx6(Input2, { placeholder: "e.g. node, opencode, /usr/local/bin/my-server" })
|
|
1350
1273
|
}
|
|
1351
1274
|
),
|
|
1352
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ jsx6(
|
|
1353
1276
|
Form.Item,
|
|
1354
1277
|
{
|
|
1355
1278
|
name: "commandArgs",
|
|
1356
1279
|
label: t("chatConfig.createAssistant.field.arguments"),
|
|
1357
1280
|
style: { marginBottom: 16 },
|
|
1358
|
-
children: /* @__PURE__ */
|
|
1281
|
+
children: /* @__PURE__ */ jsx6(Input2, { placeholder: "e.g. --serve --port 4301" })
|
|
1359
1282
|
}
|
|
1360
1283
|
),
|
|
1361
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ jsx6(
|
|
1362
1285
|
Form.Item,
|
|
1363
1286
|
{
|
|
1364
1287
|
name: ["command", "cwd"],
|
|
1365
1288
|
label: t("chatConfig.createAssistant.field.workingDirectory"),
|
|
1366
1289
|
style: { marginBottom: 16 },
|
|
1367
|
-
children: /* @__PURE__ */
|
|
1290
|
+
children: /* @__PURE__ */ jsx6(Input2, { placeholder: "e.g. /Users/me/project" })
|
|
1368
1291
|
}
|
|
1369
1292
|
),
|
|
1370
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ jsx6(
|
|
1371
1294
|
Button,
|
|
1372
1295
|
{
|
|
1373
1296
|
type: "link",
|
|
@@ -1385,33 +1308,33 @@ var CreateAssistantModal = ({
|
|
|
1385
1308
|
)
|
|
1386
1309
|
] }) })
|
|
1387
1310
|
] }),
|
|
1388
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ jsx6(
|
|
1389
1312
|
Form.Item,
|
|
1390
1313
|
{
|
|
1391
1314
|
label: t("chatConfig.createAssistant.field.agentCardUrl"),
|
|
1392
1315
|
required: true,
|
|
1393
1316
|
style: { marginBottom: 16 },
|
|
1394
|
-
children: /* @__PURE__ */
|
|
1395
|
-
/* @__PURE__ */
|
|
1317
|
+
children: /* @__PURE__ */ jsxs6(Space.Compact, { style: { width: "100%" }, children: [
|
|
1318
|
+
/* @__PURE__ */ jsx6(Form.Item, { name: "agentCardProtocol", noStyle: true, children: /* @__PURE__ */ jsx6(
|
|
1396
1319
|
Select2,
|
|
1397
1320
|
{
|
|
1398
1321
|
style: { width: 100 },
|
|
1399
1322
|
options: AGENT_CARD_PROTOCOL_OPTIONS
|
|
1400
1323
|
}
|
|
1401
1324
|
) }),
|
|
1402
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ jsx6(
|
|
1403
1326
|
Form.Item,
|
|
1404
1327
|
{
|
|
1405
1328
|
name: "agentCardUrl",
|
|
1406
1329
|
noStyle: true,
|
|
1407
1330
|
rules: [{ required: true, message: t("chatConfig.createAssistant.validation.urlRequired") }],
|
|
1408
|
-
children: /* @__PURE__ */
|
|
1331
|
+
children: /* @__PURE__ */ jsx6(Input2, { placeholder: a2aMode === "local" ? "localhost:4301" : "host:port or full URL" })
|
|
1409
1332
|
}
|
|
1410
1333
|
),
|
|
1411
|
-
/* @__PURE__ */
|
|
1334
|
+
/* @__PURE__ */ jsx6(
|
|
1412
1335
|
Button,
|
|
1413
1336
|
{
|
|
1414
|
-
icon: /* @__PURE__ */
|
|
1337
|
+
icon: /* @__PURE__ */ jsx6(ApiOutlined, {}),
|
|
1415
1338
|
onClick: handleTestConnection,
|
|
1416
1339
|
loading: testingUrl,
|
|
1417
1340
|
children: t("chatConfig.connection.action.test")
|
|
@@ -1420,23 +1343,23 @@ var CreateAssistantModal = ({
|
|
|
1420
1343
|
] })
|
|
1421
1344
|
}
|
|
1422
1345
|
),
|
|
1423
|
-
a2aMode === "remote" && /* @__PURE__ */
|
|
1346
|
+
a2aMode === "remote" && /* @__PURE__ */ jsx6(
|
|
1424
1347
|
Form.Item,
|
|
1425
1348
|
{
|
|
1426
1349
|
name: "apiKey",
|
|
1427
1350
|
label: t("chatConfig.createAssistant.field.apiKeyOptional"),
|
|
1428
1351
|
style: { marginBottom: 16 },
|
|
1429
|
-
children: /* @__PURE__ */
|
|
1352
|
+
children: /* @__PURE__ */ jsx6(Input2.Password, { placeholder: t("chatConfig.createAssistant.apiKeyPlaceholder") })
|
|
1430
1353
|
}
|
|
1431
1354
|
),
|
|
1432
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ jsx6(
|
|
1433
1356
|
Form.Item,
|
|
1434
1357
|
{
|
|
1435
1358
|
name: "timeout",
|
|
1436
1359
|
label: t("chatConfig.createAssistant.field.timeout"),
|
|
1437
1360
|
style: { marginBottom: 16 },
|
|
1438
1361
|
initialValue: 3e5,
|
|
1439
|
-
children: /* @__PURE__ */
|
|
1362
|
+
children: /* @__PURE__ */ jsx6(
|
|
1440
1363
|
InputNumber,
|
|
1441
1364
|
{
|
|
1442
1365
|
min: 1e3,
|
|
@@ -1448,13 +1371,13 @@ var CreateAssistantModal = ({
|
|
|
1448
1371
|
}
|
|
1449
1372
|
)
|
|
1450
1373
|
] }),
|
|
1451
|
-
!isA2ARemote && /* @__PURE__ */
|
|
1374
|
+
!isA2ARemote && /* @__PURE__ */ jsx6(
|
|
1452
1375
|
Form.Item,
|
|
1453
1376
|
{
|
|
1454
1377
|
name: "prompt",
|
|
1455
1378
|
label: creationMode === "extend" && parentAssistant ? t("chatConfig.createAssistant.field.systemPromptInherit") : t("chatConfig.createAssistant.field.systemPrompt"),
|
|
1456
1379
|
rules: creationMode === "scratch" ? [{ required: true, message: t("chatConfig.createAssistant.validation.systemPromptRequired") }] : [],
|
|
1457
|
-
children: /* @__PURE__ */
|
|
1380
|
+
children: /* @__PURE__ */ jsx6(
|
|
1458
1381
|
TextArea,
|
|
1459
1382
|
{
|
|
1460
1383
|
placeholder: creationMode === "extend" && parentAssistant ? t("chatConfig.createAssistant.systemPromptInheritPlaceholder") : t("chatConfig.createAssistant.systemPromptPlaceholder"),
|
|
@@ -1471,10 +1394,10 @@ var CreateAssistantModal = ({
|
|
|
1471
1394
|
]
|
|
1472
1395
|
}
|
|
1473
1396
|
),
|
|
1474
|
-
showSubAgentList && /* @__PURE__ */
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1397
|
+
showSubAgentList && /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1398
|
+
/* @__PURE__ */ jsx6(Divider, { style: { margin: "12px 0" } }),
|
|
1399
|
+
/* @__PURE__ */ jsx6(Text3, { strong: true, style: { display: "block", marginBottom: 8 }, children: t("chatConfig.createAssistant.subAgents") }),
|
|
1400
|
+
/* @__PURE__ */ jsx6(
|
|
1478
1401
|
SubAgentInheritList,
|
|
1479
1402
|
{
|
|
1480
1403
|
subAgentKeys: parentSubAgents,
|
|
@@ -1492,7 +1415,7 @@ var CreateAssistantModal_default = CreateAssistantModal;
|
|
|
1492
1415
|
// src/components/Governance/AgentCreationOnboardingModal.tsx
|
|
1493
1416
|
import { Button as Button2, Modal as Modal2, Typography as Typography4 } from "antd";
|
|
1494
1417
|
import { Bot as Bot2, Globe2, GraduationCap } from "lucide-react";
|
|
1495
|
-
import { jsx as
|
|
1418
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1496
1419
|
var { Paragraph, Text: Text4 } = Typography4;
|
|
1497
1420
|
var methods = [
|
|
1498
1421
|
{
|
|
@@ -1521,7 +1444,7 @@ var AgentCreationOnboardingModal = ({
|
|
|
1521
1444
|
focusTriggerAfterClose = true
|
|
1522
1445
|
}) => {
|
|
1523
1446
|
const t = useT();
|
|
1524
|
-
return /* @__PURE__ */
|
|
1447
|
+
return /* @__PURE__ */ jsx7(
|
|
1525
1448
|
Modal2,
|
|
1526
1449
|
{
|
|
1527
1450
|
title: t("governance.creation.title"),
|
|
@@ -1532,9 +1455,9 @@ var AgentCreationOnboardingModal = ({
|
|
|
1532
1455
|
centered: true,
|
|
1533
1456
|
destroyOnHidden: true,
|
|
1534
1457
|
focusTriggerAfterClose,
|
|
1535
|
-
children: /* @__PURE__ */
|
|
1536
|
-
/* @__PURE__ */
|
|
1537
|
-
/* @__PURE__ */
|
|
1458
|
+
children: /* @__PURE__ */ jsxs7("div", { style: { padding: "8px 4px 4px" }, children: [
|
|
1459
|
+
/* @__PURE__ */ jsx7(Paragraph, { style: { color: "#595959", fontSize: 15, margin: "8px 0 24px" }, children: t("governance.creation.subtitle") }),
|
|
1460
|
+
/* @__PURE__ */ jsx7(
|
|
1538
1461
|
"div",
|
|
1539
1462
|
{
|
|
1540
1463
|
style: {
|
|
@@ -1545,7 +1468,7 @@ var AgentCreationOnboardingModal = ({
|
|
|
1545
1468
|
children: methods.map((method) => {
|
|
1546
1469
|
const Icon = method.icon;
|
|
1547
1470
|
const methodTitle = t(method.titleKey);
|
|
1548
|
-
return /* @__PURE__ */
|
|
1471
|
+
return /* @__PURE__ */ jsxs7(
|
|
1549
1472
|
Button2,
|
|
1550
1473
|
{
|
|
1551
1474
|
type: "default",
|
|
@@ -1565,7 +1488,7 @@ var AgentCreationOnboardingModal = ({
|
|
|
1565
1488
|
whiteSpace: "normal"
|
|
1566
1489
|
},
|
|
1567
1490
|
children: [
|
|
1568
|
-
/* @__PURE__ */
|
|
1491
|
+
/* @__PURE__ */ jsx7(
|
|
1569
1492
|
"div",
|
|
1570
1493
|
{
|
|
1571
1494
|
style: {
|
|
@@ -1579,12 +1502,12 @@ var AgentCreationOnboardingModal = ({
|
|
|
1579
1502
|
color: "#6366f1",
|
|
1580
1503
|
background: "#eeeeff"
|
|
1581
1504
|
},
|
|
1582
|
-
children: /* @__PURE__ */
|
|
1505
|
+
children: /* @__PURE__ */ jsx7(Icon, { size: 19 })
|
|
1583
1506
|
}
|
|
1584
1507
|
),
|
|
1585
|
-
/* @__PURE__ */
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
/* @__PURE__ */
|
|
1508
|
+
/* @__PURE__ */ jsxs7("div", { style: { minWidth: 0 }, children: [
|
|
1509
|
+
/* @__PURE__ */ jsx7(Text4, { strong: true, style: { display: "block", fontSize: 15, marginBottom: 3 }, children: methodTitle }),
|
|
1510
|
+
/* @__PURE__ */ jsx7(Text4, { style: { color: "#737373", lineHeight: 1.5 }, children: t(method.descriptionKey) })
|
|
1588
1511
|
] })
|
|
1589
1512
|
]
|
|
1590
1513
|
},
|
|
@@ -1593,14 +1516,14 @@ var AgentCreationOnboardingModal = ({
|
|
|
1593
1516
|
})
|
|
1594
1517
|
}
|
|
1595
1518
|
),
|
|
1596
|
-
/* @__PURE__ */
|
|
1519
|
+
/* @__PURE__ */ jsx7("div", { style: { display: "flex", justifyContent: "flex-end", gap: 8, flexWrap: "wrap", marginTop: 24 }, children: /* @__PURE__ */ jsx7(Button2, { onClick: onCancel, children: t("governance.creation.notNow") }) })
|
|
1597
1520
|
] })
|
|
1598
1521
|
}
|
|
1599
1522
|
);
|
|
1600
1523
|
};
|
|
1601
1524
|
|
|
1602
1525
|
// src/components/Governance/AgentGovernanceWorkbench.tsx
|
|
1603
|
-
import { Fragment as Fragment3, jsx as
|
|
1526
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1604
1527
|
var parseGraphDefinition = (value) => {
|
|
1605
1528
|
let parsed = value;
|
|
1606
1529
|
if (typeof value === "string") {
|
|
@@ -1616,8 +1539,6 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1616
1539
|
const { get, del, put } = useApi();
|
|
1617
1540
|
const t = useT();
|
|
1618
1541
|
const [assistants, setAssistants] = useState5([]);
|
|
1619
|
-
const [stats, setStats] = useState5({});
|
|
1620
|
-
const [statsExpiresAt, setStatsExpiresAt] = useState5(null);
|
|
1621
1542
|
const [loading, setLoading] = useState5(false);
|
|
1622
1543
|
const [selectedId, setSelectedId] = useState5(null);
|
|
1623
1544
|
const [initialTab, setInitialTab] = useState5("graph");
|
|
@@ -1634,21 +1555,10 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1634
1555
|
const loadAgents = useCallback3(async () => {
|
|
1635
1556
|
setLoading(true);
|
|
1636
1557
|
try {
|
|
1637
|
-
const
|
|
1638
|
-
get("/api/assistants"),
|
|
1639
|
-
get("/api/assistants/stats").catch(() => null)
|
|
1640
|
-
]);
|
|
1558
|
+
const listRes = await get("/api/assistants");
|
|
1641
1559
|
if (listRes.success && listRes.data?.records) {
|
|
1642
1560
|
setAssistants(listRes.data.records);
|
|
1643
1561
|
}
|
|
1644
|
-
if (statsRes?.success && statsRes.data?.records) {
|
|
1645
|
-
const byId = {};
|
|
1646
|
-
for (const rec of statsRes.data.records) {
|
|
1647
|
-
byId[rec.id] = rec;
|
|
1648
|
-
}
|
|
1649
|
-
setStats(byId);
|
|
1650
|
-
setStatsExpiresAt(statsRes.cache?.expiresAt ?? null);
|
|
1651
|
-
}
|
|
1652
1562
|
} catch {
|
|
1653
1563
|
message2.error(t("governance.workbench.loadFailed"));
|
|
1654
1564
|
} finally {
|
|
@@ -1758,13 +1668,13 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1758
1668
|
},
|
|
1759
1669
|
[del, loadAgents, t]
|
|
1760
1670
|
);
|
|
1761
|
-
return /* @__PURE__ */
|
|
1671
|
+
return /* @__PURE__ */ jsxs8("div", { style: { height: "100%", background: "#fafafa", overflow: "hidden" }, children: [
|
|
1762
1672
|
selectedAssistant ? (
|
|
1763
1673
|
// Isolated workspace scope for the detail page: the learning project
|
|
1764
1674
|
// selection (modal handoff / canvas selector) must scope the copilot's
|
|
1765
1675
|
// run headers WITHOUT touching the shell-level WorkspaceContext —
|
|
1766
1676
|
// writing the shell context navigates the shell to the project page.
|
|
1767
|
-
/* @__PURE__ */
|
|
1677
|
+
/* @__PURE__ */ jsx8(ProjectScopeProvider_default, { defaultProjectId: detailProjectId ?? void 0, children: /* @__PURE__ */ jsx8(
|
|
1768
1678
|
AgentDetailView,
|
|
1769
1679
|
{
|
|
1770
1680
|
assistant: selectedAssistant,
|
|
@@ -1780,13 +1690,11 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1780
1690
|
initialProjectId: detailProjectId
|
|
1781
1691
|
}
|
|
1782
1692
|
) }, selectedAssistant.id)
|
|
1783
|
-
) : /* @__PURE__ */
|
|
1693
|
+
) : /* @__PURE__ */ jsx8(Fragment3, { children: /* @__PURE__ */ jsx8(
|
|
1784
1694
|
AgentList,
|
|
1785
1695
|
{
|
|
1786
1696
|
items,
|
|
1787
1697
|
assistants,
|
|
1788
|
-
stats,
|
|
1789
|
-
statsExpiresAt,
|
|
1790
1698
|
loading,
|
|
1791
1699
|
onItemClick: (id) => openAgentDetailTab(id, "graph"),
|
|
1792
1700
|
onOpenPlayground: (id) => openAgentDetailTab(id, "playground"),
|
|
@@ -1795,7 +1703,7 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1795
1703
|
onDelete: confirmDelete
|
|
1796
1704
|
}
|
|
1797
1705
|
) }),
|
|
1798
|
-
/* @__PURE__ */
|
|
1706
|
+
/* @__PURE__ */ jsx8(
|
|
1799
1707
|
AgentCreationOnboardingModal,
|
|
1800
1708
|
{
|
|
1801
1709
|
open: onboardingOpen,
|
|
@@ -1807,7 +1715,7 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1807
1715
|
focusTriggerAfterClose: restoreOnboardingFocus
|
|
1808
1716
|
}
|
|
1809
1717
|
),
|
|
1810
|
-
/* @__PURE__ */
|
|
1718
|
+
/* @__PURE__ */ jsx8(
|
|
1811
1719
|
CreateAssistantModal,
|
|
1812
1720
|
{
|
|
1813
1721
|
open: createOpen,
|
|
@@ -1828,7 +1736,7 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1828
1736
|
}
|
|
1829
1737
|
}
|
|
1830
1738
|
),
|
|
1831
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ jsx8(
|
|
1832
1740
|
Modal3,
|
|
1833
1741
|
{
|
|
1834
1742
|
title: t("governance.deleteAgent"),
|
|
@@ -1838,7 +1746,7 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1838
1746
|
okText: t("common.delete"),
|
|
1839
1747
|
okButtonProps: { danger: true, loading: deleting },
|
|
1840
1748
|
cancelText: t("common.cancel"),
|
|
1841
|
-
children: /* @__PURE__ */
|
|
1749
|
+
children: /* @__PURE__ */ jsx8("p", { children: t("governance.delete.irreversible") })
|
|
1842
1750
|
}
|
|
1843
1751
|
)
|
|
1844
1752
|
] });
|
|
@@ -1846,9 +1754,8 @@ var AgentGovernanceWorkbench = () => {
|
|
|
1846
1754
|
|
|
1847
1755
|
export {
|
|
1848
1756
|
AgentGraphView,
|
|
1849
|
-
AgentCardStats,
|
|
1850
1757
|
AgentList,
|
|
1851
1758
|
CreateAssistantModal_default,
|
|
1852
1759
|
AgentGovernanceWorkbench
|
|
1853
1760
|
};
|
|
1854
|
-
//# sourceMappingURL=chunk-
|
|
1761
|
+
//# sourceMappingURL=chunk-JJIGSAPR.mjs.map
|