@bikdotai/bik-component-library 0.0.821-beta.0 → 0.0.821-beta.2
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.
- package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
- package/dist/cjs/components/TypographyStyle.js +41 -20
- package/dist/cjs/components/TypographyStyle.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.styled.js +4 -4
- package/dist/cjs/components/avatar/Avatar.styled.js.map +1 -1
- package/dist/cjs/components/avatar/AvatarHelper.js +1 -1
- package/dist/cjs/components/avatar/AvatarHelper.js.map +1 -1
- package/dist/cjs/components/bik-layout/BikSidebar.js.map +1 -1
- package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js +2 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +1 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +2 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +1 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +294 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +1 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +2 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +1 -0
- package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
- package/dist/cjs/components/bik-layout/CommonStyles.js.map +1 -1
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +13 -13
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/button/themes.js +6 -6
- package/dist/cjs/components/button/themes.js.map +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js.map +1 -1
- package/dist/cjs/components/checkBox/CheckBox.styled.js +21 -20
- package/dist/cjs/components/checkBox/CheckBox.styled.js.map +1 -1
- package/dist/cjs/components/country-code-picker/CountryCodePicker.js.map +1 -1
- package/dist/cjs/components/country-code-picker/CountryPicker.js.map +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +9 -8
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +9 -9
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +6 -2
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.style.js +20 -6
- package/dist/cjs/components/dropdown-button/DropdownButton.style.js.map +1 -1
- package/dist/cjs/components/dual-icon-button/DualIconButton.js +2 -0
- package/dist/cjs/components/dual-icon-button/DualIconButton.js.map +1 -0
- package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js +33 -0
- package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js.map +1 -0
- package/dist/cjs/components/fab-menu/FABMenu.js.map +1 -1
- package/dist/cjs/components/icon-button/IconButton.js +1 -1
- package/dist/cjs/components/icon-button/IconButton.js.map +1 -1
- package/dist/cjs/components/icon-button/IconButton.styled.js +18 -12
- package/dist/cjs/components/icon-button/IconButton.styled.js.map +1 -1
- package/dist/cjs/components/icon-button/theme.js +1 -1
- package/dist/cjs/components/icon-button/theme.js.map +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/input/Input.styled.js +27 -16
- package/dist/cjs/components/input/Input.styled.js.map +1 -1
- package/dist/cjs/components/input-with-vars/InputWithVariables.js +3 -3
- package/dist/cjs/components/input-with-vars/InputWithVariables.js.map +1 -1
- package/dist/cjs/components/list-item/ListItem.js +1 -1
- package/dist/cjs/components/list-item/ListItem.js.map +1 -1
- package/dist/cjs/components/list-item/ListItem.styled.js +6 -6
- package/dist/cjs/components/list-item/ListItem.styled.js.map +1 -1
- package/dist/cjs/components/list-item/themes.js +32 -20
- package/dist/cjs/components/list-item/themes.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js +32 -29
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.js.map +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +4 -4
- package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
- package/dist/cjs/components/tag/model.js.map +1 -1
- package/dist/cjs/components/variable-picker-v3/Content.js +1 -1
- package/dist/cjs/components/variable-picker-v3/Content.js.map +1 -1
- package/dist/cjs/components/variable-picker-v3/model.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNewButton.js +2 -2
- package/dist/cjs/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNewPanel.js.map +1 -1
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/cjs/constants/Theme.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +1 -14
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/editor/BikEditor.types.js.map +1 -1
- package/dist/cjs/editor/BikEditor.utils.js +2 -2
- package/dist/cjs/editor/BikEditor.utils.js.map +1 -1
- package/dist/cjs/editor/extensions/buildExtensions.js +1 -1
- package/dist/cjs/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/cjs/editor/extensions/editorDropdown.styles.js +10 -15
- package/dist/cjs/editor/extensions/editorDropdown.styles.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionExtension.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js +1 -1
- package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +88 -73
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.d.ts +6 -0
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +124 -88
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +225 -128
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.d.ts +6 -2
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
- package/dist/esm/components/TypographyStyle.d.ts +8 -0
- package/dist/esm/components/TypographyStyle.js +63 -40
- package/dist/esm/components/TypographyStyle.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.d.ts +2 -1
- package/dist/esm/components/avatar/Avatar.js +51 -73
- package/dist/esm/components/avatar/Avatar.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.styled.js +8 -8
- package/dist/esm/components/avatar/Avatar.styled.js.map +1 -1
- package/dist/esm/components/avatar/AvatarHelper.d.ts +5 -4
- package/dist/esm/components/avatar/AvatarHelper.js +4 -4
- package/dist/esm/components/avatar/AvatarHelper.js.map +1 -1
- package/dist/esm/components/bik-layout/BikSidebar.js.map +1 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.d.ts +33 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js +272 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +1 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2.model.d.ts +27 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.d.ts +12 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +53 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +1 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +44 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +310 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +1 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.d.ts +2 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +107 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +1 -0
- package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js.map +1 -1
- package/dist/esm/components/bik-layout/index.d.ts +2 -0
- package/dist/esm/components/button/Button.js +31 -31
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/Button.styled.d.ts +1 -1
- package/dist/esm/components/button/Button.styled.js +20 -20
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/model.d.ts +3 -3
- package/dist/esm/components/button/themes.d.ts +2 -2
- package/dist/esm/components/button/themes.js +31 -17
- package/dist/esm/components/button/themes.js.map +1 -1
- package/dist/esm/components/checkBox/CheckBox.d.ts +2 -1
- package/dist/esm/components/checkBox/CheckBox.js +124 -87
- package/dist/esm/components/checkBox/CheckBox.js.map +1 -1
- package/dist/esm/components/checkBox/CheckBox.styled.d.ts +1 -1
- package/dist/esm/components/checkBox/CheckBox.styled.js +10 -9
- package/dist/esm/components/checkBox/CheckBox.styled.js.map +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.js.map +1 -1
- package/dist/esm/components/country-code-picker/CountryPicker.d.ts +1 -1
- package/dist/esm/components/country-code-picker/CountryPicker.js.map +1 -1
- package/dist/esm/components/dropdown/Dropdown.js +67 -67
- package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.js +74 -61
- package/dist/esm/components/dropdown/DropdownPopover/index.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +183 -174
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +5 -4
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.d.ts +3 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +29 -20
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +3 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +93 -87
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +3 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +68 -61
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +2 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +7 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +3 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +18 -10
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +18 -18
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +1 -0
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +43 -17
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +2 -0
- package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +2 -0
- package/dist/esm/components/dropdown/type.d.ts +6 -1
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +3 -1
- package/dist/esm/components/dropdown-button/DropdownButton.js +71 -17
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.style.d.ts +9 -2
- package/dist/esm/components/dropdown-button/DropdownButton.style.js +35 -9
- package/dist/esm/components/dropdown-button/DropdownButton.style.js.map +1 -1
- package/dist/esm/components/dual-icon-button/DualIconButton.d.ts +3 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.js +53 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.js.map +1 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.d.ts +7 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.js +40 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.js.map +1 -0
- package/dist/esm/components/dual-icon-button/index.d.ts +2 -0
- package/dist/esm/components/dual-icon-button/model.d.ts +12 -0
- package/dist/esm/components/fab-menu/FABMenu.d.ts +1 -1
- package/dist/esm/components/fab-menu/FABMenu.js.map +1 -1
- package/dist/esm/components/icon-button/IconButton.js +36 -32
- package/dist/esm/components/icon-button/IconButton.js.map +1 -1
- package/dist/esm/components/icon-button/IconButton.styled.d.ts +3 -1
- package/dist/esm/components/icon-button/IconButton.styled.js +20 -14
- package/dist/esm/components/icon-button/IconButton.styled.js.map +1 -1
- package/dist/esm/components/icon-button/model.d.ts +12 -1
- package/dist/esm/components/icon-button/theme.js +12 -10
- package/dist/esm/components/icon-button/theme.js.map +1 -1
- package/dist/esm/components/input/Input.js +119 -115
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.model.d.ts +2 -3
- package/dist/esm/components/input/Input.styled.d.ts +8 -1
- package/dist/esm/components/input/Input.styled.js +34 -22
- package/dist/esm/components/input/Input.styled.js.map +1 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +0 -2
- package/dist/esm/components/input-with-vars/InputWithVariables.js +75 -81
- package/dist/esm/components/input-with-vars/InputWithVariables.js.map +1 -1
- package/dist/esm/components/list-item/List.model.d.ts +2 -1
- package/dist/esm/components/list-item/ListItem.js +40 -38
- package/dist/esm/components/list-item/ListItem.js.map +1 -1
- package/dist/esm/components/list-item/ListItem.styled.d.ts +2 -1
- package/dist/esm/components/list-item/ListItem.styled.js +8 -8
- package/dist/esm/components/list-item/ListItem.styled.js.map +1 -1
- package/dist/esm/components/list-item/themes.d.ts +2 -2
- package/dist/esm/components/list-item/themes.js +20 -6
- package/dist/esm/components/list-item/themes.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -0
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +30 -28
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.d.ts +1 -0
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +57 -54
- package/dist/esm/components/multi-level-dropdown/MenuItem.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.d.ts +1 -0
- package/dist/esm/components/multi-level-dropdown/MenuList.js +46 -42
- package/dist/esm/components/multi-level-dropdown/MenuList.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +95 -59
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +13 -3
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +50 -41
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/type.d.ts +1 -0
- package/dist/esm/components/tag/Tag.d.ts +1 -1
- package/dist/esm/components/tag/Tag.js +22 -18
- package/dist/esm/components/tag/Tag.js.map +1 -1
- package/dist/esm/components/tag/Tag.styled.d.ts +3 -1
- package/dist/esm/components/tag/Tag.styled.js +7 -7
- package/dist/esm/components/tag/Tag.styled.js.map +1 -1
- package/dist/esm/components/tag/model.d.ts +5 -1
- package/dist/esm/components/tag/model.js.map +1 -1
- package/dist/esm/components/variable-picker-v3/Content.js +69 -69
- package/dist/esm/components/variable-picker-v3/Content.js.map +1 -1
- package/dist/esm/components/variable-picker-v3/model.d.ts +0 -2
- package/dist/esm/components/variable-picker-v3/model.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNew.d.ts +2 -0
- package/dist/esm/components/whats-new/WhatsNew.js +23 -19
- package/dist/esm/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +2 -0
- package/dist/esm/components/whats-new/WhatsNewButton.js +34 -38
- package/dist/esm/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNewPanel.js.map +1 -1
- package/dist/esm/constants/Theme.d.ts +36 -0
- package/dist/esm/constants/Theme.js +21 -1
- package/dist/esm/constants/Theme.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +18 -19
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.js +0 -13
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/editor/BikEditor.types.d.ts +0 -14
- package/dist/esm/editor/BikEditor.types.js.map +1 -1
- package/dist/esm/editor/BikEditor.utils.js +75 -76
- package/dist/esm/editor/BikEditor.utils.js.map +1 -1
- package/dist/esm/editor/extensions/buildExtensions.d.ts +0 -1
- package/dist/esm/editor/extensions/buildExtensions.js +29 -31
- package/dist/esm/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/esm/editor/extensions/editorDropdown.styles.d.ts +8 -2
- package/dist/esm/editor/extensions/editorDropdown.styles.js +18 -22
- package/dist/esm/editor/extensions/editorDropdown.styles.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionDropdown.js +28 -34
- package/dist/esm/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionExtension.d.ts +2 -2
- package/dist/esm/editor/extensions/mention/MentionExtension.js +60 -81
- package/dist/esm/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.d.ts +1 -2
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.js +24 -28
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
- package/dist/esm/icons/index.d.ts +24 -24
- package/dist/esm/index.d.ts +1 -2
- package/dist/esm/index.js +798 -806
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -3
- package/dist/cjs/assets/icons/ManifestGlass.svg.js +0 -2
- package/dist/cjs/assets/icons/ManifestGlass.svg.js.map +0 -1
- package/dist/cjs/assets/icons/playOutline.svg.js +0 -2
- package/dist/cjs/assets/icons/playOutline.svg.js.map +0 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js +0 -2
- package/dist/cjs/components/agent-builder/AgentBuilder.js.map +0 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +0 -285
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js +0 -2
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +0 -2
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/AiTextArea.js +0 -2
- package/dist/cjs/components/agent-builder/components/AiTextArea.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/DiscardModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/DiscardModal.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/InstructionsField.js +0 -2
- package/dist/cjs/components/agent-builder/components/InstructionsField.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +0 -47
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/RichTextField.js +0 -2
- package/dist/cjs/components/agent-builder/components/RichTextField.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +0 -2
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/StepRail.js +0 -2
- package/dist/cjs/components/agent-builder/components/StepRail.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js +0 -2
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js.map +0 -1
- package/dist/cjs/components/agent-builder/constants/charLimits.js +0 -2
- package/dist/cjs/components/agent-builder/constants/charLimits.js.map +0 -1
- package/dist/cjs/components/agent-builder/constants/editorStyle.js +0 -2
- package/dist/cjs/components/agent-builder/constants/editorStyle.js.map +0 -1
- package/dist/cjs/components/agent-builder/constants/steps.js +0 -2
- package/dist/cjs/components/agent-builder/constants/steps.js.map +0 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +0 -2
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +0 -1
- package/dist/cjs/components/agent-builder/hooks/useAgentDraft.js +0 -2
- package/dist/cjs/components/agent-builder/hooks/useAgentDraft.js.map +0 -1
- package/dist/cjs/components/agent-builder/steps/Step1About.js +0 -2
- package/dist/cjs/components/agent-builder/steps/Step1About.js.map +0 -1
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +0 -2
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +0 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +0 -2
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +0 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +0 -2
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +0 -1
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +0 -4
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +0 -1
- package/dist/cjs/components/agent-listing/AgentListing.js +0 -2
- package/dist/cjs/components/agent-listing/AgentListing.js.map +0 -1
- package/dist/cjs/components/agent-listing/AgentListing.styled.js +0 -115
- package/dist/cjs/components/agent-listing/AgentListing.styled.js.map +0 -1
- package/dist/cjs/components/agent-listing/AgentListingFilters.js +0 -2
- package/dist/cjs/components/agent-listing/AgentListingFilters.js.map +0 -1
- package/dist/cjs/components/agent-listing/AgentListingHeader.js +0 -2
- package/dist/cjs/components/agent-listing/AgentListingHeader.js.map +0 -1
- package/dist/cjs/components/agent-listing/AgentTable.js +0 -2
- package/dist/cjs/components/agent-listing/AgentTable.js.map +0 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js +0 -2
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +0 -1
- package/dist/esm/assets/icons/ManifestGlass.svg.js +0 -6
- package/dist/esm/assets/icons/ManifestGlass.svg.js.map +0 -1
- package/dist/esm/assets/icons/playOutline.svg.js +0 -6
- package/dist/esm/assets/icons/playOutline.svg.js.map +0 -1
- package/dist/esm/components/agent-builder/AgentBuilder.d.ts +0 -18
- package/dist/esm/components/agent-builder/AgentBuilder.js +0 -190
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +0 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +0 -73
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +0 -121
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +0 -353
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +0 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.d.ts +0 -10
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +0 -70
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +0 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.d.ts +0 -12
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +0 -73
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +0 -1
- package/dist/esm/components/agent-builder/components/AiTextArea.d.ts +0 -14
- package/dist/esm/components/agent-builder/components/AiTextArea.js +0 -44
- package/dist/esm/components/agent-builder/components/AiTextArea.js.map +0 -1
- package/dist/esm/components/agent-builder/components/DiscardModal.d.ts +0 -18
- package/dist/esm/components/agent-builder/components/DiscardModal.js +0 -54
- package/dist/esm/components/agent-builder/components/DiscardModal.js.map +0 -1
- package/dist/esm/components/agent-builder/components/GoLiveModal.d.ts +0 -18
- package/dist/esm/components/agent-builder/components/GoLiveModal.js +0 -73
- package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +0 -1
- package/dist/esm/components/agent-builder/components/InstructionsField.d.ts +0 -2
- package/dist/esm/components/agent-builder/components/InstructionsField.js +0 -81
- package/dist/esm/components/agent-builder/components/InstructionsField.js.map +0 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +0 -12
- package/dist/esm/components/agent-builder/components/MentionPicker.js +0 -154
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +0 -1
- package/dist/esm/components/agent-builder/components/RichTextField.d.ts +0 -21
- package/dist/esm/components/agent-builder/components/RichTextField.js +0 -66
- package/dist/esm/components/agent-builder/components/RichTextField.js.map +0 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +0 -19
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +0 -79
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +0 -1
- package/dist/esm/components/agent-builder/components/StepRail.d.ts +0 -2
- package/dist/esm/components/agent-builder/components/StepRail.js +0 -35
- package/dist/esm/components/agent-builder/components/StepRail.js.map +0 -1
- package/dist/esm/components/agent-builder/components/StepSectionHeader.d.ts +0 -7
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js +0 -15
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js.map +0 -1
- package/dist/esm/components/agent-builder/constants/charLimits.d.ts +0 -21
- package/dist/esm/components/agent-builder/constants/charLimits.js +0 -18
- package/dist/esm/components/agent-builder/constants/charLimits.js.map +0 -1
- package/dist/esm/components/agent-builder/constants/editorStyle.d.ts +0 -8
- package/dist/esm/components/agent-builder/constants/editorStyle.js +0 -10
- package/dist/esm/components/agent-builder/constants/editorStyle.js.map +0 -1
- package/dist/esm/components/agent-builder/constants/steps.d.ts +0 -13
- package/dist/esm/components/agent-builder/constants/steps.js +0 -32
- package/dist/esm/components/agent-builder/constants/steps.js.map +0 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +0 -53
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +0 -118
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +0 -1
- package/dist/esm/components/agent-builder/hooks/useAgentDraft.d.ts +0 -24
- package/dist/esm/components/agent-builder/hooks/useAgentDraft.js +0 -27
- package/dist/esm/components/agent-builder/hooks/useAgentDraft.js.map +0 -1
- package/dist/esm/components/agent-builder/index.d.ts +0 -7
- package/dist/esm/components/agent-builder/steps/Step1About.d.ts +0 -2
- package/dist/esm/components/agent-builder/steps/Step1About.js +0 -43
- package/dist/esm/components/agent-builder/steps/Step1About.js.map +0 -1
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.d.ts +0 -2
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +0 -148
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +0 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.d.ts +0 -2
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +0 -112
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +0 -1
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +0 -2
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +0 -83
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +0 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +0 -55
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +0 -95
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +0 -1
- package/dist/esm/components/agent-listing/AgentListing.d.ts +0 -18
- package/dist/esm/components/agent-listing/AgentListing.js +0 -141
- package/dist/esm/components/agent-listing/AgentListing.js.map +0 -1
- package/dist/esm/components/agent-listing/AgentListing.model.d.ts +0 -69
- package/dist/esm/components/agent-listing/AgentListing.styled.d.ts +0 -56
- package/dist/esm/components/agent-listing/AgentListing.styled.js +0 -145
- package/dist/esm/components/agent-listing/AgentListing.styled.js.map +0 -1
- package/dist/esm/components/agent-listing/AgentListingFilters.d.ts +0 -16
- package/dist/esm/components/agent-listing/AgentListingFilters.js +0 -81
- package/dist/esm/components/agent-listing/AgentListingFilters.js.map +0 -1
- package/dist/esm/components/agent-listing/AgentListingHeader.d.ts +0 -8
- package/dist/esm/components/agent-listing/AgentListingHeader.js +0 -40
- package/dist/esm/components/agent-listing/AgentListingHeader.js.map +0 -1
- package/dist/esm/components/agent-listing/AgentTable.d.ts +0 -10
- package/dist/esm/components/agent-listing/AgentTable.js +0 -33
- package/dist/esm/components/agent-listing/AgentTable.js.map +0 -1
- package/dist/esm/components/agent-listing/AgentTableRow.d.ts +0 -10
- package/dist/esm/components/agent-listing/AgentTableRow.js +0 -88
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +0 -1
- package/dist/esm/components/agent-listing/index.d.ts +0 -2
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import A from "../../../assets/icons/cross.svg.js";
|
|
3
|
-
import w from "../../../assets/icons/plus.svg.js";
|
|
4
|
-
import T from "react";
|
|
5
|
-
import { RadioButton as g } from "../../radioButton/RadioButton.js";
|
|
6
|
-
import { TitleSmall as l, BodyCaption as d, BodySecondary as f } from "../../TypographyStyle.js";
|
|
7
|
-
import { COLORS as o } from "../../../constants/Theme.js";
|
|
8
|
-
import { CardRow as k, RadioCard as C, RadioCardText as v, FieldBlock as x, ChipWrap as R, IntentChip as B, ChipCloseButton as O, AddChipButton as D } from "../AgentBuilder.styled.js";
|
|
9
|
-
import { AiTextArea as E } from "../components/AiTextArea.js";
|
|
10
|
-
import { StepSectionHeader as H } from "../components/StepSectionHeader.js";
|
|
11
|
-
import { AGENT_CHAR_LIMITS as M } from "../constants/charLimits.js";
|
|
12
|
-
import { STEP_DEFINITIONS as F } from "../constants/steps.js";
|
|
13
|
-
import { useAgentBuilderContext as L } from "../context/AgentBuilderContext.js";
|
|
14
|
-
import { Dropdown as N } from "../../dropdown/Dropdown.js";
|
|
15
|
-
const y = F[1], Z = () => {
|
|
16
|
-
const { value: S, patch: r, availableIntents: m } = L(), { trigger: n } = S, [I, h] = T.useState(!1), a = (e) => r({ trigger: { ...n, mode: e } }), b = (e) => {
|
|
17
|
-
n.intents.includes(e) || r({
|
|
18
|
-
trigger: { ...n, intents: [...n.intents, e] }
|
|
19
|
-
}), h(!1);
|
|
20
|
-
}, _ = (e) => r({
|
|
21
|
-
trigger: {
|
|
22
|
-
...n,
|
|
23
|
-
intents: n.intents.filter((c) => c !== e)
|
|
24
|
-
}
|
|
25
|
-
}), u = (e) => m.find((c) => c.value === e)?.label ?? e, s = m.filter((e) => !n.intents.includes(e.value)).map((e) => ({ label: e.label, value: e.value }));
|
|
26
|
-
return /* @__PURE__ */ i("div", { children: [
|
|
27
|
-
/* @__PURE__ */ t(H, { title: y.title, helper: y.helper }),
|
|
28
|
-
/* @__PURE__ */ i(k, { children: [
|
|
29
|
-
/* @__PURE__ */ i(
|
|
30
|
-
C,
|
|
31
|
-
{
|
|
32
|
-
"data-test": "trigger-mode-manifest",
|
|
33
|
-
selected: n.mode === "manifest_intent",
|
|
34
|
-
onClick: () => a("manifest_intent"),
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ t(
|
|
37
|
-
g,
|
|
38
|
-
{
|
|
39
|
-
isActive: n.mode === "manifest_intent",
|
|
40
|
-
onValueChange: () => a("manifest_intent"),
|
|
41
|
-
skipSelectingOff: !0,
|
|
42
|
-
activeColor: o.content.brand
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
/* @__PURE__ */ i(v, { children: [
|
|
46
|
-
/* @__PURE__ */ t(l, { color: o.content.primary, children: "Manifest intent" }),
|
|
47
|
-
/* @__PURE__ */ t(d, { color: o.content.secondary, children: "Manifest's AI classifier routes conversations automatically — no keywords needed." })
|
|
48
|
-
] })
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ i(
|
|
53
|
-
C,
|
|
54
|
-
{
|
|
55
|
-
"data-test": "trigger-mode-custom",
|
|
56
|
-
selected: n.mode === "custom_intent",
|
|
57
|
-
onClick: () => a("custom_intent"),
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ t(
|
|
60
|
-
g,
|
|
61
|
-
{
|
|
62
|
-
isActive: n.mode === "custom_intent",
|
|
63
|
-
onValueChange: () => a("custom_intent"),
|
|
64
|
-
skipSelectingOff: !0,
|
|
65
|
-
activeColor: o.content.brand
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ i(v, { children: [
|
|
69
|
-
/* @__PURE__ */ t(l, { color: o.content.primary, children: "Custom intent" }),
|
|
70
|
-
/* @__PURE__ */ t(d, { color: o.content.secondary, children: "Define your own trigger — use exact phrases or describe the customer's intent." })
|
|
71
|
-
] })
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
] }),
|
|
76
|
-
n.mode === "manifest_intent" ? /* @__PURE__ */ i(x, { children: [
|
|
77
|
-
/* @__PURE__ */ t(l, { color: o.content.primary, children: "If customer talks about" }),
|
|
78
|
-
/* @__PURE__ */ i(R, { children: [
|
|
79
|
-
n.intents.map((e) => /* @__PURE__ */ i(B, { "data-test": `intent-chip-${e}`, children: [
|
|
80
|
-
/* @__PURE__ */ t(f, { color: o.content.primary, children: u(e) }),
|
|
81
|
-
/* @__PURE__ */ t(
|
|
82
|
-
O,
|
|
83
|
-
{
|
|
84
|
-
onClick: () => _(e),
|
|
85
|
-
"aria-label": `Remove ${u(e)}`,
|
|
86
|
-
children: /* @__PURE__ */ t(
|
|
87
|
-
A,
|
|
88
|
-
{
|
|
89
|
-
width: 14,
|
|
90
|
-
height: 14,
|
|
91
|
-
color: o.content.secondary
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
] }, e)),
|
|
97
|
-
I && s.length > 0 ? /* @__PURE__ */ t(
|
|
98
|
-
N,
|
|
99
|
-
{
|
|
100
|
-
"data-test": "intent-add-dropdown",
|
|
101
|
-
size: "small",
|
|
102
|
-
width: "200px",
|
|
103
|
-
placeHolder: "Select intent",
|
|
104
|
-
isSearchable: !0,
|
|
105
|
-
options: s,
|
|
106
|
-
onSelect: (e) => {
|
|
107
|
-
const p = (Array.isArray(e) ? e[0] : e)?.value;
|
|
108
|
-
p && b(p);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
) : s.length > 0 && /* @__PURE__ */ i(
|
|
112
|
-
D,
|
|
113
|
-
{
|
|
114
|
-
"data-test": "intent-add-button",
|
|
115
|
-
onClick: () => h(!0),
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ t(
|
|
118
|
-
w,
|
|
119
|
-
{
|
|
120
|
-
width: 16,
|
|
121
|
-
height: 16,
|
|
122
|
-
color: o.content.secondary
|
|
123
|
-
}
|
|
124
|
-
),
|
|
125
|
-
/* @__PURE__ */ t(f, { color: o.content.secondary, children: "Intent" })
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
)
|
|
129
|
-
] }),
|
|
130
|
-
/* @__PURE__ */ t(d, { color: o.content.secondary, children: "This agent takes over from your main assistant when this intent is detected. The changeover is automatic when you go live." })
|
|
131
|
-
] }) : /* @__PURE__ */ t(
|
|
132
|
-
E,
|
|
133
|
-
{
|
|
134
|
-
"data-test": "custom-intent",
|
|
135
|
-
label: "Describe the trigger",
|
|
136
|
-
value: n.customIntent ?? "",
|
|
137
|
-
onChange: (e) => r({ trigger: { ...n, customIntent: e } }),
|
|
138
|
-
maxLength: M.customIntent,
|
|
139
|
-
placeholder: "e.g. The customer wants to cancel an order they placed.",
|
|
140
|
-
minHeight: "120px"
|
|
141
|
-
}
|
|
142
|
-
)
|
|
143
|
-
] });
|
|
144
|
-
};
|
|
145
|
-
export {
|
|
146
|
-
Z as Step2WhenItStepsIn
|
|
147
|
-
};
|
|
148
|
-
//# sourceMappingURL=Step2WhenItStepsIn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Step2WhenItStepsIn.js","sources":["../../../../../src/components/agent-builder/steps/Step2WhenItStepsIn.tsx"],"sourcesContent":["import CrossIcon from '@src/assets/icons/cross.svg';\nimport PlusIcon from '@src/assets/icons/plus.svg';\nimport React from 'react';\nimport { Dropdown } from '@src/components/dropdown';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { RadioButton } from '@src/components/radioButton/RadioButton';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tTitleSmall,\n} from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { TriggerMode } from '../AgentBuilder.model';\nimport {\n\tAddChipButton,\n\tCardRow,\n\tChipCloseButton,\n\tChipWrap,\n\tFieldBlock,\n\tIntentChip,\n\tRadioCard,\n\tRadioCardText,\n} from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { AGENT_CHAR_LIMITS } from '../constants/charLimits';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[1];\n\nexport const Step2WhenItStepsIn: React.FC = () => {\n\tconst { value, patch, availableIntents } = useAgentBuilderContext();\n\tconst { trigger } = value;\n\tconst [adding, setAdding] = React.useState(false);\n\n\tconst setMode = (mode: TriggerMode) =>\n\t\tpatch({ trigger: { ...trigger, mode } });\n\n\tconst addIntent = (intentValue: string) => {\n\t\tif (!trigger.intents.includes(intentValue)) {\n\t\t\tpatch({\n\t\t\t\ttrigger: { ...trigger, intents: [...trigger.intents, intentValue] },\n\t\t\t});\n\t\t}\n\t\tsetAdding(false);\n\t};\n\n\tconst removeIntent = (intentValue: string) =>\n\t\tpatch({\n\t\t\ttrigger: {\n\t\t\t\t...trigger,\n\t\t\t\tintents: trigger.intents.filter((i) => i !== intentValue),\n\t\t\t},\n\t\t});\n\n\tconst labelFor = (v: string) =>\n\t\tavailableIntents.find((o) => o.value === v)?.label ?? v;\n\n\tconst remainingOptions: SingleOption[] = availableIntents\n\t\t.filter((o) => !trigger.intents.includes(o.value))\n\t\t.map((o) => ({ label: o.label, value: o.value }));\n\n\treturn (\n\t\t<div>\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<CardRow>\n\t\t\t\t<RadioCard\n\t\t\t\t\tdata-test=\"trigger-mode-manifest\"\n\t\t\t\t\tselected={trigger.mode === 'manifest_intent'}\n\t\t\t\t\tonClick={() => setMode('manifest_intent')}\n\t\t\t\t>\n\t\t\t\t\t<RadioButton\n\t\t\t\t\t\tisActive={trigger.mode === 'manifest_intent'}\n\t\t\t\t\t\tonValueChange={() => setMode('manifest_intent')}\n\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t/>\n\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\tManifest intent\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\tManifest's AI classifier routes conversations automatically —\n\t\t\t\t\t\t\tno keywords needed.\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t</RadioCardText>\n\t\t\t\t</RadioCard>\n\n\t\t\t\t<RadioCard\n\t\t\t\t\tdata-test=\"trigger-mode-custom\"\n\t\t\t\t\tselected={trigger.mode === 'custom_intent'}\n\t\t\t\t\tonClick={() => setMode('custom_intent')}\n\t\t\t\t>\n\t\t\t\t\t<RadioButton\n\t\t\t\t\t\tisActive={trigger.mode === 'custom_intent'}\n\t\t\t\t\t\tonValueChange={() => setMode('custom_intent')}\n\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t/>\n\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\tCustom intent\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\tDefine your own trigger — use exact phrases or describe the\n\t\t\t\t\t\t\tcustomer's intent.\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t</RadioCardText>\n\t\t\t\t</RadioCard>\n\t\t\t</CardRow>\n\n\t\t\t{trigger.mode === 'manifest_intent' ? (\n\t\t\t\t<FieldBlock>\n\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\tIf customer talks about\n\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t<ChipWrap>\n\t\t\t\t\t\t{trigger.intents.map((intent) => (\n\t\t\t\t\t\t\t<IntentChip key={intent} data-test={`intent-chip-${intent}`}>\n\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t{labelFor(intent)}\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t<ChipCloseButton\n\t\t\t\t\t\t\t\t\tonClick={() => removeIntent(intent)}\n\t\t\t\t\t\t\t\t\taria-label={`Remove ${labelFor(intent)}`}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CrossIcon\n\t\t\t\t\t\t\t\t\t\twidth={14}\n\t\t\t\t\t\t\t\t\t\theight={14}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ChipCloseButton>\n\t\t\t\t\t\t\t</IntentChip>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{adding && remainingOptions.length > 0 ? (\n\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\tdata-test=\"intent-add-dropdown\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\twidth=\"200px\"\n\t\t\t\t\t\t\t\tplaceHolder=\"Select intent\"\n\t\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\t\toptions={remainingOptions}\n\t\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\t\tconst single = Array.isArray(opt) ? opt[0] : opt;\n\t\t\t\t\t\t\t\t\tconst v = (single as SingleOption)?.value;\n\t\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\t\taddIntent(v);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tremainingOptions.length > 0 && (\n\t\t\t\t\t\t\t\t<AddChipButton\n\t\t\t\t\t\t\t\t\tdata-test=\"intent-add-button\"\n\t\t\t\t\t\t\t\t\tonClick={() => setAdding(true)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<PlusIcon\n\t\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\t\t\tIntent\n\t\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t</AddChipButton>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)}\n\t\t\t\t\t</ChipWrap>\n\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\tThis agent takes over from your main assistant when this intent is\n\t\t\t\t\t\tdetected. The changeover is automatic when you go live.\n\t\t\t\t\t</BodyCaption>\n\t\t\t\t</FieldBlock>\n\t\t\t) : (\n\t\t\t\t<AiTextArea\n\t\t\t\t\tdata-test=\"custom-intent\"\n\t\t\t\t\tlabel=\"Describe the trigger\"\n\t\t\t\t\tvalue={trigger.customIntent ?? ''}\n\t\t\t\t\tonChange={(text) =>\n\t\t\t\t\t\tpatch({ trigger: { ...trigger, customIntent: text } })\n\t\t\t\t\t}\n\t\t\t\t\tmaxLength={AGENT_CHAR_LIMITS.customIntent}\n\t\t\t\t\tplaceholder=\"e.g. The customer wants to cancel an order they placed.\"\n\t\t\t\t\tminHeight=\"120px\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step2WhenItStepsIn","value","patch","availableIntents","useAgentBuilderContext","trigger","adding","setAdding","React","setMode","mode","addIntent","intentValue","removeIntent","i","labelFor","v","o","remainingOptions","jsx","StepSectionHeader","CardRow","jsxs","RadioCard","RadioButton","COLORS","RadioCardText","TitleSmall","BodyCaption","FieldBlock","ChipWrap","intent","IntentChip","BodySecondary","ChipCloseButton","CrossIcon","Dropdown","opt","AddChipButton","PlusIcon","AiTextArea","text","AGENT_CHAR_LIMITS"],"mappings":";;;;;;;;;;;;;;AA6BA,MAAMA,IAAOC,EAAiB,CAAC,GAElBC,IAA+B,MAAM;AACjD,QAAM,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,EAAA,IAAq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IAEA,gBAAAN;AAAA,MAACqB;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,OAAM;AAAA,QACN,OAAOnC,EAAQ,gBAAgB;AAAA,QAC/B,UAAU,CAACoC,MACVvC,EAAM,EAAE,SAAS,EAAE,GAAGG,GAAS,cAAcoC,EAAA,GAAQ;AAAA,QAEtD,WAAWC,EAAkB;AAAA,QAC7B,aAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEF;AAEF;"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { TitleSmall as u } from "../../TypographyStyle.js";
|
|
3
|
-
import { COLORS as g } from "../../../constants/Theme.js";
|
|
4
|
-
import { Step3Grid as A, Step3Main as y, Step3Side as I, SideSection as O } from "../AgentBuilder.styled.js";
|
|
5
|
-
import { InstructionsField as N } from "../components/InstructionsField.js";
|
|
6
|
-
import { RichTextField as R } from "../components/RichTextField.js";
|
|
7
|
-
import { SelectableListSection as b } from "../components/SelectableListSection.js";
|
|
8
|
-
import { StepSectionHeader as _ } from "../components/StepSectionHeader.js";
|
|
9
|
-
import { AGENT_CHAR_LIMITS as H } from "../constants/charLimits.js";
|
|
10
|
-
import { STEP_DEFINITIONS as C } from "../constants/steps.js";
|
|
11
|
-
import { useAgentBuilderContext as E } from "../context/AgentBuilderContext.js";
|
|
12
|
-
import { Dropdown as F } from "../../dropdown/Dropdown.js";
|
|
13
|
-
const f = C[2], J = () => {
|
|
14
|
-
const {
|
|
15
|
-
value: t,
|
|
16
|
-
patch: r,
|
|
17
|
-
updateField: d,
|
|
18
|
-
removeReference: m,
|
|
19
|
-
availableTools: p,
|
|
20
|
-
availableSubAgents: c,
|
|
21
|
-
availableModels: i
|
|
22
|
-
} = E(), v = t.tools.map((e) => {
|
|
23
|
-
const o = p.find((a) => a.tool_id === e);
|
|
24
|
-
return o ? { id: e, label: o.displayName } : null;
|
|
25
|
-
}).filter((e) => e !== null), S = p.filter((e) => !t.tools.includes(e.tool_id)).map((e) => ({
|
|
26
|
-
label: e.displayName,
|
|
27
|
-
value: e.tool_id,
|
|
28
|
-
subText: e.description
|
|
29
|
-
})), h = t.subagents.map((e) => {
|
|
30
|
-
const o = c.find((a) => a.id === e);
|
|
31
|
-
return o ? { id: e, label: o.name } : null;
|
|
32
|
-
}).filter((e) => e !== null), T = c.filter((e) => !t.subagents.includes(e.id)).map((e) => ({ label: e.name, value: e.id })), x = i.map((e) => ({
|
|
33
|
-
label: e.label,
|
|
34
|
-
value: e.value,
|
|
35
|
-
selected: e.value === t.model
|
|
36
|
-
})), s = i.find((e) => e.value === t.model);
|
|
37
|
-
return /* @__PURE__ */ n("div", { className: "bik-agent-step bik-agent-step--response", children: [
|
|
38
|
-
/* @__PURE__ */ l(_, { title: f.title, helper: f.helper }),
|
|
39
|
-
/* @__PURE__ */ n(A, { children: [
|
|
40
|
-
/* @__PURE__ */ n(y, { children: [
|
|
41
|
-
/* @__PURE__ */ l(N, {}),
|
|
42
|
-
/* @__PURE__ */ l(
|
|
43
|
-
R,
|
|
44
|
-
{
|
|
45
|
-
"data-test": "agent-guardrail",
|
|
46
|
-
label: "Guardrails",
|
|
47
|
-
value: t.guardrail ?? "",
|
|
48
|
-
onChange: (e) => d("guardrail", e),
|
|
49
|
-
maxLength: H.guardrail,
|
|
50
|
-
placeholder: "Things this agent must never do.",
|
|
51
|
-
minHeight: "140px",
|
|
52
|
-
resetKey: t.id
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
] }),
|
|
56
|
-
/* @__PURE__ */ n(I, { children: [
|
|
57
|
-
/* @__PURE__ */ l(
|
|
58
|
-
b,
|
|
59
|
-
{
|
|
60
|
-
title: "Tools",
|
|
61
|
-
dataTestPrefix: "agent-tools",
|
|
62
|
-
items: v,
|
|
63
|
-
addableOptions: S,
|
|
64
|
-
emptyText: "No tools added yet.",
|
|
65
|
-
onAdd: (e) => r({ tools: [...t.tools, e] }),
|
|
66
|
-
onRemove: (e) => m("tool", e)
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ l(
|
|
70
|
-
b,
|
|
71
|
-
{
|
|
72
|
-
title: "Sub-agents",
|
|
73
|
-
dataTestPrefix: "agent-subagents",
|
|
74
|
-
items: h,
|
|
75
|
-
addableOptions: T,
|
|
76
|
-
emptyText: "No sub-agents added yet.",
|
|
77
|
-
onAdd: (e) => r({ subagents: [...t.subagents, e] }),
|
|
78
|
-
onRemove: (e) => m("subagent", e)
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
i.length > 0 && /* @__PURE__ */ n(O, { children: [
|
|
82
|
-
/* @__PURE__ */ l(u, { color: g.content.primary, children: "Advanced settings" }),
|
|
83
|
-
/* @__PURE__ */ l(u, { color: g.content.secondary, children: "Select AI model" }),
|
|
84
|
-
/* @__PURE__ */ l(
|
|
85
|
-
F,
|
|
86
|
-
{
|
|
87
|
-
"data-test": "agent-model",
|
|
88
|
-
size: "small",
|
|
89
|
-
width: "100%",
|
|
90
|
-
placeHolder: "Select model",
|
|
91
|
-
options: x,
|
|
92
|
-
defaultOptions: s ? [
|
|
93
|
-
{
|
|
94
|
-
label: s.label,
|
|
95
|
-
value: s.value
|
|
96
|
-
}
|
|
97
|
-
] : void 0,
|
|
98
|
-
onSelect: (e) => {
|
|
99
|
-
const a = (Array.isArray(e) ? e[0] : e)?.value;
|
|
100
|
-
a && d("model", a);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
] })
|
|
105
|
-
] })
|
|
106
|
-
] })
|
|
107
|
-
] });
|
|
108
|
-
};
|
|
109
|
-
export {
|
|
110
|
-
J as Step3HowItResponds
|
|
111
|
-
};
|
|
112
|
-
//# sourceMappingURL=Step3HowItResponds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Step3HowItResponds.js","sources":["../../../../../src/components/agent-builder/steps/Step3HowItResponds.tsx"],"sourcesContent":["import React from 'react';\nimport { Dropdown } from '@src/components/dropdown';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { TitleSmall } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tSideSection,\n\tStep3Grid,\n\tStep3Main,\n\tStep3Side,\n} from '../AgentBuilder.styled';\nimport { InstructionsField } from '../components/InstructionsField';\nimport { RichTextField } from '../components/RichTextField';\nimport {\n\tSelectableItem,\n\tSelectableListSection,\n} from '../components/SelectableListSection';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { AGENT_CHAR_LIMITS } from '../constants/charLimits';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[2];\n\nexport const Step3HowItResponds: React.FC = () => {\n\tconst {\n\t\tvalue,\n\t\tpatch,\n\t\tupdateField,\n\t\tremoveReference,\n\t\tavailableTools,\n\t\tavailableSubAgents,\n\t\tavailableModels,\n\t} = useAgentBuilderContext();\n\n\tconst toolItems: SelectableItem[] = value.tools\n\t\t.map((id): SelectableItem | null => {\n\t\t\tconst tool = availableTools.find((t) => t.tool_id === id);\n\t\t\treturn tool ? { id, label: tool.displayName } : null;\n\t\t})\n\t\t.filter((x): x is SelectableItem => x !== null);\n\n\tconst toolOptions: SingleOption[] = availableTools\n\t\t.filter((t) => !value.tools.includes(t.tool_id))\n\t\t.map((t) => ({\n\t\t\tlabel: t.displayName,\n\t\t\tvalue: t.tool_id,\n\t\t\tsubText: t.description,\n\t\t}));\n\n\tconst subAgentItems: SelectableItem[] = value.subagents\n\t\t.map((id): SelectableItem | null => {\n\t\t\tconst sub = availableSubAgents.find((s) => s.id === id);\n\t\t\treturn sub ? { id, label: sub.name } : null;\n\t\t})\n\t\t.filter((x): x is SelectableItem => x !== null);\n\n\tconst subAgentOptions: SingleOption[] = availableSubAgents\n\t\t.filter((s) => !value.subagents.includes(s.id))\n\t\t.map((s) => ({ label: s.name, value: s.id }));\n\n\tconst modelOptions: SingleOption[] = availableModels.map((m) => ({\n\t\tlabel: m.label,\n\t\tvalue: m.value,\n\t\tselected: m.value === value.model,\n\t}));\n\tconst selectedModel = availableModels.find((m) => m.value === value.model);\n\n\treturn (\n\t\t<div className=\"bik-agent-step bik-agent-step--response\">\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<Step3Grid>\n\t\t\t\t<Step3Main>\n\t\t\t\t\t<InstructionsField />\n\n\t\t\t\t\t<RichTextField\n\t\t\t\t\t\tdata-test=\"agent-guardrail\"\n\t\t\t\t\t\tlabel=\"Guardrails\"\n\t\t\t\t\t\tvalue={value.guardrail ?? ''}\n\t\t\t\t\t\tonChange={(text) => updateField('guardrail', text)}\n\t\t\t\t\t\tmaxLength={AGENT_CHAR_LIMITS.guardrail}\n\t\t\t\t\t\tplaceholder=\"Things this agent must never do.\"\n\t\t\t\t\t\tminHeight=\"140px\"\n\t\t\t\t\t\tresetKey={value.id}\n\t\t\t\t\t/>\n\t\t\t\t</Step3Main>\n\n\t\t\t\t<Step3Side>\n\t\t\t\t\t<SelectableListSection\n\t\t\t\t\t\ttitle=\"Tools\"\n\t\t\t\t\t\t// helper=\"Actions this agent can take while responding.\"\n\t\t\t\t\t\tdataTestPrefix=\"agent-tools\"\n\t\t\t\t\t\titems={toolItems}\n\t\t\t\t\t\taddableOptions={toolOptions}\n\t\t\t\t\t\temptyText=\"No tools added yet.\"\n\t\t\t\t\t\tonAdd={(id) => patch({ tools: [...value.tools, id] })}\n\t\t\t\t\t\tonRemove={(id) => removeReference('tool', id)}\n\t\t\t\t\t/>\n\n\t\t\t\t\t<SelectableListSection\n\t\t\t\t\t\ttitle=\"Sub-agents\"\n\t\t\t\t\t\t// helper=\"Other agents this agent can hand off the conversation to.\"\n\t\t\t\t\t\tdataTestPrefix=\"agent-subagents\"\n\t\t\t\t\t\titems={subAgentItems}\n\t\t\t\t\t\taddableOptions={subAgentOptions}\n\t\t\t\t\t\temptyText=\"No sub-agents added yet.\"\n\t\t\t\t\t\tonAdd={(id) => patch({ subagents: [...value.subagents, id] })}\n\t\t\t\t\t\tonRemove={(id) => removeReference('subagent', id)}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{availableModels.length > 0 && (\n\t\t\t\t\t\t<SideSection>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tAdvanced settings\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tSelect AI model\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\tdata-test=\"agent-model\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t\t\t\tplaceHolder=\"Select model\"\n\t\t\t\t\t\t\t\toptions={modelOptions}\n\t\t\t\t\t\t\t\tdefaultOptions={\n\t\t\t\t\t\t\t\t\tselectedModel\n\t\t\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: selectedModel.label,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: selectedModel.value,\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\t\tconst single = Array.isArray(opt) ? opt[0] : opt;\n\t\t\t\t\t\t\t\t\tconst v = (single as SingleOption)?.value;\n\t\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\t\tupdateField('model', v);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</SideSection>\n\t\t\t\t\t)}\n\t\t\t\t</Step3Side>\n\t\t\t</Step3Grid>\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step3HowItResponds","value","patch","updateField","removeReference","availableTools","availableSubAgents","availableModels","useAgentBuilderContext","toolItems","id","tool","t","x","toolOptions","subAgentItems","sub","s","subAgentOptions","modelOptions","m","selectedModel","jsxs","jsx","StepSectionHeader","Step3Grid","Step3Main","InstructionsField","RichTextField","text","AGENT_CHAR_LIMITS","Step3Side","SelectableListSection","SideSection","TitleSmall","COLORS","Dropdown","opt","v"],"mappings":";;;;;;;;;;;;AAsBA,MAAMA,IAAOC,EAAiB,CAAC,GAElBC,IAA+B,MAAM;AACjD,QAAM;AAAA,IACL,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACGC,EAAA,GAEEC,IAA8BR,EAAM,MACxC,IAAI,CAACS,MAA8B;AACnC,UAAMC,IAAON,EAAe,KAAK,CAACO,MAAMA,EAAE,YAAYF,CAAE;AACxD,WAAOC,IAAO,EAAE,IAAAD,GAAI,OAAOC,EAAK,gBAAgB;AAAA,EACjD,CAAC,EACA,OAAO,CAACE,MAA2BA,MAAM,IAAI,GAEzCC,IAA8BT,EAClC,OAAO,CAACO,MAAM,CAACX,EAAM,MAAM,SAASW,EAAE,OAAO,CAAC,EAC9C,IAAI,CAACA,OAAO;AAAA,IACZ,OAAOA,EAAE;AAAA,IACT,OAAOA,EAAE;AAAA,IACT,SAASA,EAAE;AAAA,EAAA,EACV,GAEGG,IAAkCd,EAAM,UAC5C,IAAI,CAACS,MAA8B;AACnC,UAAMM,IAAMV,EAAmB,KAAK,CAACW,MAAMA,EAAE,OAAOP,CAAE;AACtD,WAAOM,IAAM,EAAE,IAAAN,GAAI,OAAOM,EAAI,SAAS;AAAA,EACxC,CAAC,EACA,OA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AU,CAACA,MAAON,EAAgB,QAAQM,CAAE;AAAA,UAAA;AAAA,QAAA;AAAA,QAG7C,gBAAAa;AAAA,UAACS;AAAA,UAAA;AAAA,YACA,OAAM;AAAA,YAEN,gBAAe;AAAA,YACf,OAAOjB;AAAA,YACP,gBAAgBG;AAAA,YAChB,WAAU;AAAA,YACV,OAAO,CAACR,MAAOR,EAAM,EAAE,WAAW,CAAC,GAAGD,EAAM,WAAWS,CAAE,GAAG;AAAA,YAC5D,UAAU,CAACA,MAAON,EAAgB,YAAYM,CAAE;AAAA,UAAA;AAAA,QAAA;AAAA,QAGhDH,EAAgB,SAAS,KACzB,gBAAAe,EAACW,GAAA,EACA,UAAA;AAAA,UAAA,gBAAAV,EAACW,GAAA,EAAW,OAAOC,EAAO,QAAQ,SAAS,UAAA,qBAE3C;AAAA,4BACCD,GAAA,EAAW,OAAOC,EAAO,QAAQ,WAAW,UAAA,mBAE7C;AAAA,UACA,gBAAAZ;AAAA,YAACa;AAAA,YAAA;AAAA,cACA,aAAU;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cACN,aAAY;AAAA,cACZ,SAASjB;AAAA,cACT,gBACCE,IACG;AAAA,gBACA;AAAA,kBACC,OAAOA,EAAc;AAAA,kBACrB,OAAOA,EAAc;AAAA,gBAAA;AAAA,cACtB,IAEA;AAAA,cAEJ,UAAU,CAACgB,MAAQ;AAElB,sBAAMC,KADS,MAAM,QAAQD,CAAG,IAAIA,EAAI,CAAC,IAAIA,IACT;AACpC,gBAAIC,KACHnC,EAAY,SAASmC,CAAC;AAAA,cAExB;AAAA,YAAA;AAAA,UAAA;AAAA,QACD,EAAA,CACD;AAAA,MAAA,EAAA,CAEF;AAAA,IAAA,EAAA,CACD;AAAA,EAAA,GACD;AAEF;"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { RadioButton as d } from "../../radioButton/RadioButton.js";
|
|
3
|
-
import { TitleSmall as a, BodyCaption as l } from "../../TypographyStyle.js";
|
|
4
|
-
import { COLORS as n } from "../../../constants/Theme.js";
|
|
5
|
-
import { FieldBlock as f, CardRow as u, RadioCard as s, RadioCardText as h } from "../AgentBuilder.styled.js";
|
|
6
|
-
import { AiTextArea as v } from "../components/AiTextArea.js";
|
|
7
|
-
import { StepSectionHeader as g } from "../components/StepSectionHeader.js";
|
|
8
|
-
import { AGENT_CHAR_LIMITS as C } from "../constants/charLimits.js";
|
|
9
|
-
import { STEP_DEFINITIONS as S } from "../constants/steps.js";
|
|
10
|
-
import { useAgentBuilderContext as A } from "../context/AgentBuilderContext.js";
|
|
11
|
-
const m = S[3], O = () => {
|
|
12
|
-
const { value: p, patch: c } = A(), { handover: t } = p, r = (i) => c({ handover: { ...t, method: i } });
|
|
13
|
-
return /* @__PURE__ */ o("div", { className: "bik-agent-step bik-agent-step--handover", children: [
|
|
14
|
-
/* @__PURE__ */ e(g, { title: m.title, helper: m.helper }),
|
|
15
|
-
/* @__PURE__ */ e(
|
|
16
|
-
v,
|
|
17
|
-
{
|
|
18
|
-
"data-test": "handover-when",
|
|
19
|
-
label: "Handover when",
|
|
20
|
-
value: t.when,
|
|
21
|
-
onChange: (i) => c({ handover: { ...t, when: i } }),
|
|
22
|
-
maxLength: C.handoverWhen,
|
|
23
|
-
placeholder: "e.g. Hand over if the customer is angry or requests a human agent.",
|
|
24
|
-
minHeight: "120px"
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ o(f, { children: [
|
|
28
|
-
/* @__PURE__ */ e(a, { color: n.content.primary, children: "Handover method" }),
|
|
29
|
-
/* @__PURE__ */ o(u, { children: [
|
|
30
|
-
/* @__PURE__ */ o(
|
|
31
|
-
s,
|
|
32
|
-
{
|
|
33
|
-
"data-test": "handover-method-default",
|
|
34
|
-
selected: t.method === "default",
|
|
35
|
-
onClick: () => r("default"),
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
-
d,
|
|
39
|
-
{
|
|
40
|
-
isActive: t.method === "default",
|
|
41
|
-
onValueChange: () => r("default"),
|
|
42
|
-
skipSelectingOff: !0,
|
|
43
|
-
activeColor: n.content.brand
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ o(h, { children: [
|
|
47
|
-
/* @__PURE__ */ e(a, { color: n.content.primary, children: "Use default settings" }),
|
|
48
|
-
/* @__PURE__ */ e(l, { color: n.content.secondary, children: "Defined in Customize > Agent handover" })
|
|
49
|
-
] })
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
/* @__PURE__ */ o(
|
|
54
|
-
s,
|
|
55
|
-
{
|
|
56
|
-
"data-test": "handover-method-specific",
|
|
57
|
-
selected: t.method === "specific_channels",
|
|
58
|
-
onClick: () => r("specific_channels"),
|
|
59
|
-
children: [
|
|
60
|
-
/* @__PURE__ */ e(
|
|
61
|
-
d,
|
|
62
|
-
{
|
|
63
|
-
isActive: t.method === "specific_channels",
|
|
64
|
-
onValueChange: () => r("specific_channels"),
|
|
65
|
-
skipSelectingOff: !0,
|
|
66
|
-
activeColor: n.content.brand
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ o(h, { children: [
|
|
70
|
-
/* @__PURE__ */ e(a, { color: n.content.primary, children: "Choose specific channels" }),
|
|
71
|
-
/* @__PURE__ */ e(l, { color: n.content.secondary, children: "Always hands over regardless of business hours." })
|
|
72
|
-
] })
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
] })
|
|
77
|
-
] })
|
|
78
|
-
] });
|
|
79
|
-
};
|
|
80
|
-
export {
|
|
81
|
-
O as Step4HandoverRules
|
|
82
|
-
};
|
|
83
|
-
//# sourceMappingURL=Step4HandoverRules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Step4HandoverRules.js","sources":["../../../../../src/components/agent-builder/steps/Step4HandoverRules.tsx"],"sourcesContent":["import React from 'react';\nimport { RadioButton } from '@src/components/radioButton/RadioButton';\nimport { BodyCaption, TitleSmall } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { HandoverMethod } from '../AgentBuilder.model';\nimport {\n\tCardRow,\n\tFieldBlock,\n\tRadioCard,\n\tRadioCardText,\n} from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { AGENT_CHAR_LIMITS } from '../constants/charLimits';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[3];\n\nexport const Step4HandoverRules: React.FC = () => {\n\tconst { value, patch } = useAgentBuilderContext();\n\tconst { handover } = value;\n\n\tconst setMethod = (method: HandoverMethod) =>\n\t\tpatch({ handover: { ...handover, method } });\n\n\treturn (\n\t\t<div className=\"bik-agent-step bik-agent-step--handover\">\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<AiTextArea\n\t\t\t\tdata-test=\"handover-when\"\n\t\t\t\tlabel=\"Handover when\"\n\t\t\t\tvalue={handover.when}\n\t\t\t\tonChange={(text) => patch({ handover: { ...handover, when: text } })}\n\t\t\t\tmaxLength={AGENT_CHAR_LIMITS.handoverWhen}\n\t\t\t\tplaceholder=\"e.g. Hand over if the customer is angry or requests a human agent.\"\n\t\t\t\tminHeight=\"120px\"\n\t\t\t/>\n\n\t\t\t<FieldBlock>\n\t\t\t\t<TitleSmall color={COLORS.content.primary}>Handover method</TitleSmall>\n\t\t\t\t<CardRow>\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"handover-method-default\"\n\t\t\t\t\t\tselected={handover.method === 'default'}\n\t\t\t\t\t\tonClick={() => setMethod('default')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={handover.method === 'default'}\n\t\t\t\t\t\t\tonValueChange={() => setMethod('default')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tUse default settings\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tDefined in Customize > Agent handover\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"handover-method-specific\"\n\t\t\t\t\t\tselected={handover.method === 'specific_channels'}\n\t\t\t\t\t\tonClick={() => setMethod('specific_channels')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={handover.method === 'specific_channels'}\n\t\t\t\t\t\t\tonValueChange={() => setMethod('specific_channels')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tChoose specific channels\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tAlways hands over regardless of business hours.\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\t\t\t\t</CardRow>\n\t\t\t</FieldBlock>\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step4HandoverRules","value","patch","useAgentBuilderContext","handover","setMethod","method","jsxs","jsx","StepSectionHeader","AiTextArea","text","AGENT_CHAR_LIMITS","FieldB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gBAAA,gBAAAX,EAACM,GAAA,EAAW,OAAOC,EAAO,QAAQ,SAAS,UAAA,wBAE3C;AAAA,kCACCK,GAAA,EAAY,OAAOL,EAAO,QAAQ,WAAW,UAAA,wCAAA,CAE9C;AAAA,cAAA,EAAA,CACD;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAGD,gBAAAR;AAAA,UAACU;AAAA,UAAA;AAAA,YACA,aAAU;AAAA,YACV,UAAUb,EAAS,WAAW;AAAA,YAC9B,SAAS,MAAMC,EAAU,mBAAmB;AAAA,YAE5C,UAAA;AAAA,cAAA,gBAAAG;AAAA,gBAACU;AAAA,gBAAA;AAAA,kBACA,UAAUd,EAAS,WAAW;AAAA,kBAC9B,eAAe,MAAMC,EAAU,mBAAmB;AAAA,kBAClD,kBAAgB;AAAA,kBAChB,aAAaU,EAAO,QAAQ;AAAA,gBAAA;AAAA,cAAA;AAAA,gCAE5BI,GAAA,EACA,UAAA;AAAA,gBAAA,gBAAAX,EAACM,GAAA,EAAW,OAAOC,EAAO,QAAQ,SAAS,UAAA,4BAE3C;AAAA,kCACCK,GAAA,EAAY,OAAOL,EAAO,QAAQ,WAAW,UAAA,kDAAA,CAE9C;AAAA,cAAA,EAAA,CACD;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACD,EAAA,CACD;AAAA,IAAA,EAAA,CACD;AAAA,EAAA,GACD;AAEF;"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ApplicationType } from '@bikdotai/bik-models/growth';
|
|
2
|
-
import { MentionItem } from '../../../editor';
|
|
3
|
-
import { AgentTool, SubAgentRef } from '../AgentBuilder.model';
|
|
4
|
-
/**
|
|
5
|
-
* Serialization helpers between the BikEditor document and the firebase
|
|
6
|
-
* `instructions` string.
|
|
7
|
-
*
|
|
8
|
-
* Firebase stores `instructions` as PLAIN TEXT with inline reference tokens:
|
|
9
|
-
* - `{{subagent:<agentId>}}` — hand-off to another agent
|
|
10
|
-
* - `{{tool:<function_key>}}` — an action the agent can call
|
|
11
|
-
* - `{{<variableName>}}` — a template variable
|
|
12
|
-
*
|
|
13
|
-
* In the editor those references are inserted via the `@` mention menu (which we
|
|
14
|
-
* populate with BOTH tools and sub-agents). Mention nodes keep their `id` in the
|
|
15
|
-
* ProseMirror doc JSON (the rendered HTML drops it), so we serialize from the doc
|
|
16
|
-
* JSON — not from HTML.
|
|
17
|
-
*/
|
|
18
|
-
export interface MentionKindMeta {
|
|
19
|
-
/** Distinguishes a tool reference from a sub-agent reference. */
|
|
20
|
-
kind: 'tool' | 'subagent';
|
|
21
|
-
/** For tools: the function_key used in the `{{tool:KEY}}` token. */
|
|
22
|
-
functionKey?: string;
|
|
23
|
-
/** Plain item name (no prefix) shown in the picker dropdown rows. */
|
|
24
|
-
plainLabel?: string;
|
|
25
|
-
/** For tools: the source bucket (manifest / shopify / …) the picker groups by. */
|
|
26
|
-
source?: string;
|
|
27
|
-
}
|
|
28
|
-
/** Display labels for the known tool sources (drives picker headers + chip prefix). */
|
|
29
|
-
export declare const TOOL_SOURCE_LABELS: Record<string, string>;
|
|
30
|
-
/** Human label for a tool source; falls back to the host-app label, then the raw key. */
|
|
31
|
-
export declare const toolSourceLabel: (source: string | undefined, fallback?: string) => string;
|
|
32
|
-
/** Human label for the host application, used as the tool-chip prefix. */
|
|
33
|
-
export declare const appTypeLabel: (applicationType?: ApplicationType) => string;
|
|
34
|
-
/**
|
|
35
|
-
* Build the combined `@` mention list from the available tools + sub-agents.
|
|
36
|
-
*
|
|
37
|
-
* The `label` is the CHIP text shown once inserted — tools read
|
|
38
|
-
* `"<App> : <tool name>"` (e.g. "Manifest : Look up order"), sub-agents read
|
|
39
|
-
* `"sub-agent: <name>"`. `meta.plainLabel` is the un-prefixed name for the
|
|
40
|
-
* picker rows, and `meta.kind` drives the `{{tool}}` / `{{subagent}}` colour.
|
|
41
|
-
*/
|
|
42
|
-
export declare const buildAgentMentionItems: (tools: AgentTool[], subAgents: SubAgentRef[], appLabel?: string) => MentionItem[];
|
|
43
|
-
/**
|
|
44
|
-
* Convert the stored instructions string into HTML for `BikEditor.initialContent`.
|
|
45
|
-
* `{{tool:KEY}}` / `{{subagent:ID}}` tokens are rehydrated into mention chips
|
|
46
|
-
* (resolved via `mentionItems`); any other `{{…}}` token is left as literal text
|
|
47
|
-
* for the editor's variable decoration. Newlines become paragraph / line breaks.
|
|
48
|
-
*/
|
|
49
|
-
export declare const instructionsToEditorHtml: (text: string, mentionItems?: MentionItem[]) => string;
|
|
50
|
-
/**
|
|
51
|
-
* Convert a BikEditor document (from `ref.getJSON()`) into the firebase
|
|
52
|
-
* instructions string, replacing mention nodes with `{{subagent:ID}}` /
|
|
53
|
-
* `{{tool:KEY}}` tokens.
|
|
54
|
-
*/
|
|
55
|
-
export declare const editorDocToInstructions: (doc: Record<string, unknown> | null, tools: AgentTool[]) => string;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
const p = {
|
|
2
|
-
manifest: "Manifest",
|
|
3
|
-
shopify: "Shopify",
|
|
4
|
-
integration: "Integration"
|
|
5
|
-
}, d = (t, i = "Manifest") => t ? p[t] ?? t : i, k = (t) => {
|
|
6
|
-
const i = t ? String(t) : "";
|
|
7
|
-
return i === "BIK" ? "BIK" : i === "BSP" ? "BSP" : "Manifest";
|
|
8
|
-
}, y = (t, i, e = "Manifest") => [
|
|
9
|
-
...t.map(
|
|
10
|
-
(n) => ({
|
|
11
|
-
id: n.tool_id,
|
|
12
|
-
label: `${d(n.source, e)} : ${n.displayName}`,
|
|
13
|
-
meta: {
|
|
14
|
-
kind: "tool",
|
|
15
|
-
functionKey: n.function_key,
|
|
16
|
-
plainLabel: n.displayName,
|
|
17
|
-
source: n.source
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
),
|
|
21
|
-
...i.map(
|
|
22
|
-
(n) => ({
|
|
23
|
-
id: n.id,
|
|
24
|
-
label: `sub-agent: ${n.name}`,
|
|
25
|
-
meta: { kind: "subagent", plainLabel: n.name }
|
|
26
|
-
})
|
|
27
|
-
)
|
|
28
|
-
], o = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), s = (t) => o(t).replace(/"/g, """), m = (t, i, e) => `<span data-type="mentionAgent" class="bik-mention bik-mention--agent" data-id="${s(t)}" data-label="${s(i)}" data-kind="${s(e)}">${o(i)}</span>`, f = (t) => {
|
|
29
|
-
const i = /* @__PURE__ */ new Map();
|
|
30
|
-
for (const e of t) {
|
|
31
|
-
const n = e.meta;
|
|
32
|
-
n?.kind === "tool" && n.functionKey ? i.set(`tool:${n.functionKey}`, e) : n?.kind === "subagent" && i.set(`subagent:${String(e.id)}`, e);
|
|
33
|
-
}
|
|
34
|
-
return i;
|
|
35
|
-
}, l = /\{\{(tool:[^}]+|subagent:[^}]+)\}\}/g, g = (t, i) => {
|
|
36
|
-
let e = "", n = 0;
|
|
37
|
-
l.lastIndex = 0;
|
|
38
|
-
let a;
|
|
39
|
-
for (; (a = l.exec(t)) !== null; ) {
|
|
40
|
-
e += o(t.slice(n, a.index));
|
|
41
|
-
const r = i.get(a[1]);
|
|
42
|
-
if (r) {
|
|
43
|
-
const u = r.meta.kind;
|
|
44
|
-
e += m(String(r.id), r.label, u);
|
|
45
|
-
} else
|
|
46
|
-
e += o(a[0]);
|
|
47
|
-
n = l.lastIndex;
|
|
48
|
-
}
|
|
49
|
-
return e += o(t.slice(n)), e.replace(/\n/g, "<br>");
|
|
50
|
-
}, $ = (t, i = []) => {
|
|
51
|
-
if (!t)
|
|
52
|
-
return "";
|
|
53
|
-
const e = f(i);
|
|
54
|
-
return t.split(/\n{2,}/).map((n) => `<p>${g(n, e)}</p>`).join("");
|
|
55
|
-
}, b = (t, i) => {
|
|
56
|
-
const e = i[t];
|
|
57
|
-
return e ? `{{tool:${e}}}` : `{{subagent:${t}}}`;
|
|
58
|
-
}, c = (t, i) => {
|
|
59
|
-
switch (t.type) {
|
|
60
|
-
case "text":
|
|
61
|
-
return t.text ?? "";
|
|
62
|
-
case "mentionAgent":
|
|
63
|
-
case "mentionTeam": {
|
|
64
|
-
const e = t.attrs?.id;
|
|
65
|
-
return e == null ? "" : b(String(e), i);
|
|
66
|
-
}
|
|
67
|
-
case "variable":
|
|
68
|
-
return `{{${String(t.attrs?.variableName ?? "")}}}`;
|
|
69
|
-
case "hardBreak":
|
|
70
|
-
return `
|
|
71
|
-
`;
|
|
72
|
-
default: {
|
|
73
|
-
const e = (t.content ?? []).map((a) => c(a, i)).join("");
|
|
74
|
-
return ["paragraph", "heading", "listItem", "blockquote"].includes(t.type) ? `${e}
|
|
75
|
-
` : e;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, S = (t, i) => {
|
|
79
|
-
if (!t)
|
|
80
|
-
return "";
|
|
81
|
-
const e = i.reduce((n, a) => (n[a.tool_id] = a.function_key, n), {});
|
|
82
|
-
return c(t, e).replace(
|
|
83
|
-
/\n+$/,
|
|
84
|
-
""
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
export {
|
|
88
|
-
p as TOOL_SOURCE_LABELS,
|
|
89
|
-
k as appTypeLabel,
|
|
90
|
-
y as buildAgentMentionItems,
|
|
91
|
-
S as editorDocToInstructions,
|
|
92
|
-
$ as instructionsToEditorHtml,
|
|
93
|
-
d as toolSourceLabel
|
|
94
|
-
};
|
|
95
|
-
//# sourceMappingURL=mentionSerialization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mentionSerialization.js","sources":["../../../../../src/components/agent-builder/utils/mentionSerialization.ts"],"sourcesContent":["import type { ApplicationType } from '@bikdotai/bik-models/growth';\nimport { MentionItem } from '@src/editor';\nimport { AgentTool, SubAgentRef } from '../AgentBuilder.model';\n\n/**\n * Serialization helpers between the BikEditor document and the firebase\n * `instructions` string.\n *\n * Firebase stores `instructions` as PLAIN TEXT with inline reference tokens:\n * - `{{subagent:<agentId>}}` — hand-off to another agent\n * - `{{tool:<function_key>}}` — an action the agent can call\n * - `{{<variableName>}}` — a template variable\n *\n * In the editor those references are inserted via the `@` mention menu (which we\n * populate with BOTH tools and sub-agents). Mention nodes keep their `id` in the\n * ProseMirror doc JSON (the rendered HTML drops it), so we serialize from the doc\n * JSON — not from HTML.\n */\n\nexport interface MentionKindMeta {\n\t/** Distinguishes a tool reference from a sub-agent reference. */\n\tkind: 'tool' | 'subagent';\n\t/** For tools: the function_key used in the `{{tool:KEY}}` token. */\n\tfunctionKey?: string;\n\t/** Plain item name (no prefix) shown in the picker dropdown rows. */\n\tplainLabel?: string;\n\t/** For tools: the source bucket (manifest / shopify / …) the picker groups by. */\n\tsource?: string;\n}\n\n/** Display labels for the known tool sources (drives picker headers + chip prefix). */\nexport const TOOL_SOURCE_LABELS: Record<string, string> = {\n\tmanifest: 'Manifest',\n\tshopify: 'Shopify',\n\tintegration: 'Integration',\n};\n\n/** Human label for a tool source; falls back to the host-app label, then the raw key. */\nexport const toolSourceLabel = (\n\tsource: string | undefined,\n\tfallback = 'Manifest',\n): string => {\n\tif (!source) {\n\t\treturn fallback;\n\t}\n\treturn TOOL_SOURCE_LABELS[source] ?? source;\n};\n\n/** Human label for the host application, used as the tool-chip prefix. */\nexport const appTypeLabel = (applicationType?: ApplicationType): string => {\n\tconst key = applicationType ? String(applicationType) : '';\n\tif (key === 'BIK') {\n\t\treturn 'BIK';\n\t}\n\tif (key === 'BSP') {\n\t\treturn 'BSP';\n\t}\n\treturn 'Manifest';\n};\n\n/**\n * Build the combined `@` mention list from the available tools + sub-agents.\n *\n * The `label` is the CHIP text shown once inserted — tools read\n * `\"<App> : <tool name>\"` (e.g. \"Manifest : Look up order\"), sub-agents read\n * `\"sub-agent: <name>\"`. `meta.plainLabel` is the un-prefixed name for the\n * picker rows, and `meta.kind` drives the `{{tool}}` / `{{subagent}}` colour.\n */\nexport const buildAgentMentionItems = (\n\ttools: AgentTool[],\n\tsubAgents: SubAgentRef[],\n\tappLabel = 'Manifest',\n): MentionItem[] => [\n\t...tools.map(\n\t\t(t): MentionItem => ({\n\t\t\tid: t.tool_id,\n\t\t\tlabel: `${toolSourceLabel(t.source, appLabel)} : ${t.displayName}`,\n\t\t\tmeta: {\n\t\t\t\tkind: 'tool',\n\t\t\t\tfunctionKey: t.function_key,\n\t\t\t\tplainLabel: t.displayName,\n\t\t\t\tsource: t.source,\n\t\t\t},\n\t\t}),\n\t),\n\t...subAgents.map(\n\t\t(s): MentionItem => ({\n\t\t\tid: s.id,\n\t\t\tlabel: `sub-agent: ${s.name}`,\n\t\t\tmeta: { kind: 'subagent', plainLabel: s.name },\n\t\t}),\n\t),\n];\n\nconst escapeHtml = (raw: string): string =>\n\traw.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n\nconst escapeAttr = (raw: string): string =>\n\tescapeHtml(raw).replace(/\"/g, '"');\n\n/**\n * The HTML for a single mention chip. Must round-trip through the TipTap mention\n * extension's `parseHTML` (`span[data-type=\"mentionAgent\"]`, reading\n * `data-id`/`data-label`/`data-kind`) — see MentionExtension.ts. `normalizeHtml`\n * is taught to keep `data-type=\"mention…\"` spans so this survives to the parser.\n */\nconst mentionSpanHtml = (id: string, label: string, kind: string): string =>\n\t`<span data-type=\"mentionAgent\" class=\"bik-mention bik-mention--agent\"` +\n\t` data-id=\"${escapeAttr(id)}\" data-label=\"${escapeAttr(label)}\"` +\n\t` data-kind=\"${escapeAttr(kind)}\">${escapeHtml(label)}</span>`;\n\n/** `{{tool:KEY}}` / `{{subagent:ID}}` → the mention item that produced them. */\nconst buildTokenLookup = (\n\tmentionItems: MentionItem[],\n): Map<string, MentionItem> => {\n\tconst byToken = new Map<string, MentionItem>();\n\tfor (const item of mentionItems) {\n\t\tconst meta = item.meta as unknown as MentionKindMeta | undefined;\n\t\tif (meta?.kind === 'tool' && meta.functionKey) {\n\t\t\tbyToken.set(`tool:${meta.functionKey}`, item);\n\t\t} else if (meta?.kind === 'subagent') {\n\t\t\tbyToken.set(`subagent:${String(item.id)}`, item);\n\t\t}\n\t}\n\treturn byToken;\n};\n\n// Matches the reference tokens we render as chips. Other `{{var}}` tokens fall\n// through untouched (left as literal text for the variable decoration).\nconst REFERENCE_TOKEN = /\\{\\{(tool:[^}]+|subagent:[^}]+)\\}\\}/g;\n\n/** Escape plain text, swapping recognised reference tokens for mention spans. */\nconst inlineToHtml = (\n\tsegment: string,\n\tbyToken: Map<string, MentionItem>,\n): string => {\n\tlet out = '';\n\tlet lastIndex = 0;\n\tREFERENCE_TOKEN.lastIndex = 0;\n\tlet match: RegExpExecArray | null;\n\twhile ((match = REFERENCE_TOKEN.exec(segment)) !== null) {\n\t\tout += escapeHtml(segment.slice(lastIndex, match.index));\n\t\tconst item = byToken.get(match[1]);\n\t\tif (item) {\n\t\t\tconst kind = (item.meta as unknown as MentionKindMeta).kind;\n\t\t\tout += mentionSpanHtml(String(item.id), item.label, kind);\n\t\t} else {\n\t\t\t// Tool/sub-agent no longer in the available list → keep the raw token.\n\t\t\tout += escapeHtml(match[0]);\n\t\t}\n\t\tlastIndex = REFERENCE_TOKEN.lastIndex;\n\t}\n\tout += escapeHtml(segment.slice(lastIndex));\n\treturn out.replace(/\\n/g, '<br>');\n};\n\n/**\n * Convert the stored instructions string into HTML for `BikEditor.initialContent`.\n * `{{tool:KEY}}` / `{{subagent:ID}}` tokens are rehydrated into mention chips\n * (resolved via `mentionItems`); any other `{{…}}` token is left as literal text\n * for the editor's variable decoration. Newlines become paragraph / line breaks.\n */\nexport const instructionsToEditorHtml = (\n\ttext: string,\n\tmentionItems: MentionItem[] = [],\n): string => {\n\tif (!text) {\n\t\treturn '';\n\t}\n\tconst byToken = buildTokenLookup(mentionItems);\n\treturn text\n\t\t.split(/\\n{2,}/)\n\t\t.map((para) => `<p>${inlineToHtml(para, byToken)}</p>`)\n\t\t.join('');\n};\n\ninterface ProseMirrorNode {\n\ttype: string;\n\ttext?: string;\n\tattrs?: Record<string, unknown>;\n\tcontent?: ProseMirrorNode[];\n}\n\n/** Map of mention node id → token, derived from the available tools. */\nconst resolveMentionToken = (\n\tid: string,\n\ttoolKeyById: Record<string, string>,\n): string => {\n\tconst functionKey = toolKeyById[id];\n\tif (functionKey) {\n\t\treturn `{{tool:${functionKey}}}`;\n\t}\n\treturn `{{subagent:${id}}}`;\n};\n\nconst nodeToText = (\n\tnode: ProseMirrorNode,\n\ttoolKeyById: Record<string, string>,\n): string => {\n\tswitch (node.type) {\n\t\tcase 'text':\n\t\t\treturn node.text ?? '';\n\t\tcase 'mentionAgent':\n\t\tcase 'mentionTeam': {\n\t\t\tconst id = node.attrs?.['id'];\n\t\t\treturn id == null ? '' : resolveMentionToken(String(id), toolKeyById);\n\t\t}\n\t\tcase 'variable':\n\t\t\treturn `{{${String(node.attrs?.['variableName'] ?? '')}}}`;\n\t\tcase 'hardBreak':\n\t\t\treturn '\\n';\n\t\tdefault: {\n\t\t\tconst inner = (node.content ?? [])\n\t\t\t\t.map((child) => nodeToText(child, toolKeyById))\n\t\t\t\t.join('');\n\t\t\t// Block nodes terminate with a newline so paragraphs stay separated.\n\t\t\tconst BLOCK_NODES = ['paragraph', 'heading', 'listItem', 'blockquote'];\n\t\t\treturn BLOCK_NODES.includes(node.type) ? `${inner}\\n` : inner;\n\t\t}\n\t}\n};\n\n/**\n * Convert a BikEditor document (from `ref.getJSON()`) into the firebase\n * instructions string, replacing mention nodes with `{{subagent:ID}}` /\n * `{{tool:KEY}}` tokens.\n */\nexport const editorDocToInstructions = (\n\tdoc: Record<string, unknown> | null,\n\ttools: AgentTool[],\n): string => {\n\tif (!doc) {\n\t\treturn '';\n\t}\n\tconst toolKeyById = tools.reduce<Record<string, string>>((acc, t) => {\n\t\tacc[t.tool_id] = t.function_key;\n\t\treturn acc;\n\t}, {});\n\treturn nodeToText(doc as unknown as ProseMirrorNode, toolKeyById).replace(\n\t\t/\\n+$/,\n\t\t'',\n\t);\n};\n"],"names":["TOOL_SOURCE_LABELS","toolSourceLabel","source","fallback","appTypeLabel","applicationType","key","buildAgentMentionItems","tools","subAgents","appLabel","t","s","escapeHtml","raw","escapeAttr","mentionSpanHtml","id","label","kind","buildTokenLookup","mentionItems","byToken","item","meta","REFERENCE_TOKEN","inlineToHtml","segment","out","lastIndex","match","instructionsToEditorHtml","text","para","resolveMentionToken","toolKeyById","functionKey","nodeToText","node","inner","child","editorDocToInstructions","doc","acc"],"mappings":"AA+BO,MAAMA,IAA6C;AAAA,EACzD,UAAU;AAAA,EACV,SAAS;AAAA,EACT,aAAa;AACd,GAGaC,IAAkB,CAC9BC,GACAC,IAAW,eAEND,IAGEF,EAAmBE,CAAM,KAAKA,IAF7BC,GAMIC,IAAe,CAACC,MAA8C;AAC1E,QAAMC,IAAMD,IAAkB,OAAOA,CAAe,IAAI;AACxD,SAAIC,MAAQ,QACJ,QAEJA,MAAQ,QACJ,QAED;AACR,GAUaC,IAAyB,CACrCC,GACAC,GACAC,IAAW,eACQ;AAAA,EACnB,GAAGF,EAAM;AAAA,IACR,CAACG,OAAoB;AAAA,MACpB,IAAIA,EAAE;AAAA,MACN,OAAO,GAAGV,EAAgBU,EAAE,QAAQD,CAAQ,CAAC,MAAMC,EAAE,WAAW;AAAA,MAChE,MAAM;AAAA,QACL,MAAM;AAAA,QACN,aAAaA,EAAE;AAAA,QACf,YAAYA,EAAE;AAAA,QACd,QAAQA,EAAE;AAAA,MAAA;AAAA,IACX;AAAA,EACD;AAAA,EAED,GAAGF,EAAU;AAAA,IACZ,CAACG,OAAoB;AAAA,MACpB,IAAIA,EAAE;AAAA,MACN,OAAO,cAAcA,EAAE,IAAI;AAAA,MAC3B,MAAM,EAAE,MAAM,YAAY,YAAYA,EAAE,KAAA;AAAA,IAAK;AAAA,EAC9C;AAEF,GAEMC,IAAa,CAACC,MACnBA,EAAI,QAAQ,MAAM,OAAO,EAAE,QAAQ,MAAM,MAAM,EAAE,QAAQ,MAAM,MAAM,GAEhEC,IAAa,CAACD,MACnBD,EAAWC,CAAG,EAAE,QAAQ,MAAM,QAAQ,GAQjCE,IAAkB,CAACC,GAAYC,GAAeC,MACnD,kFACaJ,EAAWE,CAAE,CAAC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E;AACV,GAUMY,IAAsB,CAC3BjB,GACAkB,MACY;AACZ,QAAMC,IAAcD,EAAYlB,CAAE;AAClC,SAAImB,IACI,UAAUA,CAAW,OAEtB,cAAcnB,CAAE;AACxB,GAEMoB,IAAa,CAClBC,GACAH,MACY;AACZ,UAAQG,EAAK,MAAA;AAAA,IACZ,KAAK;AACJ,aAAOA,EAAK,QAAQ;AAAA,IACrB,KAAK;AAAA,IACL,KAAK,eAAe;AACnB,YAAMrB,IAAKqB,EAAK,OAAQ;AACxB,aAAOrB,KAAM,OAAO,KAAKiB,EAAoB,OAAOjB,CAAE,GAAGkB,CAAW;AAAA,IACrE;AAAA,IACA,KAAK;AACJ,aAAO,KAAK,OAAOG,EAAK,OAAQ,gBAAmB,EAAE,CAAC;AAAA,IACvD,KAAK;AACJ,aAAO;AAAA;AAAA,IACR,SAAS;AACR,YAAMC,KAASD,EAAK,WAAW,CAAA,GAC7B,IAAI,CAACE,MAAUH,EAAWG,GAAOL,CAAW,CAAC,EAC7C,KAAK,EAAE;AAGT,aADoB,CAAC,aAAa,WAAW,YAAY,YAAY,EAClD,SAASG,EAAK,IAAI,IAAI,GAAGC,CAAK;AAAA,IAAOA;AAAA,IACzD;AAAA,EAAA;AAEF,GAOaE,IAA0B,CACtCC,GACAlC,MACY;AACZ,MAAI,CAACkC;AACJ,WAAO;AAER,QAAMP,IAAc3B,EAAM,OAA+B,CAACmC,GAAKhC,OAC9DgC,EAAIhC,EAAE,OAAO,IAAIA,EAAE,cACZgC,IACL,CAAA,CAAE;AACL,SAAON,EAAWK,GAAmCP,CAAW,EAAE;AAAA,IACjE;AAAA,IACA;AAAA,EAAA;AAEF;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { AgentListingProps } from './AgentListing.model';
|
|
3
|
-
/**
|
|
4
|
-
* Full body of the "AI Agents" listing screen (header + filters + table).
|
|
5
|
-
* Presentational and fully controlled — the consumer owns data, search, sort,
|
|
6
|
-
* pagination and routing. Render it inside your app shell (next to the sidebar).
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* <AgentListing
|
|
10
|
-
* agents={rows}
|
|
11
|
-
* searchValue={search}
|
|
12
|
-
* onSearchChange={setSearch}
|
|
13
|
-
* onNewAgent={() => router.push('/agents/new')}
|
|
14
|
-
* onRunAgent={runAgent}
|
|
15
|
-
* onEditAgent={(a) => router.push(`/agents/${a.id}`)}
|
|
16
|
-
* />
|
|
17
|
-
*/
|
|
18
|
-
export declare const AgentListing: React.FC<AgentListingProps>;
|