@datatechsolutions/ui 2.11.12 → 2.11.14

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.
@@ -1,5 +1,5 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { i as Workspace, h as WorkspaceProps } from '../workflow-canvas-CJwGehdk.mjs';
3
+ export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-CooSZh-g.mjs';
4
4
  import '@xyflow/react';
5
5
  import './contracts.mjs';
@@ -1,5 +1,5 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { i as Workspace, h as WorkspaceProps } from '../workflow-canvas-DSm0iyof.js';
3
+ export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-BUpiBzxZ.js';
4
4
  import '@xyflow/react';
5
5
  import './contracts.js';
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkLFWRE3A3_js = require('../chunk-LFWRE3A3.js');
4
+ var chunkJT2JCLN5_js = require('../chunk-JT2JCLN5.js');
5
5
  require('../chunk-4XID6LOC.js');
6
6
  require('../chunk-S7KHTUHA.js');
7
7
  require('../chunk-UZ3CMNUJ.js');
@@ -13,7 +13,7 @@ require('../chunk-YXN2K77G.js');
13
13
 
14
14
  Object.defineProperty(exports, "Workspace", {
15
15
  enumerable: true,
16
- get: function () { return chunkLFWRE3A3_js.Workspace; }
16
+ get: function () { return chunkJT2JCLN5_js.Workspace; }
17
17
  });
18
18
  //# sourceMappingURL=workflow-canvas.js.map
19
19
  //# sourceMappingURL=workflow-canvas.js.map
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- export { Workspace } from '../chunk-VWKBMTTC.mjs';
2
+ export { Workspace } from '../chunk-OL7PEDJG.mjs';
3
3
  import '../chunk-46ZM5VJJ.mjs';
4
4
  import '../chunk-QWG2FMUN.mjs';
5
5
  import '../chunk-D2JF6C3E.mjs';
@@ -219,7 +219,7 @@ var EMPTY_STATE = {
219
219
  var useModalStore = zustand.create((set, get) => ({
220
220
  ...EMPTY_STATE,
221
221
  stack: [],
222
- openAgentModal: (agent, models, isCreateMode = false) => {
222
+ openAgentModal: (agent, models, isCreateMode = false, agentTools, modelProviders) => {
223
223
  const current = get();
224
224
  const entry = {
225
225
  type: current.activeModal,
@@ -230,7 +230,7 @@ var useModalStore = zustand.create((set, get) => ({
230
230
  const newStack = current.activeModal ? [...current.stack, entry] : current.stack;
231
231
  set({
232
232
  activeModal: "agent",
233
- agentData: { agent, models, isCreateMode },
233
+ agentData: { agent, models, isCreateMode, agentTools, modelProviders },
234
234
  logicNodeData: null,
235
235
  pipelineSettingsData: null,
236
236
  stack: newStack
@@ -1422,6 +1422,17 @@ var AgentFlowNode = react.memo(function AgentFlowNode2({ id, data, selected }) {
1422
1422
  "v",
1423
1423
  data.agent.activePromptVersion
1424
1424
  ] }),
1425
+ data.agentTools && data.agentTools.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1426
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full" }),
1427
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-1 border-t border-gray-200/20 pt-1 dark:border-white/5", children: [
1428
+ /* @__PURE__ */ jsxRuntime.jsx(outline.CommandLineIcon, { className: "h-3 w-3 shrink-0 text-amber-500 dark:text-amber-400" }),
1429
+ data.agentTools.slice(0, 3).map((tool) => /* @__PURE__ */ jsxRuntime.jsx(NodeCardBadge, { className: `rounded px-1.5 py-px text-[9px] font-medium ${tool.enabled ? "bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300" : "bg-gray-100 text-gray-400 line-through dark:bg-white/5 dark:text-gray-500"}`, children: tool.name }, tool.id)),
1430
+ data.agentTools.length > 3 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[9px] text-gray-400 dark:text-gray-500", children: [
1431
+ "+",
1432
+ data.agentTools.length - 3
1433
+ ] })
1434
+ ] })
1435
+ ] }),
1425
1436
  data.onRemoveFromCanvas && /* @__PURE__ */ jsxRuntime.jsx(
1426
1437
  "span",
1427
1438
  {
@@ -5620,9 +5631,11 @@ function WorkflowCanvasInner({
5620
5631
  agent,
5621
5632
  order: agent.order ?? 0,
5622
5633
  selected: selectedAgentId === savedNode.id,
5634
+ agentTools: agentTools.map((at) => ({ id: at.agentToolId, name: at.name, category: at.category, enabled: at.enabled })),
5635
+ providerName: models.find((m) => m.id === agent.modelId)?.provider,
5623
5636
  onSelect: () => {
5624
5637
  setSelectedAgentId(agent.agentId);
5625
- openAgentModalAction(agent, models);
5638
+ openAgentModalAction(agent, models, false, agentTools);
5626
5639
  },
5627
5640
  onRemoveFromCanvas: handleRemoveNodeFromCanvas
5628
5641
  }
@@ -5973,7 +5986,7 @@ function WorkflowCanvasInner({
5973
5986
  const agent = targetNode.data?.agent;
5974
5987
  if (agent) {
5975
5988
  setSelectedAgentId(agent.agentId ?? agent.id ?? null);
5976
- openAgentModalAction(agent, models);
5989
+ openAgentModalAction(agent, models, false, agentTools);
5977
5990
  }
5978
5991
  } else if (targetNode.type === "tool") {
5979
5992
  const tool = targetNode.data?.tool;
@@ -6464,7 +6477,7 @@ function WorkflowCanvasInner({
6464
6477
  selected: false,
6465
6478
  onSelect: () => {
6466
6479
  setSelectedAgentId(agent.agentId);
6467
- openAgentModalAction(agent, models);
6480
+ openAgentModalAction(agent, models, false, agentTools);
6468
6481
  },
6469
6482
  onRemoveFromCanvas: handleRemoveNodeFromCanvas
6470
6483
  }
@@ -7143,5 +7156,5 @@ exports.useModalStore = useModalStore;
7143
7156
  exports.useWorkflowBuilderClient = useWorkflowBuilderClient;
7144
7157
  exports.useWorkflowBuilderClientOptional = useWorkflowBuilderClientOptional;
7145
7158
  exports.useWorkflowStore = useWorkflowStore;
7146
- //# sourceMappingURL=chunk-LFWRE3A3.js.map
7147
- //# sourceMappingURL=chunk-LFWRE3A3.js.map
7159
+ //# sourceMappingURL=chunk-JT2JCLN5.js.map
7160
+ //# sourceMappingURL=chunk-JT2JCLN5.js.map