odaptos_design_system 2.0.120 → 2.0.122

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.
@@ -13054,6 +13054,8 @@ const PipModerated = ({
13054
13054
  disabled,
13055
13055
  url
13056
13056
  }) => {
13057
+ console.log('tasks from scenario', tasks);
13058
+ console.log('messages from scenario', messages);
13057
13059
  const pipWindowRef = React.useRef(null);
13058
13060
  const [tabOpen, setTabOpen] = React.useState('tasks');
13059
13061
  const [lastMessageRead, setLastMessageRead] = React.useState(null);
@@ -13679,7 +13681,8 @@ display: flex;
13679
13681
  window.open(url, '_blank');
13680
13682
  return;
13681
13683
  }
13682
- if (tasks[tasks.length - 1] && lastTaskRead && tasks[tasks.length - 1]._id !== lastTaskRead._id) {
13684
+ console.log('tasks', tasks);
13685
+ if (tasks.length > 0) {
13683
13686
  const onlyTasks = tasks.filter(task => task.type === 'task');
13684
13687
  const onlyScenarios = tasks.filter(task => task.type === 'scenario');
13685
13688
  const lastTask = onlyTasks[onlyTasks.length - 1];
@@ -13787,7 +13790,7 @@ const Scenario = ({
13787
13790
  text: description,
13788
13791
  size: "sm",
13789
13792
  className: styles$t.description
13790
- }), !isObserver && buttonIcon && buttonText && !isPipAvailable ? /*#__PURE__*/React__default.createElement(Button, {
13793
+ }), !isObserver && buttonIcon && buttonText && (!isPipAvailable || url.length === 0) ? /*#__PURE__*/React__default.createElement(Button, {
13791
13794
  text: buttonText,
13792
13795
  iconRight: buttonIcon ?? /*#__PURE__*/React__default.createElement(SendIcon, null),
13793
13796
  disabled: disabled,