@datatechsolutions/ui 2.7.110 → 2.7.111

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.
@@ -199,9 +199,14 @@ declare const GroupFlowNode: React$1.NamedExoticComponent<{
199
199
  }>;
200
200
 
201
201
  type AgentDrawerProps = {
202
+ /** Optional prop overrides — if provided, these take precedence over the Zustand store */
203
+ agent?: AgentWithPrompts | null;
204
+ models?: AgentModel[];
205
+ open?: boolean;
206
+ onClose?: () => void;
202
207
  onSaved?: () => void;
203
208
  };
204
- declare function AgentDrawer({ onSaved }: AgentDrawerProps): react_jsx_runtime.JSX.Element | null;
209
+ declare function AgentDrawer({ agent: agentProp, models: modelsProp, open: openProp, onClose: onCloseProp, onSaved }: AgentDrawerProps): react_jsx_runtime.JSX.Element | null;
205
210
 
206
211
  type SubworkflowDrawerProps = {
207
212
  /** Called when save/create is clicked — receives the merged subworkflow with updated graph */
@@ -199,9 +199,14 @@ declare const GroupFlowNode: React$1.NamedExoticComponent<{
199
199
  }>;
200
200
 
201
201
  type AgentDrawerProps = {
202
+ /** Optional prop overrides — if provided, these take precedence over the Zustand store */
203
+ agent?: AgentWithPrompts | null;
204
+ models?: AgentModel[];
205
+ open?: boolean;
206
+ onClose?: () => void;
202
207
  onSaved?: () => void;
203
208
  };
204
- declare function AgentDrawer({ onSaved }: AgentDrawerProps): react_jsx_runtime.JSX.Element | null;
209
+ declare function AgentDrawer({ agent: agentProp, models: modelsProp, open: openProp, onClose: onCloseProp, onSaved }: AgentDrawerProps): react_jsx_runtime.JSX.Element | null;
205
210
 
206
211
  type SubworkflowDrawerProps = {
207
212
  /** Called when save/create is clicked — receives the merged subworkflow with updated graph */
@@ -11042,11 +11042,14 @@ function ResultsTab({ agentId, t }) {
11042
11042
  ] })
11043
11043
  ] });
11044
11044
  }
11045
- function AgentDrawer({ onSaved }) {
11045
+ function AgentDrawer({ agent: agentProp, models: modelsProp, open: openProp, onClose: onCloseProp, onSaved }) {
11046
11046
  const t = nextIntl.useTranslations("agents.workflow");
11047
- const agent = useAgentDrawerStore((state) => state.agent);
11048
- const models = useAgentDrawerStore((state) => state.models);
11049
- const open = useAgentDrawerStore((state) => state.open);
11047
+ const agentStore = useAgentDrawerStore((state) => state.agent);
11048
+ const modelsStore = useAgentDrawerStore((state) => state.models);
11049
+ const openStore = useAgentDrawerStore((state) => state.open);
11050
+ const agent = agentProp ?? agentStore;
11051
+ const models = modelsProp ?? modelsStore;
11052
+ const open = openProp ?? openStore;
11050
11053
  const activeTab = useAgentDrawerStore((state) => state.activeTab);
11051
11054
  const selectedModelId = useAgentDrawerStore((state) => state.selectedModelId);
11052
11055
  const selectedFramework = useAgentDrawerStore((state) => state.selectedFramework);
@@ -11062,8 +11065,9 @@ function AgentDrawer({ onSaved }) {
11062
11065
  const markSaved = useAgentDrawerStore((state) => state.markSaved);
11063
11066
  const closeDrawer = useAgentDrawerStore((state) => state.closeDrawer);
11064
11067
  const handleClose = React8.useCallback(() => {
11068
+ onCloseProp?.();
11065
11069
  closeDrawer();
11066
- }, [closeDrawer]);
11070
+ }, [onCloseProp, closeDrawer]);
11067
11071
  const handleMarkSaved = React8.useCallback(() => {
11068
11072
  markSaved();
11069
11073
  onSaved?.();