@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.
@@ -11012,11 +11012,14 @@ function ResultsTab({ agentId, t }) {
11012
11012
  ] })
11013
11013
  ] });
11014
11014
  }
11015
- function AgentDrawer({ onSaved }) {
11015
+ function AgentDrawer({ agent: agentProp, models: modelsProp, open: openProp, onClose: onCloseProp, onSaved }) {
11016
11016
  const t = useTranslations("agents.workflow");
11017
- const agent = useAgentDrawerStore((state) => state.agent);
11018
- const models = useAgentDrawerStore((state) => state.models);
11019
- const open = useAgentDrawerStore((state) => state.open);
11017
+ const agentStore = useAgentDrawerStore((state) => state.agent);
11018
+ const modelsStore = useAgentDrawerStore((state) => state.models);
11019
+ const openStore = useAgentDrawerStore((state) => state.open);
11020
+ const agent = agentProp ?? agentStore;
11021
+ const models = modelsProp ?? modelsStore;
11022
+ const open = openProp ?? openStore;
11020
11023
  const activeTab = useAgentDrawerStore((state) => state.activeTab);
11021
11024
  const selectedModelId = useAgentDrawerStore((state) => state.selectedModelId);
11022
11025
  const selectedFramework = useAgentDrawerStore((state) => state.selectedFramework);
@@ -11032,8 +11035,9 @@ function AgentDrawer({ onSaved }) {
11032
11035
  const markSaved = useAgentDrawerStore((state) => state.markSaved);
11033
11036
  const closeDrawer = useAgentDrawerStore((state) => state.closeDrawer);
11034
11037
  const handleClose = useCallback(() => {
11038
+ onCloseProp?.();
11035
11039
  closeDrawer();
11036
- }, [closeDrawer]);
11040
+ }, [onCloseProp, closeDrawer]);
11037
11041
  const handleMarkSaved = useCallback(() => {
11038
11042
  markSaved();
11039
11043
  onSaved?.();