@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.
@@ -217,7 +217,7 @@ var EMPTY_STATE = {
217
217
  var useModalStore = create((set, get) => ({
218
218
  ...EMPTY_STATE,
219
219
  stack: [],
220
- openAgentModal: (agent, models, isCreateMode = false) => {
220
+ openAgentModal: (agent, models, isCreateMode = false, agentTools, modelProviders) => {
221
221
  const current = get();
222
222
  const entry = {
223
223
  type: current.activeModal,
@@ -228,7 +228,7 @@ var useModalStore = create((set, get) => ({
228
228
  const newStack = current.activeModal ? [...current.stack, entry] : current.stack;
229
229
  set({
230
230
  activeModal: "agent",
231
- agentData: { agent, models, isCreateMode },
231
+ agentData: { agent, models, isCreateMode, agentTools, modelProviders },
232
232
  logicNodeData: null,
233
233
  pipelineSettingsData: null,
234
234
  stack: newStack
@@ -1420,6 +1420,17 @@ var AgentFlowNode = memo(function AgentFlowNode2({ id, data, selected }) {
1420
1420
  "v",
1421
1421
  data.agent.activePromptVersion
1422
1422
  ] }),
1423
+ data.agentTools && data.agentTools.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
1424
+ /* @__PURE__ */ jsx("div", { className: "w-full" }),
1425
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-1 border-t border-gray-200/20 pt-1 dark:border-white/5", children: [
1426
+ /* @__PURE__ */ jsx(CommandLineIcon, { className: "h-3 w-3 shrink-0 text-amber-500 dark:text-amber-400" }),
1427
+ data.agentTools.slice(0, 3).map((tool) => /* @__PURE__ */ 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)),
1428
+ data.agentTools.length > 3 && /* @__PURE__ */ jsxs("span", { className: "text-[9px] text-gray-400 dark:text-gray-500", children: [
1429
+ "+",
1430
+ data.agentTools.length - 3
1431
+ ] })
1432
+ ] })
1433
+ ] }),
1423
1434
  data.onRemoveFromCanvas && /* @__PURE__ */ jsx(
1424
1435
  "span",
1425
1436
  {
@@ -5618,9 +5629,11 @@ function WorkflowCanvasInner({
5618
5629
  agent,
5619
5630
  order: agent.order ?? 0,
5620
5631
  selected: selectedAgentId === savedNode.id,
5632
+ agentTools: agentTools.map((at) => ({ id: at.agentToolId, name: at.name, category: at.category, enabled: at.enabled })),
5633
+ providerName: models.find((m) => m.id === agent.modelId)?.provider,
5621
5634
  onSelect: () => {
5622
5635
  setSelectedAgentId(agent.agentId);
5623
- openAgentModalAction(agent, models);
5636
+ openAgentModalAction(agent, models, false, agentTools);
5624
5637
  },
5625
5638
  onRemoveFromCanvas: handleRemoveNodeFromCanvas
5626
5639
  }
@@ -5971,7 +5984,7 @@ function WorkflowCanvasInner({
5971
5984
  const agent = targetNode.data?.agent;
5972
5985
  if (agent) {
5973
5986
  setSelectedAgentId(agent.agentId ?? agent.id ?? null);
5974
- openAgentModalAction(agent, models);
5987
+ openAgentModalAction(agent, models, false, agentTools);
5975
5988
  }
5976
5989
  } else if (targetNode.type === "tool") {
5977
5990
  const tool = targetNode.data?.tool;
@@ -6462,7 +6475,7 @@ function WorkflowCanvasInner({
6462
6475
  selected: false,
6463
6476
  onSelect: () => {
6464
6477
  setSelectedAgentId(agent.agentId);
6465
- openAgentModalAction(agent, models);
6478
+ openAgentModalAction(agent, models, false, agentTools);
6466
6479
  },
6467
6480
  onRemoveFromCanvas: handleRemoveNodeFromCanvas
6468
6481
  }
@@ -7083,5 +7096,5 @@ function Workspace({
7083
7096
  }
7084
7097
 
7085
7098
  export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
7086
- //# sourceMappingURL=chunk-VWKBMTTC.mjs.map
7087
- //# sourceMappingURL=chunk-VWKBMTTC.mjs.map
7099
+ //# sourceMappingURL=chunk-OL7PEDJG.mjs.map
7100
+ //# sourceMappingURL=chunk-OL7PEDJG.mjs.map