@datatechsolutions/ui 3.10.0 → 3.11.1
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/astrlabe/contracts.d.mts +18 -2
- package/dist/astrlabe/contracts.d.ts +18 -2
- package/dist/astrlabe/index.d.mts +2 -2
- package/dist/astrlabe/index.d.ts +2 -2
- package/dist/astrlabe/index.js +108 -108
- package/dist/astrlabe/index.mjs +4 -4
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/{chunk-JB3U6ORY.mjs → chunk-3U3CIARA.mjs} +3 -3
- package/dist/{chunk-JB3U6ORY.mjs.map → chunk-3U3CIARA.mjs.map} +1 -1
- package/dist/{chunk-5U43K6G3.mjs → chunk-7DZ2C5IN.mjs} +24 -22
- package/dist/chunk-7DZ2C5IN.mjs.map +1 -0
- package/dist/{chunk-EC34PGUO.js → chunk-APONR6ZM.js} +136 -136
- package/dist/chunk-APONR6ZM.js.map +1 -0
- package/dist/{chunk-AMESLEIO.js → chunk-BTMHQCDB.js} +63 -63
- package/dist/{chunk-AMESLEIO.js.map → chunk-BTMHQCDB.js.map} +1 -1
- package/dist/{chunk-L3R425GB.js → chunk-CLXEVSGB.js} +13 -13
- package/dist/{chunk-L3R425GB.js.map → chunk-CLXEVSGB.js.map} +1 -1
- package/dist/{chunk-TSNKICPP.js → chunk-CVCMJJ56.js} +10 -10
- package/dist/{chunk-TSNKICPP.js.map → chunk-CVCMJJ56.js.map} +1 -1
- package/dist/{chunk-MSMEECO6.js → chunk-DPXCJVJT.js} +9 -9
- package/dist/{chunk-MSMEECO6.js.map → chunk-DPXCJVJT.js.map} +1 -1
- package/dist/{chunk-A256OE5E.mjs → chunk-E3NMVWRL.mjs} +5 -5
- package/dist/chunk-E3NMVWRL.mjs.map +1 -0
- package/dist/{chunk-HEXTU6W3.mjs → chunk-I77TTBYO.mjs} +6 -6
- package/dist/{chunk-HEXTU6W3.mjs.map → chunk-I77TTBYO.mjs.map} +1 -1
- package/dist/{chunk-RHRJXK5R.mjs → chunk-IGOMJHC6.mjs} +11 -3
- package/dist/chunk-IGOMJHC6.mjs.map +1 -0
- package/dist/{chunk-DA3H7ERQ.mjs → chunk-IHOCYBHM.mjs} +3 -3
- package/dist/{chunk-DA3H7ERQ.mjs.map → chunk-IHOCYBHM.mjs.map} +1 -1
- package/dist/{chunk-C4D3EI5L.mjs → chunk-K3LIDGMA.mjs} +3 -3
- package/dist/{chunk-C4D3EI5L.mjs.map → chunk-K3LIDGMA.mjs.map} +1 -1
- package/dist/{chunk-YSYEV2Z6.js → chunk-KDVZIDVF.js} +46 -44
- package/dist/chunk-KDVZIDVF.js.map +1 -0
- package/dist/{chunk-NM37GLCL.mjs → chunk-LHAOIPYP.mjs} +3 -3
- package/dist/{chunk-NM37GLCL.mjs.map → chunk-LHAOIPYP.mjs.map} +1 -1
- package/dist/{chunk-MAOZWOA6.js → chunk-LM6BJOKX.js} +55 -55
- package/dist/{chunk-MAOZWOA6.js.map → chunk-LM6BJOKX.js.map} +1 -1
- package/dist/{chunk-2A45ZEK4.js → chunk-MN777KLN.js} +45 -45
- package/dist/{chunk-2A45ZEK4.js.map → chunk-MN777KLN.js.map} +1 -1
- package/dist/{chunk-FIJMOTP4.js → chunk-NW32BM3F.js} +34 -34
- package/dist/{chunk-FIJMOTP4.js.map → chunk-NW32BM3F.js.map} +1 -1
- package/dist/{chunk-W6MBDTKF.mjs → chunk-O4DIKNNH.mjs} +3 -3
- package/dist/{chunk-W6MBDTKF.mjs.map → chunk-O4DIKNNH.mjs.map} +1 -1
- package/dist/{chunk-5AKTDJFR.js → chunk-OD2AZBEX.js} +25 -25
- package/dist/{chunk-5AKTDJFR.js.map → chunk-OD2AZBEX.js.map} +1 -1
- package/dist/{chunk-5KI7FB3E.mjs → chunk-OKCEK7GH.mjs} +225 -234
- package/dist/chunk-OKCEK7GH.mjs.map +1 -0
- package/dist/{chunk-KHUWFL6W.js → chunk-OO4YMN4P.js} +4 -4
- package/dist/{chunk-KHUWFL6W.js.map → chunk-OO4YMN4P.js.map} +1 -1
- package/dist/{chunk-O4HH77A4.js → chunk-OSXBMLZP.js} +68 -68
- package/dist/{chunk-O4HH77A4.js.map → chunk-OSXBMLZP.js.map} +1 -1
- package/dist/{chunk-6ZYATZS3.mjs → chunk-Q6MMJYEG.mjs} +3 -3
- package/dist/{chunk-6ZYATZS3.mjs.map → chunk-Q6MMJYEG.mjs.map} +1 -1
- package/dist/{chunk-NSZN54HW.js → chunk-QASAHGLE.js} +4 -4
- package/dist/{chunk-NSZN54HW.js.map → chunk-QASAHGLE.js.map} +1 -1
- package/dist/{chunk-BU4WMSK3.mjs → chunk-QDW3IJIL.mjs} +3 -3
- package/dist/{chunk-BU4WMSK3.mjs.map → chunk-QDW3IJIL.mjs.map} +1 -1
- package/dist/{chunk-FENA4YGN.mjs → chunk-QKWNQOJB.mjs} +3 -3
- package/dist/{chunk-FENA4YGN.mjs.map → chunk-QKWNQOJB.mjs.map} +1 -1
- package/dist/{chunk-H7X3SXMB.mjs → chunk-S46LUR7O.mjs} +7 -7
- package/dist/{chunk-H7X3SXMB.mjs.map → chunk-S46LUR7O.mjs.map} +1 -1
- package/dist/{chunk-FD376DZ6.mjs → chunk-S4LHC5SF.mjs} +3 -3
- package/dist/{chunk-FD376DZ6.mjs.map → chunk-S4LHC5SF.mjs.map} +1 -1
- package/dist/{chunk-B76RTA7D.js → chunk-SSKKTSMA.js} +35 -35
- package/dist/{chunk-B76RTA7D.js.map → chunk-SSKKTSMA.js.map} +1 -1
- package/dist/{chunk-LVR4SR65.js → chunk-TIJXCRM4.js} +223 -234
- package/dist/chunk-TIJXCRM4.js.map +1 -0
- package/dist/{chunk-6UX2SRA2.mjs → chunk-VHU5FWFB.mjs} +3 -3
- package/dist/{chunk-6UX2SRA2.mjs.map → chunk-VHU5FWFB.mjs.map} +1 -1
- package/dist/{chunk-SY4MUT5V.js → chunk-ZUU7G3PC.js} +11 -2
- package/dist/chunk-ZUU7G3PC.js.map +1 -0
- package/dist/index.d.mts +26 -40
- package/dist/index.d.ts +26 -40
- package/dist/index.js +663 -671
- package/dist/index.mjs +2 -2
- package/dist/platform/admin/index.js +10 -10
- package/dist/platform/admin/index.mjs +4 -4
- package/dist/platform/agents-workspace.js +7 -7
- package/dist/platform/agents-workspace.mjs +6 -6
- package/dist/platform/app-shell.js +4 -4
- package/dist/platform/app-shell.mjs +3 -3
- package/dist/platform/auth/index.js +22 -22
- package/dist/platform/auth/index.mjs +4 -4
- package/dist/platform/billing/index.js +4 -4
- package/dist/platform/billing/index.mjs +3 -3
- package/dist/platform/impersonation/index.js +4 -4
- package/dist/platform/impersonation/index.mjs +3 -3
- package/dist/platform/index.js +82 -82
- package/dist/platform/index.mjs +18 -18
- package/dist/platform/pages/index.d.mts +3 -3
- package/dist/platform/pages/index.d.ts +3 -3
- package/dist/platform/pages/index.js +734 -701
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +452 -419
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +7 -7
- package/dist/platform/settings/index.mjs +6 -6
- package/dist/platform/workflow-api-client.d.mts +1 -1
- package/dist/platform/workflow-api-client.d.ts +1 -1
- package/dist/platform/workflow-api-client.js +65 -61
- package/dist/platform/workflow-api-client.mjs +1 -1
- package/dist/platform/workflow-canvas-shell.js +5 -5
- package/dist/platform/workflow-canvas-shell.mjs +4 -4
- package/dist/{rule-form-BYJzyork.d.mts → rule-form-BkKCY8Tc.d.mts} +8 -2
- package/dist/{rule-form-BYJzyork.d.ts → rule-form-CBD8wlrw.d.ts} +8 -2
- package/dist/{workflow-api-client-CpFl3WcG.d.mts → workflow-api-client-D9_0Spdz.d.mts} +16 -1
- package/dist/{workflow-api-client-uLICOanv.d.ts → workflow-api-client-E1QFRgeP.d.ts} +16 -1
- package/package.json +1 -1
- package/dist/chunk-5KI7FB3E.mjs.map +0 -1
- package/dist/chunk-5U43K6G3.mjs.map +0 -1
- package/dist/chunk-A256OE5E.mjs.map +0 -1
- package/dist/chunk-EC34PGUO.js.map +0 -1
- package/dist/chunk-LVR4SR65.js.map +0 -1
- package/dist/chunk-RHRJXK5R.mjs.map +0 -1
- package/dist/chunk-SY4MUT5V.js.map +0 -1
- package/dist/chunk-YSYEV2Z6.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkNW32BM3F_js = require('./chunk-NW32BM3F.js');
|
|
5
|
+
var chunkAPONR6ZM_js = require('./chunk-APONR6ZM.js');
|
|
6
6
|
var chunkDJDZIRM6_js = require('./chunk-DJDZIRM6.js');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var chunkOSXBMLZP_js = require('./chunk-OSXBMLZP.js');
|
|
8
|
+
var chunkTIJXCRM4_js = require('./chunk-TIJXCRM4.js');
|
|
9
9
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
10
|
-
var
|
|
10
|
+
var chunkZUU7G3PC_js = require('./chunk-ZUU7G3PC.js');
|
|
11
11
|
var chunkBHOT22QL_js = require('./chunk-BHOT22QL.js');
|
|
12
12
|
var react = require('react');
|
|
13
13
|
var reactRouter = require('react-router');
|
|
@@ -19,7 +19,7 @@ var useWebSocket = WS_ENDPOINT.length > 0;
|
|
|
19
19
|
function connectSSE(workflowId, runId, callbacks) {
|
|
20
20
|
let eventSource = null;
|
|
21
21
|
let cancelled = false;
|
|
22
|
-
|
|
22
|
+
chunkZUU7G3PC_js.buildAuthenticatedApiUrl(
|
|
23
23
|
`/workflows/${encodeURIComponent(workflowId)}/runs/${encodeURIComponent(runId)}/events`,
|
|
24
24
|
{ includeAccessToken: true }
|
|
25
25
|
).then((url) => {
|
|
@@ -181,9 +181,9 @@ function applyWorkflowExecutionEventToStore(actions, event) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
function useWorkflowRunPresentation(events, status) {
|
|
184
|
-
const clearNodeResults =
|
|
185
|
-
const setIsRunning =
|
|
186
|
-
const setNodeResult =
|
|
184
|
+
const clearNodeResults = chunkOSXBMLZP_js.useWorkflowStore((state) => state.clearNodeResults);
|
|
185
|
+
const setIsRunning = chunkOSXBMLZP_js.useWorkflowStore((state) => state.setIsRunning);
|
|
186
|
+
const setNodeResult = chunkOSXBMLZP_js.useWorkflowStore((state) => state.setNodeResult);
|
|
187
187
|
react.useEffect(() => {
|
|
188
188
|
if (status === "idle") {
|
|
189
189
|
resetWorkflowRunPresentation({ clearNodeResults, setIsRunning, setNodeResult });
|
|
@@ -206,9 +206,9 @@ function useWorkflowExecution(workflowId) {
|
|
|
206
206
|
const [activeRunId, setActiveRunId] = react.useState(null);
|
|
207
207
|
const [isLaunching, setIsLaunching] = react.useState(false);
|
|
208
208
|
const stream = useRunEvents(workflowId || null, activeRunId);
|
|
209
|
-
const clearNodeResults =
|
|
210
|
-
const setIsRunning =
|
|
211
|
-
const setNodeResult =
|
|
209
|
+
const clearNodeResults = chunkOSXBMLZP_js.useWorkflowStore((state) => state.clearNodeResults);
|
|
210
|
+
const setIsRunning = chunkOSXBMLZP_js.useWorkflowStore((state) => state.setIsRunning);
|
|
211
|
+
const setNodeResult = chunkOSXBMLZP_js.useWorkflowStore((state) => state.setNodeResult);
|
|
212
212
|
useWorkflowRunPresentation(stream.events, activeRunId ? stream.status : "idle");
|
|
213
213
|
react.useEffect(() => {
|
|
214
214
|
if (stream.status === "completed" || stream.status === "failed" || stream.status === "error") {
|
|
@@ -219,7 +219,7 @@ function useWorkflowExecution(workflowId) {
|
|
|
219
219
|
if (!workflowId) return;
|
|
220
220
|
setIsLaunching(true);
|
|
221
221
|
try {
|
|
222
|
-
const runRecord = await
|
|
222
|
+
const runRecord = await chunkZUU7G3PC_js.executeWorkflow(workflowId, inputVariables);
|
|
223
223
|
setActiveRunId(runRecord.id);
|
|
224
224
|
} finally {
|
|
225
225
|
setIsLaunching(false);
|
|
@@ -333,7 +333,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
333
333
|
const tWorkflow = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
334
334
|
const tCommon = chunkYXN2K77G_js.useTranslations("common");
|
|
335
335
|
const datasourceLabels = useDatasourceLabels();
|
|
336
|
-
const { error: notifyError, success: notifySuccess } =
|
|
336
|
+
const { error: notifyError, success: notifySuccess } = chunkTIJXCRM4_js.useNotifications();
|
|
337
337
|
const showSuccess = react.useCallback((title, message) => {
|
|
338
338
|
notifySuccess(title, message);
|
|
339
339
|
}, [notifySuccess]);
|
|
@@ -357,36 +357,36 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
357
357
|
const [datasources, setDatasources] = react.useState([]);
|
|
358
358
|
const [modelConnections, setModelConnections] = react.useState([]);
|
|
359
359
|
const [showDatasourceModal, setShowDatasourceModal] = react.useState(false);
|
|
360
|
-
const openPipelineSettingsModal =
|
|
360
|
+
const openPipelineSettingsModal = chunkOSXBMLZP_js.useModalStore((s) => s.openPipelineSettingsModal);
|
|
361
361
|
const [showRunInputDialog, setShowRunInputDialog] = react.useState(false);
|
|
362
362
|
const [showPreviewPanel, setShowPreviewPanel] = react.useState(false);
|
|
363
363
|
const [isCreatingAgent, setIsCreatingAgent] = react.useState(false);
|
|
364
|
-
const openSubworkflowModal =
|
|
365
|
-
const closeSubworkflowModal =
|
|
364
|
+
const openSubworkflowModal = chunkAPONR6ZM_js.useSubworkflowStore((s) => s.openModal);
|
|
365
|
+
const closeSubworkflowModal = chunkAPONR6ZM_js.useSubworkflowStore((s) => s.closeModal);
|
|
366
366
|
const [deleteTarget, setDeleteTarget] = react.useState(null);
|
|
367
367
|
const [saveStatus, setSaveStatus] = react.useState("idle");
|
|
368
368
|
const latestGraphRef = react.useRef(null);
|
|
369
369
|
const saveTimerRef = react.useRef(null);
|
|
370
370
|
const skipInitialAutoSaveRef = react.useRef(true);
|
|
371
|
-
const showRunPanel =
|
|
372
|
-
const toggleRunPanel =
|
|
373
|
-
const workflowNodes =
|
|
371
|
+
const showRunPanel = chunkOSXBMLZP_js.useWorkflowStore((state) => state.showRunPanel);
|
|
372
|
+
const toggleRunPanel = chunkOSXBMLZP_js.useWorkflowStore((state) => state.toggleRunPanel);
|
|
373
|
+
const workflowNodes = chunkOSXBMLZP_js.useWorkflowStore((state) => state.nodes);
|
|
374
374
|
const { execute: executeWorkflowRun, stop: stopWorkflowRun, isRunning } = useWorkflowExecution(workflowId);
|
|
375
375
|
const loadWorkspaceData = react.useCallback(async () => {
|
|
376
376
|
setIsLoading(true);
|
|
377
377
|
setLoadError(null);
|
|
378
378
|
try {
|
|
379
379
|
const [workflowData, agentList, modelList, agentToolDefList, ruleList, datasourceList, connectionList] = await Promise.all([
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
380
|
+
chunkZUU7G3PC_js.getWorkflowById(workflowId),
|
|
381
|
+
chunkZUU7G3PC_js.getAgentConfigsWithPrompts(),
|
|
382
|
+
chunkZUU7G3PC_js.getAgentModels(),
|
|
383
|
+
chunkZUU7G3PC_js.getAgentToolDefinitions().catch(() => []),
|
|
384
|
+
chunkZUU7G3PC_js.getAgentRules(),
|
|
385
|
+
chunkZUU7G3PC_js.getDatasources().catch(() => []),
|
|
386
|
+
chunkZUU7G3PC_js.listModelProviderConnections().catch(() => [])
|
|
387
387
|
]);
|
|
388
388
|
const toolResults = await Promise.all(
|
|
389
|
-
agentList.map((agent) =>
|
|
389
|
+
agentList.map((agent) => chunkZUU7G3PC_js.getAgentTools(agent.agentId).catch(() => []))
|
|
390
390
|
);
|
|
391
391
|
const toolList = toolResults.flat();
|
|
392
392
|
setWorkflow(workflowData);
|
|
@@ -417,7 +417,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
417
417
|
const loadWorkflowList = react.useCallback(async () => {
|
|
418
418
|
setIsLoadingWorkflows(true);
|
|
419
419
|
try {
|
|
420
|
-
const list = await
|
|
420
|
+
const list = await chunkZUU7G3PC_js.getWorkflows();
|
|
421
421
|
setWorkflows(list);
|
|
422
422
|
} catch {
|
|
423
423
|
setWorkflows([]);
|
|
@@ -452,7 +452,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
452
452
|
}
|
|
453
453
|
setSaveStatus("saving");
|
|
454
454
|
saveTimerRef.current = setTimeout(() => {
|
|
455
|
-
void
|
|
455
|
+
void chunkZUU7G3PC_js.saveWorkflowDraft(workflowId, graph).then((updatedWorkflow) => {
|
|
456
456
|
setWorkflow(updatedWorkflow);
|
|
457
457
|
setWorkflows((current) => current.map((item) => item.id === updatedWorkflow.id ? updatedWorkflow : item));
|
|
458
458
|
setSaveStatus("saved");
|
|
@@ -471,7 +471,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
471
471
|
}
|
|
472
472
|
setIsPublishing(true);
|
|
473
473
|
try {
|
|
474
|
-
const published = await
|
|
474
|
+
const published = await chunkZUU7G3PC_js.publishWorkflow(workflowId);
|
|
475
475
|
setWorkflow(published);
|
|
476
476
|
setWorkflows((current) => current.map((item) => item.id === published.id ? published : item));
|
|
477
477
|
} finally {
|
|
@@ -483,7 +483,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
483
483
|
navigate(`/workflows/edit?workflowId=${encodeURIComponent(selected.id)}`);
|
|
484
484
|
}, [navigate, workflowId]);
|
|
485
485
|
const handleCreateWorkflow = react.useCallback(async () => {
|
|
486
|
-
const created = await
|
|
486
|
+
const created = await chunkZUU7G3PC_js.createWorkflow({
|
|
487
487
|
name: tWorkflow("defaultWorkflowName")
|
|
488
488
|
});
|
|
489
489
|
navigate(`/workflows/edit?workflowId=${encodeURIComponent(created.id)}`);
|
|
@@ -493,7 +493,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
493
493
|
}, []);
|
|
494
494
|
const confirmDelete = react.useCallback(async () => {
|
|
495
495
|
if (!deleteTarget) return;
|
|
496
|
-
await
|
|
496
|
+
await chunkZUU7G3PC_js.deleteWorkflow(deleteTarget.id);
|
|
497
497
|
const remaining = workflows.filter((item) => item.id !== deleteTarget.id);
|
|
498
498
|
if (remaining.length > 0) {
|
|
499
499
|
navigate(`/workflows/edit?workflowId=${encodeURIComponent(remaining[0].id)}`);
|
|
@@ -525,13 +525,13 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
525
525
|
setIsCreatingAgent(false);
|
|
526
526
|
}, []);
|
|
527
527
|
const handleAgentSaved = react.useCallback(async () => {
|
|
528
|
-
const nextAgents = await
|
|
528
|
+
const nextAgents = await chunkZUU7G3PC_js.getAgentConfigsWithPrompts();
|
|
529
529
|
setAgents(nextAgents);
|
|
530
530
|
setIsCreatingAgent(false);
|
|
531
531
|
}, []);
|
|
532
532
|
const handleToggleTool = react.useCallback(async (tool) => {
|
|
533
533
|
try {
|
|
534
|
-
const updated = await
|
|
534
|
+
const updated = await chunkZUU7G3PC_js.updateAgentTool(tool.toolId, { enabled: !tool.enabled });
|
|
535
535
|
setTools((current) => current.map((item) => item.toolId === tool.toolId ? updated : item));
|
|
536
536
|
showSuccess(
|
|
537
537
|
tWorkflow("toolsSection"),
|
|
@@ -546,7 +546,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
546
546
|
}, [showError, showSuccess, tWorkflow]);
|
|
547
547
|
const handleToggleRule = react.useCallback(async (rule) => {
|
|
548
548
|
try {
|
|
549
|
-
const updated = await
|
|
549
|
+
const updated = await chunkZUU7G3PC_js.updateAgentRule(rule.ruleId, { ...rule, enabled: !rule.enabled });
|
|
550
550
|
setRules((current) => current.map((item) => item.ruleId === rule.ruleId ? updated : item));
|
|
551
551
|
showSuccess(
|
|
552
552
|
tWorkflow("rulesSection"),
|
|
@@ -584,7 +584,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
584
584
|
}, []);
|
|
585
585
|
const handleSaveDatasource = react.useCallback(async (data) => {
|
|
586
586
|
try {
|
|
587
|
-
const created = await
|
|
587
|
+
const created = await chunkZUU7G3PC_js.createDatasource(data);
|
|
588
588
|
setDatasources((current) => [...current, created]);
|
|
589
589
|
showSuccess(tWorkflow("dataSourcesSection"), tCommon("created") ?? "Created");
|
|
590
590
|
} catch (error) {
|
|
@@ -653,7 +653,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
653
653
|
}
|
|
654
654
|
if (!workflow) {
|
|
655
655
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-[calc(100vh-120px)] items-center justify-center", children: loadError ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
656
|
-
|
|
656
|
+
chunkTIJXCRM4_js.PageErrorState,
|
|
657
657
|
{
|
|
658
658
|
statusCode: 500,
|
|
659
659
|
title: tCommon("serverError"),
|
|
@@ -664,7 +664,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
664
664
|
retryLabel: tCommon("retry")
|
|
665
665
|
}
|
|
666
666
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
667
|
-
|
|
667
|
+
chunkTIJXCRM4_js.PageEmptyState,
|
|
668
668
|
{
|
|
669
669
|
title: tWorkflow("emptyTitle"),
|
|
670
670
|
message: tWorkflow("emptyDescription"),
|
|
@@ -672,7 +672,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
672
672
|
}
|
|
673
673
|
) });
|
|
674
674
|
}
|
|
675
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
675
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkOSXBMLZP_js.WorkflowBuilderProvider, { publishableKey: getPublishableKey(), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[calc(100vh-120px)] flex-col", "data-testid": "agents-workspace", children: [
|
|
676
676
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface flex h-full flex-col overflow-hidden rounded-2xl", children: [
|
|
677
677
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-shrink-0 items-center justify-between px-5 py-3", children: [
|
|
678
678
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -694,9 +694,9 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
694
694
|
children: workflow.name || tWorkflow("title")
|
|
695
695
|
}
|
|
696
696
|
),
|
|
697
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
697
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTIJXCRM4_js.CopyableId, { id: workflowId, className: "text-[10px]" }),
|
|
698
698
|
workflow.isDraft ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center rounded-full bg-amber-100 px-2.5 py-0.5 text-[10px] font-semibold text-amber-800 dark:bg-amber-900/30 dark:text-amber-300", children: tWorkflow("draftBadge") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center rounded-full bg-green-100 px-2.5 py-0.5 text-[10px] font-semibold text-green-800 dark:bg-green-900/30 dark:text-green-300", children: tWorkflow("published") }),
|
|
699
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
699
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAPONR6ZM_js.SaveStatusBadge, { status: saveStatus })
|
|
700
700
|
] }),
|
|
701
701
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
702
702
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -736,7 +736,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
736
736
|
] }),
|
|
737
737
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-divider border-t" }),
|
|
738
738
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
739
|
-
|
|
739
|
+
chunkAPONR6ZM_js.WorkflowListBar,
|
|
740
740
|
{
|
|
741
741
|
workflows,
|
|
742
742
|
activeWorkflowId: workflowId,
|
|
@@ -752,7 +752,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
752
752
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-divider border-t" }),
|
|
753
753
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
|
|
754
754
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
755
|
-
|
|
755
|
+
chunkAPONR6ZM_js.NodePalette,
|
|
756
756
|
{
|
|
757
757
|
agents,
|
|
758
758
|
tools,
|
|
@@ -774,7 +774,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
774
774
|
}
|
|
775
775
|
),
|
|
776
776
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
777
|
-
|
|
777
|
+
chunkAPONR6ZM_js.AutoSaveWorkspace,
|
|
778
778
|
{
|
|
779
779
|
workflowId,
|
|
780
780
|
className: "h-full w-full",
|
|
@@ -787,8 +787,8 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
787
787
|
agentTools: agentToolDefs,
|
|
788
788
|
rules,
|
|
789
789
|
datasources: datasourceDefinitions,
|
|
790
|
-
onLoadTables:
|
|
791
|
-
onLoadSchema:
|
|
790
|
+
onLoadTables: chunkZUU7G3PC_js.getDatasourceTables,
|
|
791
|
+
onLoadSchema: chunkZUU7G3PC_js.getDatasourceSchema,
|
|
792
792
|
onEditTool: handleEditTool,
|
|
793
793
|
onToggleTool: handleToggleTool,
|
|
794
794
|
onToggleRule: handleToggleRule,
|
|
@@ -802,7 +802,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
802
802
|
latestGraphRef.current = graph;
|
|
803
803
|
},
|
|
804
804
|
renderAgentModal: (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
805
|
-
|
|
805
|
+
chunkAPONR6ZM_js.AgentModal,
|
|
806
806
|
{
|
|
807
807
|
...props,
|
|
808
808
|
onSaved: () => {
|
|
@@ -831,9 +831,9 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
831
831
|
agentToolIds: payload.enabledToolIds
|
|
832
832
|
};
|
|
833
833
|
if (payload.agentId) {
|
|
834
|
-
await
|
|
834
|
+
await chunkZUU7G3PC_js.updateAgentConfig(payload.agentId, body);
|
|
835
835
|
} else {
|
|
836
|
-
await
|
|
836
|
+
await chunkZUU7G3PC_js.createAgentConfig(body);
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
}
|
|
@@ -843,7 +843,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
843
843
|
] })
|
|
844
844
|
] }),
|
|
845
845
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
846
|
-
|
|
846
|
+
chunkAPONR6ZM_js.PipelineSettingsModal,
|
|
847
847
|
{
|
|
848
848
|
onSave: async (changes) => {
|
|
849
849
|
const metadata = {
|
|
@@ -853,14 +853,14 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
853
853
|
if (changes.slug !== void 0) metadata.slug = changes.slug;
|
|
854
854
|
if (changes.isDraft !== void 0) metadata.isDraft = changes.isDraft;
|
|
855
855
|
if (changes.isActive !== void 0) metadata.isActive = changes.isActive;
|
|
856
|
-
const updated = latestGraphRef.current ? await
|
|
856
|
+
const updated = latestGraphRef.current ? await chunkZUU7G3PC_js.saveWorkflowDraft(workflowId, latestGraphRef.current, metadata) : await chunkZUU7G3PC_js.updateWorkflowSettings(workflowId, metadata);
|
|
857
857
|
setWorkflow(updated);
|
|
858
858
|
setWorkflows((current) => current.map((item) => item.id === updated.id ? updated : item));
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
),
|
|
862
862
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
863
|
-
|
|
863
|
+
chunkAPONR6ZM_js.SubworkflowModal,
|
|
864
864
|
{
|
|
865
865
|
onMaximize: (subworkflowId) => {
|
|
866
866
|
closeSubworkflowModal();
|
|
@@ -869,14 +869,14 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
869
869
|
onSaved: async (saved) => {
|
|
870
870
|
const isNew = !saved.toolId;
|
|
871
871
|
if (isNew) {
|
|
872
|
-
const created = await
|
|
872
|
+
const created = await chunkZUU7G3PC_js.createWorkflow({
|
|
873
873
|
name: saved.name,
|
|
874
874
|
description: saved.description
|
|
875
875
|
});
|
|
876
876
|
closeSubworkflowModal();
|
|
877
877
|
navigate(`/workflows/edit?workflowId=${encodeURIComponent(created.id)}`);
|
|
878
878
|
} else {
|
|
879
|
-
const updated = await
|
|
879
|
+
const updated = await chunkZUU7G3PC_js.updateAgentTool(saved.toolId, saved);
|
|
880
880
|
setTools((current) => current.map((item) => item.toolId === saved.toolId ? updated : item));
|
|
881
881
|
closeSubworkflowModal();
|
|
882
882
|
}
|
|
@@ -884,7 +884,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
884
884
|
}
|
|
885
885
|
),
|
|
886
886
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
887
|
-
|
|
887
|
+
chunkAPONR6ZM_js.RunPanel,
|
|
888
888
|
{
|
|
889
889
|
open: showRunPanel,
|
|
890
890
|
onClose: toggleRunPanel,
|
|
@@ -893,7 +893,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
893
893
|
}
|
|
894
894
|
),
|
|
895
895
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
896
|
-
|
|
896
|
+
chunkAPONR6ZM_js.RunInputDialog,
|
|
897
897
|
{
|
|
898
898
|
open: showRunInputDialog,
|
|
899
899
|
onClose: () => setShowRunInputDialog(false),
|
|
@@ -906,16 +906,16 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
906
906
|
}
|
|
907
907
|
),
|
|
908
908
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
909
|
-
|
|
909
|
+
chunkAPONR6ZM_js.PreviewPanel,
|
|
910
910
|
{
|
|
911
911
|
open: showPreviewPanel,
|
|
912
912
|
onClose: () => setShowPreviewPanel(false),
|
|
913
913
|
workflowId,
|
|
914
|
-
loadRuns:
|
|
914
|
+
loadRuns: chunkZUU7G3PC_js.getWorkflowRuns
|
|
915
915
|
}
|
|
916
916
|
),
|
|
917
917
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
918
|
-
|
|
918
|
+
chunkNW32BM3F_js.DatasourceFormModal,
|
|
919
919
|
{
|
|
920
920
|
open: showDatasourceModal,
|
|
921
921
|
onClose: () => setShowDatasourceModal(false),
|
|
@@ -926,7 +926,7 @@ function AgentsWorkspace({ workflowId, messages }) {
|
|
|
926
926
|
}
|
|
927
927
|
),
|
|
928
928
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
929
|
-
|
|
929
|
+
chunkTIJXCRM4_js.DynamicIslandConfirm,
|
|
930
930
|
{
|
|
931
931
|
open: deleteTarget !== null,
|
|
932
932
|
onClose: () => setDeleteTarget(null),
|
|
@@ -945,5 +945,5 @@ exports.resetWorkflowRunPresentation = resetWorkflowRunPresentation;
|
|
|
945
945
|
exports.useRunEvents = useRunEvents;
|
|
946
946
|
exports.useWorkflowExecution = useWorkflowExecution;
|
|
947
947
|
exports.useWorkflowRunPresentation = useWorkflowRunPresentation;
|
|
948
|
-
//# sourceMappingURL=chunk-
|
|
949
|
-
//# sourceMappingURL=chunk-
|
|
948
|
+
//# sourceMappingURL=chunk-BTMHQCDB.js.map
|
|
949
|
+
//# sourceMappingURL=chunk-BTMHQCDB.js.map
|