@pega/cosmos-react-work 10.0.0-build.1.8 → 10.0.0-build.10.0
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/lib/components/AppAnnouncement/AppAnnouncement.d.ts +8 -4
- package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/AppAnnouncement/AppAnnouncement.js +38 -11
- package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.d.ts +2 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.d.ts.map +1 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.js +8 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.js.map +1 -0
- package/lib/components/Article/ArticleRating.d.ts.map +1 -1
- package/lib/components/Article/ArticleRating.js +2 -2
- package/lib/components/Article/ArticleRating.js.map +1 -1
- package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleFeedback.js +2 -2
- package/lib/components/ArticleList/ArticleFeedback.js.map +1 -1
- package/lib/components/CasePreview/CasePreview.d.ts +2 -0
- package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
- package/lib/components/CasePreview/CasePreview.js +33 -13
- package/lib/components/CasePreview/CasePreview.js.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.js +5 -3
- package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
- package/lib/components/CaseView/CaseSummary.d.ts +3 -2
- package/lib/components/CaseView/CaseSummary.d.ts.map +1 -1
- package/lib/components/CaseView/CaseSummary.js +2 -2
- package/lib/components/CaseView/CaseSummary.js.map +1 -1
- package/lib/components/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.js +6 -12
- package/lib/components/CaseView/CaseView.js.map +1 -1
- package/lib/components/CaseView/CaseView.styles.d.ts +2 -2
- package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.styles.js +193 -153
- package/lib/components/CaseView/CaseView.styles.js.map +1 -1
- package/lib/components/CaseView/CaseView.types.d.ts +6 -2
- package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.types.js.map +1 -1
- package/lib/components/CaseView/UtilitiesSummary.js +1 -4
- package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.js +7 -4
- package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
- package/lib/components/Details/Details.d.ts.map +1 -1
- package/lib/components/Details/Details.js +9 -6
- package/lib/components/Details/Details.js.map +1 -1
- package/lib/components/Details/Details.styles.d.ts.map +1 -1
- package/lib/components/Details/Details.styles.js +10 -7
- package/lib/components/Details/Details.styles.js.map +1 -1
- package/lib/components/Details/DetailsList.d.ts.map +1 -1
- package/lib/components/Details/DetailsList.js +2 -2
- package/lib/components/Details/DetailsList.js.map +1 -1
- package/lib/components/GenAICoach/ActiveCases.d.ts.map +1 -1
- package/lib/components/GenAICoach/ActiveCases.js +2 -1
- package/lib/components/GenAICoach/ActiveCases.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +267 -73
- package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts +232 -9
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +374 -192
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js +3 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.d.ts +36 -3
- package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.js +44 -21
- package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
- package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessageFeedback.js +10 -3
- package/lib/components/GenAICoach/GenAIMessageFeedback.js.map +1 -1
- package/lib/components/GenAICoach/Questionnaire.d.ts.map +1 -1
- package/lib/components/GenAICoach/Questionnaire.js +10 -3
- package/lib/components/GenAICoach/Questionnaire.js.map +1 -1
- package/lib/components/GenAICoach/index.d.ts +1 -1
- package/lib/components/GenAICoach/index.d.ts.map +1 -1
- package/lib/components/GenAICoach/index.js.map +1 -1
- package/lib/components/HeroBanner/HeroBanner.d.ts +7 -0
- package/lib/components/HeroBanner/HeroBanner.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.js +63 -0
- package/lib/components/HeroBanner/HeroBanner.js.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.styles.d.ts +35 -0
- package/lib/components/HeroBanner/HeroBanner.styles.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.styles.js +118 -0
- package/lib/components/HeroBanner/HeroBanner.styles.js.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.d.ts +2 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.js +11 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.js.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.types.d.ts +51 -0
- package/lib/components/HeroBanner/HeroBanner.types.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.types.js +2 -0
- package/lib/components/HeroBanner/HeroBanner.types.js.map +1 -0
- package/lib/components/HeroBanner/index.d.ts +3 -0
- package/lib/components/HeroBanner/index.d.ts.map +1 -0
- package/lib/components/HeroBanner/index.js +2 -0
- package/lib/components/HeroBanner/index.js.map +1 -0
- package/lib/components/HeroBanner/utils.d.ts +20 -0
- package/lib/components/HeroBanner/utils.d.ts.map +1 -0
- package/lib/components/HeroBanner/utils.js +125 -0
- package/lib/components/HeroBanner/utils.js.map +1 -0
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts +5 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.js.map +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts +5 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js +25 -15
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js +6 -5
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +27 -9
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +8 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.d.ts +2 -2
- package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.js +6 -4
- package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
- package/lib/components/MasterDetail/DetailPanelHeader.d.ts +29 -0
- package/lib/components/MasterDetail/DetailPanelHeader.d.ts.map +1 -0
- package/lib/components/MasterDetail/DetailPanelHeader.js +14 -0
- package/lib/components/MasterDetail/DetailPanelHeader.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.d.ts +6 -0
- package/lib/components/MasterDetail/MasterDetail.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.js +116 -0
- package/lib/components/MasterDetail/MasterDetail.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.styles.d.ts +595 -0
- package/lib/components/MasterDetail/MasterDetail.styles.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.styles.js +246 -0
- package/lib/components/MasterDetail/MasterDetail.styles.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.d.ts +2 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.js +19 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.types.d.ts +71 -0
- package/lib/components/MasterDetail/MasterDetail.types.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.types.js +2 -0
- package/lib/components/MasterDetail/MasterDetail.types.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetailActions.d.ts +10 -0
- package/lib/components/MasterDetail/MasterDetailActions.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetailActions.js +45 -0
- package/lib/components/MasterDetail/MasterDetailActions.js.map +1 -0
- package/lib/components/MasterDetail/index.d.ts +5 -0
- package/lib/components/MasterDetail/index.d.ts.map +1 -0
- package/lib/components/MasterDetail/index.js +4 -0
- package/lib/components/MasterDetail/index.js.map +1 -0
- package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.js +11 -7
- package/lib/components/SearchResults/SearchResults.js.map +1 -1
- package/lib/components/SearchResults/SearchResults.styles.js +3 -3
- package/lib/components/SearchResults/SearchResults.styles.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.d.ts +1 -1
- package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.js +40 -18
- package/lib/components/Shortcuts/Shortcuts.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts +17 -6
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.styles.js +104 -58
- package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts +1 -1
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.test-ids.js +4 -3
- package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.types.d.ts +18 -2
- package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.types.js.map +1 -1
- package/lib/components/Stages/Stages.d.ts +4 -2
- package/lib/components/Stages/Stages.d.ts.map +1 -1
- package/lib/components/Stages/Stages.js +123 -88
- package/lib/components/Stages/Stages.js.map +1 -1
- package/lib/components/Stages/Stages.styles.d.ts +88 -3
- package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
- package/lib/components/Stages/Stages.styles.js +873 -171
- package/lib/components/Stages/Stages.styles.js.map +1 -1
- package/lib/components/Stages/Stages.test-ids.d.ts +2 -0
- package/lib/components/Stages/Stages.test-ids.d.ts.map +1 -0
- package/lib/components/Stages/Stages.test-ids.js +7 -0
- package/lib/components/Stages/Stages.test-ids.js.map +1 -0
- package/lib/components/Stages/Stages.types.d.ts +9 -3
- package/lib/components/Stages/Stages.types.d.ts.map +1 -1
- package/lib/components/Stages/Stages.types.js.map +1 -1
- package/lib/components/Stages/index.d.ts +2 -1
- package/lib/components/Stages/index.d.ts.map +1 -1
- package/lib/components/Stages/index.js +1 -0
- package/lib/components/Stages/index.js.map +1 -1
- package/lib/components/Stages/useStagesScrollbar.d.ts +21 -0
- package/lib/components/Stages/useStagesScrollbar.d.ts.map +1 -0
- package/lib/components/Stages/useStagesScrollbar.js +152 -0
- package/lib/components/Stages/useStagesScrollbar.js.map +1 -0
- package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.js +13 -11
- package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.types.d.ts +1 -1
- package/lib/components/Stakeholders/Stakeholders.types.d.ts.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.types.js.map +1 -1
- package/lib/components/Tags/Tags.d.ts.map +1 -1
- package/lib/components/Tags/Tags.js +2 -13
- package/lib/components/Tags/Tags.js.map +1 -1
- package/lib/components/Tasks/TaskCard.d.ts +8 -0
- package/lib/components/Tasks/TaskCard.d.ts.map +1 -0
- package/lib/components/Tasks/TaskCard.js +42 -0
- package/lib/components/Tasks/TaskCard.js.map +1 -0
- package/lib/components/Tasks/TaskCards.d.ts +9 -0
- package/lib/components/Tasks/TaskCards.d.ts.map +1 -0
- package/lib/components/Tasks/TaskCards.js +40 -0
- package/lib/components/Tasks/TaskCards.js.map +1 -0
- package/lib/components/Tasks/TaskList.d.ts +13 -1
- package/lib/components/Tasks/TaskList.d.ts.map +1 -1
- package/lib/components/Tasks/TaskList.js +31 -19
- package/lib/components/Tasks/TaskList.js.map +1 -1
- package/lib/components/Tasks/Tasks.d.ts +46 -6
- package/lib/components/Tasks/Tasks.d.ts.map +1 -1
- package/lib/components/Tasks/Tasks.js +11 -5
- package/lib/components/Tasks/Tasks.js.map +1 -1
- package/lib/components/Tasks/Tasks.test-ids.d.ts +1 -1
- package/lib/components/Tasks/Tasks.test-ids.d.ts.map +1 -1
- package/lib/components/Tasks/Tasks.test-ids.js +1 -1
- package/lib/components/Tasks/Tasks.test-ids.js.map +1 -1
- package/lib/components/Tasks/index.d.ts +1 -1
- package/lib/components/Tasks/index.d.ts.map +1 -1
- package/lib/components/Tasks/index.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/package.json +5 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { getLuminance } from 'polished';
|
|
4
|
-
import { Button, Flex, Icon, MenuButton, Progress, Text, createUID, menuHelpers, useI18n, useSpeechRecognition, useTestIds, useTheme, withTestIds, registerIcon, usePrevious, getFocusables, isMenuGroupProps, ErrorState, useArrows, useFocusTrap, useLiveLog, useOuterEvent, ThemeOverride, hasProp, getActiveElement, useElement, Actions, useFullscreenContext, useBreakpoint, Grid, useRefMap, VisuallyHiddenText, FileList, Lightbox, FormField, useUID, SpeechToTextButton, Toaster, useToaster, throttle } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Button, Flex, Icon, MenuButton, Progress, Text, createUID, menuHelpers, useI18n, useSpeechRecognition, useTestIds, useTheme, withTestIds, registerIcon, usePrevious, getFocusables, isMenuGroupProps, ErrorState, useArrows, useFocusTrap, useLiveLog, useOuterEvent, ThemeOverride, hasProp, getActiveElement, useElement, Actions, useFullscreenContext, useBreakpoint, Grid, useRefMap, VisuallyHiddenText, FileList, Lightbox, FormField, useUID, SpeechToTextButton, Toaster, useToaster, throttle, Tooltip } from '@pega/cosmos-react-core';
|
|
5
5
|
import * as caretUpIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-up.icon';
|
|
6
6
|
import * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';
|
|
7
7
|
import * as caretDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-down.icon';
|
|
@@ -12,19 +12,36 @@ import * as warnSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icon
|
|
|
12
12
|
import * as sendSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/send-solid.icon';
|
|
13
13
|
import * as squareSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/square-solid.icon';
|
|
14
14
|
import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
|
|
15
|
+
import * as moreAltIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/more-alt.icon';
|
|
15
16
|
import * as dockIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/dock.icon';
|
|
16
17
|
import * as undockIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/undock.icon';
|
|
17
18
|
import * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';
|
|
18
19
|
import * as caretRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-right.icon';
|
|
20
|
+
import * as clockSlaIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/clock-sla.icon';
|
|
19
21
|
import { getGenAICoachTestIds } from './GenAICoach.test-ids';
|
|
20
22
|
import { getSelectedKeys, isCoachMessage, isInUtilities, isUserMessage } from './GenAICoach.utils';
|
|
21
|
-
import { StyledMessagesContainer, StyledDisclaimerText, StyledGenAICoachContainer, StyledGenAIOptionsMenu, StyledInitialMessageContainer, StyledInputContainer, StyledMenuSuggestions, StyledMessagesList, StyledGridContainer, StyledFlexWrapper, StyledErrorContainer, StyledInput, StyledGuidedSuggestions, StyledComposerSection, StyledSendButton, StyledStopGeneratingButton, StyledGenAIFormControl, StyledGenAITextArea, StyledInitialMessageGrid, StyledGenAIFooter, StyledAgentIcon, StyledActionsContainer, StyledFullscreenWrapper, StyledScrollButton, StyledSuggestionCardsView, StyledSuggestionCardsBottomHalf, StyledStickyComposer, StyledAISuggestedBadge, StyledSalutation, StyledComposerWrapper } from './GenAICoach.styles';
|
|
23
|
+
import { StyledMessagesContainer, StyledDisclaimerText, StyledGenAICoachContainer, StyledGenAIOptionsMenu, StyledInitialMessageContainer, StyledInputContainer, StyledMenuSuggestions, StyledMessagesList, StyledGridContainer, StyledFlexWrapper, StyledErrorContainer, StyledInput, StyledGuidedSuggestions, StyledComposerSection, StyledSendButton, StyledStopGeneratingButton, StyledGenAIFormControl, StyledGenAITextArea, StyledInitialMessageGrid, StyledGenAIFooter, StyledAgentIcon, StyledActionsContainer, StyledHeaderContainer, StyledFullscreenWrapper, StyledScrollButton, StyledSuggestionCardsView, StyledSuggestionCardsBottomHalf, StyledStickyComposer, StyledAISuggestedBadge, StyledSalutation, StyledSubHeading, StyledComposerWrapper, StyledBannerSalutationBlock, StyledComposerSelector, StyledSimplifiedInitialMessageGrid, StyledConversationHistoryButton } from './GenAICoach.styles';
|
|
22
24
|
import ActiveCases from './ActiveCases';
|
|
23
25
|
import CaseWorkflow from './CaseWorkflow';
|
|
24
26
|
import ConversationHistory from './ConversationHistory';
|
|
25
27
|
import Questionnaire from './Questionnaire';
|
|
26
28
|
import { GenAIMessage, InitialSuggestedMessage } from '.';
|
|
27
|
-
registerIcon(caretUpIcon, timesIcon, caretDownIcon, minusIcon, polarisSolidIcon, paperClipIcon, warnSolidIcon, squareSolidIcon, sendSolidIcon, plusIcon, dockIcon, undockIcon, caretLeftIcon, caretRightIcon);
|
|
29
|
+
registerIcon(caretUpIcon, timesIcon, caretDownIcon, minusIcon, polarisSolidIcon, paperClipIcon, warnSolidIcon, squareSolidIcon, sendSolidIcon, plusIcon, dockIcon, undockIcon, caretLeftIcon, caretRightIcon, clockSlaIcon, moreAltIcon);
|
|
30
|
+
const onHeightTransitionEnd = (el, callback) => {
|
|
31
|
+
const handler = (e) => {
|
|
32
|
+
if (e.propertyName !== 'height' || e.target !== el)
|
|
33
|
+
return;
|
|
34
|
+
el.removeEventListener('transitionend', handler);
|
|
35
|
+
el.removeEventListener('transitioncancel', handler);
|
|
36
|
+
callback();
|
|
37
|
+
};
|
|
38
|
+
el.addEventListener('transitionend', handler);
|
|
39
|
+
el.addEventListener('transitioncancel', handler);
|
|
40
|
+
return () => {
|
|
41
|
+
el.removeEventListener('transitionend', handler);
|
|
42
|
+
el.removeEventListener('transitioncancel', handler);
|
|
43
|
+
};
|
|
44
|
+
};
|
|
28
45
|
const buildInitialFormAnswers = (questions = []) => Object.fromEntries(questions.map(question => [
|
|
29
46
|
question.field,
|
|
30
47
|
{
|
|
@@ -45,11 +62,11 @@ export const AISuggestedBadge = () => {
|
|
|
45
62
|
const t = useI18n();
|
|
46
63
|
return (_jsxs(StyledAISuggestedBadge, { container: { alignItems: 'center', gap: 0.5 }, children: [_jsx(Icon, { name: 'polaris-solid', "aria-hidden": true, size: 'font-size' }), _jsx(Text, { children: t('ai_suggestion') })] }));
|
|
47
64
|
};
|
|
48
|
-
const HeaderActions = ({ actions, allowFullScreen, variant, isUserTriggeredRef, onFullscreenToggle, isFullscreen, selectedCoach, actionsTestId }) => {
|
|
65
|
+
const HeaderActions = ({ actions, allowFullScreen, variant, isUserTriggeredRef, onFullscreenToggle, isFullscreen, selectedCoach, actionsTestId, simplifiedAgent }) => {
|
|
49
66
|
const t = useI18n();
|
|
50
67
|
const fullscreenIcon = isFullscreen ? 'dock' : 'undock';
|
|
51
68
|
const extraItems = [
|
|
52
|
-
...(allowFullScreen
|
|
69
|
+
...(allowFullScreen && !simplifiedAgent
|
|
53
70
|
? [
|
|
54
71
|
{
|
|
55
72
|
id: 'fullscreen',
|
|
@@ -76,15 +93,25 @@ const HeaderActions = ({ actions, allowFullScreen, variant, isUserTriggeredRef,
|
|
|
76
93
|
const mergedItems = [...(actions?.items ?? []), ...extraItems];
|
|
77
94
|
if (mergedItems.length === 0)
|
|
78
95
|
return null;
|
|
96
|
+
if (simplifiedAgent) {
|
|
97
|
+
return (_jsx(MenuButton, { "data-testid": actionsTestId, text: t('actions'), "aria-label": selectedCoach ? t('actions_for', [selectedCoach]) : undefined, iconOnly: true, icon: 'more-alt', variant: 'simple', menu: {
|
|
98
|
+
items: mergedItems.map(({ text, onClick, ...rest }) => ({
|
|
99
|
+
...rest,
|
|
100
|
+
primary: text,
|
|
101
|
+
onClick: onClick ? (id, e) => onClick(id, e) : undefined
|
|
102
|
+
}))
|
|
103
|
+
} }));
|
|
104
|
+
}
|
|
79
105
|
return (_jsx(Actions, { ...(actions ?? {}), menuAt: 1, "data-testid": actionsTestId, contextualLabel: selectedCoach, items: mergedItems }));
|
|
80
106
|
};
|
|
81
|
-
const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachChange: onCoachChangeProp, messages = [], onSend, initialSuggestedMessages, suggestions, loading, error, variant, onOpen, guidedMode = false, actions, onNewChat, conversationHistory, onLayoutChange, onAddAttachment, attachments, attachmentsError, lightboxPreviewProps, allowFullScreen = true, isInLandingPageUtilities, stopProcess, voiceToTextProps, salutation, showSalutation = true, isPortalAgent = false, pagePanel, suggestionCardsView, draftMessage, caseWorkflow, activeCases, onStop, isCreatingConversation, conversationError, questionnaireData, onQuestionnaireDismiss, ...restProps }) => {
|
|
107
|
+
const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachChange: onCoachChangeProp, messages = [], onSend, initialSuggestedMessages, suggestions, loading, error, variant, onOpen, guidedMode = false, actions, onNewChat, conversationHistory, onConversationHistoryOpen, onLayoutChange, onAddAttachment, showMultipleAttachments = false, attachments, attachmentsError, lightboxPreviewProps, allowFullScreen = true, isInLandingPageUtilities, stopProcess, voiceToTextProps, salutation, showSalutation = true, isPortalAgent = false, pagePanel, suggestionCardsView, draftMessage, caseWorkflow, activeCases, onStop, isCreatingConversation, conversationId, conversationError, questionnaireData, onQuestionnaireDismiss, simplifiedAgent = false, subHeading, operatorName, agentModeProps, modelSelectorProps, ...restProps }) => {
|
|
82
108
|
const scrollTolerancePx = 2;
|
|
83
109
|
const scrollThresholdPx = 50;
|
|
84
|
-
const streamBufferLh = 5;
|
|
110
|
+
const streamBufferLh = simplifiedAgent ? 15 : 5;
|
|
85
111
|
const bufferExtensionLh = 2;
|
|
86
112
|
const scrollThrottleMs = 50;
|
|
87
113
|
const resizeThrottleMs = 33;
|
|
114
|
+
const bannerTransitionMs = 600;
|
|
88
115
|
const theme = useTheme();
|
|
89
116
|
const t = useI18n();
|
|
90
117
|
const testIds = useTestIds(testId, getGenAICoachTestIds);
|
|
@@ -93,15 +120,25 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
93
120
|
const conversationRef = useRef(null);
|
|
94
121
|
const genAICoachRef = useRef(null);
|
|
95
122
|
const [messageEls, getMessageCbRef] = useRefMap();
|
|
123
|
+
const [showInitialScreen, setShowInitialScreen] = useState(true);
|
|
124
|
+
const agentInBanner = simplifiedAgent && variant.placement === 'fullpage';
|
|
125
|
+
const historyOpen = !!conversationHistory;
|
|
126
|
+
const agentExpanded = simplifiedAgent && messages.length > 0;
|
|
127
|
+
const hasAgentResponse = messages.some(msg => isCoachMessage(msg) && !msg.loading);
|
|
96
128
|
const focusInMessageListRef = useRef(false);
|
|
97
129
|
const mouseTriggeredFocusRef = useRef(false);
|
|
98
130
|
const isUserTriggered = useRef(false);
|
|
131
|
+
const userInitiatedSendRef = useRef(false);
|
|
132
|
+
const prevHeightRef = useRef(0);
|
|
133
|
+
const showNextCoachSender = useRef(true);
|
|
99
134
|
const lastFocusedMessageRef = useRef(null);
|
|
100
135
|
const initialFocusedElementRef = useRef(null);
|
|
101
136
|
const inputContainerRef = useRef(null);
|
|
102
137
|
const messageContainerRef = useRef(null);
|
|
103
138
|
const textAreaRef = useRef(null);
|
|
104
139
|
const [suggestionMenuButton, setSuggestionMenuButton] = useElement(null);
|
|
140
|
+
const [agentModeButtonEl, setAgentModeButtonEl] = useElement(null);
|
|
141
|
+
const [modelSelectorButtonEl, setModelSelectorButtonEl] = useElement(null);
|
|
105
142
|
const isGeneratingResponse = useRef(false);
|
|
106
143
|
const focusTextArea = useRef(false);
|
|
107
144
|
const historyViewRef = useRef(null);
|
|
@@ -129,7 +166,6 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
129
166
|
});
|
|
130
167
|
const [message, setMessage] = useState('');
|
|
131
168
|
const [interimMessage, setInterimMessage] = useState('');
|
|
132
|
-
const [coachOptions, setCoachOptions] = useState(coachOptionsProps);
|
|
133
169
|
const [focusedInMessage, setFocusedInMessage] = useState(false);
|
|
134
170
|
const scrollButtonRef = useRef(null);
|
|
135
171
|
const trapRef = useRef(null);
|
|
@@ -318,7 +354,7 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
318
354
|
if (lastMessage instanceof HTMLElement) {
|
|
319
355
|
lastFocusedMessageRef.current = lastMessage;
|
|
320
356
|
focusInMessageListRef.current = true;
|
|
321
|
-
lastMessage.focus();
|
|
357
|
+
lastMessage.focus({ preventScroll: true });
|
|
322
358
|
}
|
|
323
359
|
}, [scrollToLatest]);
|
|
324
360
|
const suggestionCardsViewElRef = useRef(null);
|
|
@@ -390,27 +426,41 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
390
426
|
messageContainerRef.current = el;
|
|
391
427
|
}, []);
|
|
392
428
|
const onCoachChange = (id) => {
|
|
393
|
-
setCoachOptions(cur => {
|
|
394
|
-
return cur.map(coach => {
|
|
395
|
-
return {
|
|
396
|
-
...coach,
|
|
397
|
-
selected: coach.id === id
|
|
398
|
-
};
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
429
|
onCoachChangeProp?.(id);
|
|
402
430
|
};
|
|
403
431
|
const selectedCoach = useMemo(() => {
|
|
404
|
-
const selected = menuHelpers.getSelected(
|
|
432
|
+
const selected = menuHelpers.getSelected(coachOptionsProps)[0];
|
|
405
433
|
if (selected)
|
|
406
434
|
return selected.primary;
|
|
407
|
-
if (
|
|
408
|
-
if (isMenuGroupProps(
|
|
409
|
-
return
|
|
435
|
+
if (coachOptionsProps[0]) {
|
|
436
|
+
if (isMenuGroupProps(coachOptionsProps[0])) {
|
|
437
|
+
return coachOptionsProps[0].items[0].primary;
|
|
410
438
|
}
|
|
411
|
-
return
|
|
439
|
+
return coachOptionsProps[0].primary;
|
|
412
440
|
}
|
|
413
|
-
}, [
|
|
441
|
+
}, [coachOptionsProps]);
|
|
442
|
+
const selectedAgentModeLabel = useMemo(() => {
|
|
443
|
+
if (!agentModeProps)
|
|
444
|
+
return '';
|
|
445
|
+
const selected = menuHelpers.getSelected(agentModeProps.modes)[0];
|
|
446
|
+
if (selected)
|
|
447
|
+
return selected.primary;
|
|
448
|
+
if (agentModeProps.modes[0]) {
|
|
449
|
+
if (isMenuGroupProps(agentModeProps.modes[0])) {
|
|
450
|
+
return agentModeProps.modes[0].items[0].primary;
|
|
451
|
+
}
|
|
452
|
+
return agentModeProps.modes[0].primary;
|
|
453
|
+
}
|
|
454
|
+
return '';
|
|
455
|
+
}, [agentModeProps]);
|
|
456
|
+
const selectedModelLabel = useMemo(() => {
|
|
457
|
+
if (!modelSelectorProps)
|
|
458
|
+
return '';
|
|
459
|
+
return menuHelpers
|
|
460
|
+
.getSelected(modelSelectorProps.options)
|
|
461
|
+
.map(s => s.primary)
|
|
462
|
+
.join(' · ');
|
|
463
|
+
}, [modelSelectorProps]);
|
|
414
464
|
const onResult = useCallback(value => {
|
|
415
465
|
pendingResult.current = false;
|
|
416
466
|
setMessage(prevMessage => {
|
|
@@ -443,6 +493,12 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
443
493
|
isCoachMessageLoading ||
|
|
444
494
|
(latestMessage && isCoachMessage(latestMessage) && latestMessage.isToolConfirmation))
|
|
445
495
|
return;
|
|
496
|
+
if (simplifiedAgent) {
|
|
497
|
+
userInitiatedSendRef.current = true;
|
|
498
|
+
if (agentInBanner && messages.length === 0) {
|
|
499
|
+
prevHeightRef.current = genAICoachRef.current?.getBoundingClientRect().height ?? 0;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
446
502
|
onSend({
|
|
447
503
|
id: createUID(),
|
|
448
504
|
message,
|
|
@@ -451,40 +507,71 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
451
507
|
formAnswers: hasFormAnswers ? formAnswers : undefined
|
|
452
508
|
});
|
|
453
509
|
setFormAnswers(undefined);
|
|
454
|
-
|
|
510
|
+
// '' means the conversation is created by this send, so the text stays until it exists.
|
|
511
|
+
if (conversationId !== '')
|
|
512
|
+
setMessage('');
|
|
455
513
|
if (active) {
|
|
456
514
|
stop();
|
|
457
515
|
}
|
|
458
|
-
}, [
|
|
516
|
+
}, [
|
|
517
|
+
message,
|
|
518
|
+
latestMessage,
|
|
519
|
+
attachments,
|
|
520
|
+
attachmentsError,
|
|
521
|
+
formAnswers,
|
|
522
|
+
questionnaireData,
|
|
523
|
+
conversationId
|
|
524
|
+
]);
|
|
459
525
|
const handleEnterKeyDown = (e) => {
|
|
460
526
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
461
527
|
e.preventDefault();
|
|
462
528
|
e.stopPropagation();
|
|
463
|
-
|
|
529
|
+
if (!isCreatingConversation)
|
|
530
|
+
handleSendMessage();
|
|
464
531
|
}
|
|
465
532
|
};
|
|
466
533
|
const handleTextAreaChange = useCallback((e) => {
|
|
467
534
|
setMessage(e.currentTarget.value);
|
|
468
535
|
}, [setMessage]);
|
|
469
536
|
const renderCoachOptions = useMemo(() => {
|
|
470
|
-
if (
|
|
537
|
+
if (coachOptionsProps.length === 0 || !selectedCoach) {
|
|
471
538
|
return null;
|
|
472
539
|
}
|
|
473
|
-
if (
|
|
540
|
+
if (coachOptionsProps.length === 1) {
|
|
474
541
|
return (_jsx(Text, { variant: isPortalAgent && !pagePanel?.visible ? 'h1' : 'h2', children: selectedCoach }));
|
|
475
542
|
}
|
|
476
543
|
return (_jsx(MenuButton, { text: selectedCoach, "aria-label": t('agent_switcher', [selectedCoach]), variant: 'text', as: StyledGenAIOptionsMenu, menu: {
|
|
477
544
|
mode: 'single-select',
|
|
478
|
-
items:
|
|
545
|
+
items: coachOptionsProps,
|
|
479
546
|
onItemClick: onCoachChange
|
|
480
547
|
} }));
|
|
481
|
-
}, [
|
|
548
|
+
}, [coachOptionsProps, selectedCoach, isPortalAgent, pagePanel?.visible]);
|
|
482
549
|
const headerContent = useMemo(() => {
|
|
550
|
+
if (simplifiedAgent && showInitialScreen)
|
|
551
|
+
return null;
|
|
483
552
|
return isInUtilities(variant) && variant.state === 'minimized' ? (_jsxs(_Fragment, { children: [_jsx(Text, { variant: 'h2', children: selectedCoach }), _jsx(Flex, { container: { alignItems: 'center' }, children: _jsx(Button, { icon: true, label: t('maximize'), "aria-label": t('agent_noun', [t('maximize')]), variant: 'simple', onClick: () => {
|
|
484
553
|
variant.onStateChange('maximized');
|
|
485
554
|
isUserTriggered.current = true;
|
|
486
|
-
}, children: _jsx(Icon, { name: 'caret-up' }) }) })] })) : (_jsxs(_Fragment, { children: [renderCoachOptions, _jsxs(Flex, { container: { gap: 0.5 }, as: StyledActionsContainer, children: [activeCases && _jsx(ActiveCases, { activeCases: activeCases }),
|
|
487
|
-
|
|
555
|
+
}, children: _jsx(Icon, { name: 'caret-up' }) }) })] })) : (_jsxs(_Fragment, { children: [renderCoachOptions, _jsxs(Flex, { container: { gap: 0.5 }, as: StyledActionsContainer, children: [activeCases && _jsx(ActiveCases, { activeCases: activeCases }), simplifiedAgent && (_jsx(HeaderActions, { actions: actions, allowFullScreen: allowFullScreen, variant: variant, isUserTriggeredRef: isUserTriggered, onFullscreenToggle: toggleFullscreen, isFullscreen: fullScreen, selectedCoach: selectedCoach, actionsTestId: testIds.actions, simplifiedAgent: true })), onNewChat && (_jsx(Button, { icon: true, variant: 'simple', label: simplifiedAgent ? t('close') : t('new_chat'), "aria-label": simplifiedAgent ? t('close_chat_with_ai') : t('new_chat'), onClick: () => {
|
|
556
|
+
if (agentInBanner && genAICoachRef.current) {
|
|
557
|
+
prevHeightRef.current = genAICoachRef.current.getBoundingClientRect().height;
|
|
558
|
+
}
|
|
559
|
+
if (simplifiedAgent && conversationHistory) {
|
|
560
|
+
conversationHistory.onDismiss();
|
|
561
|
+
}
|
|
562
|
+
onNewChat?.();
|
|
563
|
+
}, children: _jsx(Icon, { name: simplifiedAgent ? 'times' : 'plus' }) })), !simplifiedAgent && (_jsx(HeaderActions, { actions: actions, allowFullScreen: allowFullScreen, variant: variant, isUserTriggeredRef: isUserTriggered, onFullscreenToggle: toggleFullscreen, isFullscreen: fullScreen, selectedCoach: selectedCoach, actionsTestId: testIds.actions })), variant.placement === 'dialog' && !fullScreen && (_jsx(Button, { icon: true, label: t('close'), "aria-label": t('close_chat_with_ai'), variant: 'simple', onClick: variant.onClose, children: _jsx(Icon, { name: 'times' }) }))] })] }));
|
|
564
|
+
}, [
|
|
565
|
+
variant,
|
|
566
|
+
coachOptionsProps,
|
|
567
|
+
activeCases,
|
|
568
|
+
actions,
|
|
569
|
+
allowFullScreen,
|
|
570
|
+
onNewChat,
|
|
571
|
+
simplifiedAgent,
|
|
572
|
+
showInitialScreen,
|
|
573
|
+
messages.length
|
|
574
|
+
]);
|
|
488
575
|
const getMessageContainingElement = (element) => {
|
|
489
576
|
if (element)
|
|
490
577
|
return Array.from(messageEls.values()).find(el => el && el.contains(element));
|
|
@@ -529,6 +616,63 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
529
616
|
textAreaRef.current?.focus();
|
|
530
617
|
}
|
|
531
618
|
}, [draftMessage, suggestionCardsView]);
|
|
619
|
+
useEffect(() => {
|
|
620
|
+
if (conversationId)
|
|
621
|
+
setMessage('');
|
|
622
|
+
}, [conversationId]);
|
|
623
|
+
const animateHeightFrom = useCallback((fromHeight) => {
|
|
624
|
+
const el = genAICoachRef.current;
|
|
625
|
+
if (!el)
|
|
626
|
+
return;
|
|
627
|
+
const toHeight = el.getBoundingClientRect().height;
|
|
628
|
+
if (Math.abs(fromHeight - toHeight) <= scrollTolerancePx)
|
|
629
|
+
return;
|
|
630
|
+
el.style.transition = 'none';
|
|
631
|
+
el.style.height = `${fromHeight}px`;
|
|
632
|
+
const removeListener = onHeightTransitionEnd(el, () => el.style.removeProperty('height'));
|
|
633
|
+
const rafId = requestAnimationFrame(() => {
|
|
634
|
+
el.getBoundingClientRect();
|
|
635
|
+
el.style.removeProperty('transition');
|
|
636
|
+
el.style.height = `${toHeight}px`;
|
|
637
|
+
});
|
|
638
|
+
return () => {
|
|
639
|
+
cancelAnimationFrame(rafId);
|
|
640
|
+
removeListener();
|
|
641
|
+
el.style.removeProperty('height');
|
|
642
|
+
el.style.removeProperty('transition');
|
|
643
|
+
};
|
|
644
|
+
}, []);
|
|
645
|
+
useLayoutEffect(() => {
|
|
646
|
+
const fromHeight = prevHeightRef.current;
|
|
647
|
+
if (!agentInBanner || !fromHeight || historyOpen)
|
|
648
|
+
return;
|
|
649
|
+
if (messages.length === 0 && !showInitialScreen)
|
|
650
|
+
return;
|
|
651
|
+
prevHeightRef.current = 0;
|
|
652
|
+
return animateHeightFrom(fromHeight);
|
|
653
|
+
}, [messages.length, agentInBanner, showInitialScreen, historyOpen, animateHeightFrom]);
|
|
654
|
+
useEffect(() => {
|
|
655
|
+
if (!agentInBanner)
|
|
656
|
+
return;
|
|
657
|
+
if (messages.length === 0) {
|
|
658
|
+
if (!(loading && conversationHistory)) {
|
|
659
|
+
setShowInitialScreen(true);
|
|
660
|
+
}
|
|
661
|
+
userInitiatedSendRef.current = false;
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
if (!showInitialScreen)
|
|
665
|
+
return;
|
|
666
|
+
if (!userInitiatedSendRef.current) {
|
|
667
|
+
setShowInitialScreen(false);
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
const timer = setTimeout(() => {
|
|
671
|
+
setShowInitialScreen(false);
|
|
672
|
+
userInitiatedSendRef.current = false;
|
|
673
|
+
}, bannerTransitionMs);
|
|
674
|
+
return () => clearTimeout(timer);
|
|
675
|
+
}, [messages.length, agentInBanner, showInitialScreen]);
|
|
532
676
|
useEffect(() => {
|
|
533
677
|
if (isUserTriggered.current) {
|
|
534
678
|
if (isInUtilities(variant) &&
|
|
@@ -707,26 +851,51 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
707
851
|
const getGridColumns = () => {
|
|
708
852
|
const multiCol = 'repeat(auto-fit, minmax(calc(100% / 4 - 1rem), 1fr))';
|
|
709
853
|
const singleCol = '1fr';
|
|
710
|
-
return !isSmallOrAbove ? singleCol : multiCol;
|
|
854
|
+
return simplifiedAgent || !isSmallOrAbove ? singleCol : multiCol;
|
|
711
855
|
};
|
|
712
856
|
useEffect(() => {
|
|
713
857
|
if (voiceToTextError) {
|
|
714
858
|
push({ content: voiceToTextError });
|
|
715
859
|
}
|
|
716
860
|
}, [voiceToTextError]);
|
|
717
|
-
const
|
|
861
|
+
const showStaticSuggestions = !loading &&
|
|
862
|
+
!error &&
|
|
863
|
+
(agentInBanner ? showInitialScreen : messages.length === 0) &&
|
|
864
|
+
initialSuggestedMessages &&
|
|
865
|
+
initialSuggestedMessages.length > 0;
|
|
866
|
+
const suggestionItems = showStaticSuggestions
|
|
867
|
+
? initialSuggestedMessages.map(initialSuggestedMessage => (_jsx(InitialSuggestedMessage, { ...initialSuggestedMessage, onSend: initialMessage => {
|
|
868
|
+
if (guidedMode) {
|
|
869
|
+
onSend({
|
|
870
|
+
id: initialMessage.id,
|
|
871
|
+
message: initialMessage.message
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
else {
|
|
875
|
+
setMessage(initialMessage.message ?? '');
|
|
876
|
+
}
|
|
877
|
+
isUserTriggered.current = true;
|
|
878
|
+
textAreaRef.current?.focus();
|
|
879
|
+
}, testId: initialSuggestedMessage.id })))
|
|
880
|
+
: null;
|
|
881
|
+
const staticSuggestions = showStaticSuggestions &&
|
|
882
|
+
(agentInBanner ? (_jsx(Flex, { container: { wrap: 'wrap', gap: 0.75 }, as: StyledSimplifiedInitialMessageGrid, children: suggestionItems })) : (_jsx(Grid, { as: StyledInitialMessageGrid, container: {
|
|
883
|
+
cols: getGridColumns(),
|
|
884
|
+
gap: simplifiedAgent ? 0.75 : 1.5
|
|
885
|
+
}, children: suggestionItems })));
|
|
886
|
+
const genAIFooter = (_jsxs(Flex, { container: { direction: 'column' }, as: StyledGenAIFooter, children: [_jsxs(StyledComposerWrapper, { focused: focused, hasQuestionnaire: !!questionnaireData && !questionnaireDismissed, "$agentInBanner": agentInBanner, onFocus: () => setFocused(true), onBlur: e => {
|
|
718
887
|
if (!(e.relatedTarget instanceof Node) || !e.currentTarget.contains(e.relatedTarget)) {
|
|
719
888
|
setFocused(false);
|
|
720
889
|
}
|
|
721
|
-
}, children: [questionnaireData && !questionnaireDismissed && !questionnaireData.inline && (_jsx(Questionnaire, { data: questionnaireData, onChange: handleFormChange, onCancel: handleFormCancel }, questionnaireKey)), _jsx(FormField, { label: t('message_pega_gen_ai_coach'), labelHidden: true, labelFor: composerId, info: conversationError || undefined, status: conversationError ? 'error' : undefined, children: _jsx(StyledGenAIFormControl, { focused: (!questionnaireData || questionnaireDismissed) && focused, status: conversationError ? 'error' : undefined, children: _jsxs(Flex, { container: { direction: 'column', gap: 0.25 }, children: [_jsx(StyledGenAITextArea, { id: composerId, ref: textAreaRef, value: interimMessage ? `${message}${interimMessage}` : message, placeholder: t('write_message'), onKeyDown: handleEnterKeyDown, onChange: handleTextAreaChange, onFocus: () => {
|
|
890
|
+
}, children: [questionnaireData && !questionnaireDismissed && !questionnaireData.inline && (_jsx(Questionnaire, { data: questionnaireData, onChange: handleFormChange, onCancel: handleFormCancel }, questionnaireKey)), _jsx(FormField, { label: t('message_pega_gen_ai_coach'), labelHidden: true, labelFor: composerId, info: conversationError || undefined, status: conversationError ? 'error' : undefined, children: _jsx(StyledGenAIFormControl, { focused: (!questionnaireData || questionnaireDismissed) && focused, status: conversationError ? 'error' : undefined, children: _jsxs(Flex, { container: { direction: 'column', gap: 0.25 }, children: [_jsx(StyledGenAITextArea, { id: composerId, ref: textAreaRef, value: interimMessage ? `${message}${interimMessage}` : message, placeholder: simplifiedAgent ? t('ask_anything', [selectedCoach ?? '']) : t('write_message'), onKeyDown: handleEnterKeyDown, onChange: handleTextAreaChange, onFocus: () => {
|
|
722
891
|
if (active)
|
|
723
892
|
stop();
|
|
724
|
-
}, autoResize: true }), _jsxs(Flex, { container: {
|
|
893
|
+
}, autoResize: true, simplified: simplifiedAgent }), _jsxs(Flex, { container: {
|
|
725
894
|
direction: 'row',
|
|
726
895
|
justify: 'between',
|
|
727
|
-
gap:
|
|
896
|
+
gap: 2,
|
|
728
897
|
pad: [undefined, 1, 1, 1]
|
|
729
|
-
}, children: [_jsxs(Flex, { container: { alignItems: 'center' }, children: [!(messages.length === 0 && suggestionCardsView) && suggestions && (_jsx(MenuButton, { text: t('suggestions'), variant: 'simple', icon: 'chat-typing', iconOnly: true, as: StyledMenuSuggestions, menu: {
|
|
898
|
+
}, children: [_jsxs(Flex, { container: { alignItems: 'center' }, item: { grow: 1, shrink: 1, basis: '0%' }, children: [agentInBanner && onConversationHistoryOpen && (_jsx(Flex, { container: { alignItems: 'center' }, as: StyledConversationHistoryButton, children: _jsx(Button, { icon: true, variant: 'simple', label: t('your_chats'), onClick: onConversationHistoryOpen, children: _jsx(Icon, { name: 'clock-sla' }) }) })), !(messages.length === 0 && suggestionCardsView) && suggestions && (_jsx(MenuButton, { text: t('suggestions'), variant: 'simple', icon: 'chat-typing', iconOnly: true, as: StyledMenuSuggestions, menu: {
|
|
730
899
|
items: suggestions,
|
|
731
900
|
onItemClick: id => {
|
|
732
901
|
const selected = menuHelpers.getItem(suggestions, id);
|
|
@@ -740,7 +909,16 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
740
909
|
fileUploadInputRef.current.value = '';
|
|
741
910
|
}
|
|
742
911
|
fileUploadInputRef.current?.click();
|
|
743
|
-
}, variant: 'simple', label: t('add_attachment'), children: _jsx(Icon, { name: 'paper-clip' }) }), _jsx(StyledInput, { type: 'file', ref: fileUploadInputRef, onChange: onFileChange, multiple:
|
|
912
|
+
}, variant: 'simple', label: t('add_attachment'), children: _jsx(Icon, { name: 'paper-clip' }) }), _jsx(StyledInput, { type: 'file', ref: fileUploadInputRef, onChange: onFileChange, multiple: showMultipleAttachments, "data-testid": testIds.attachments })] })), agentModeProps && agentModeProps.modes.length > 0 && (_jsxs(_Fragment, { children: [_jsx(StyledComposerSelector, { ref: setAgentModeButtonEl, text: selectedAgentModeLabel, "aria-label": t('agent_mode_selector', [selectedAgentModeLabel]), variant: 'simple', "data-testid": testIds.agentMode, menu: {
|
|
913
|
+
mode: 'single-select',
|
|
914
|
+
items: agentModeProps.modes,
|
|
915
|
+
onItemClick: agentModeProps.onAgentModeChange
|
|
916
|
+
}, showArrow: true }), agentModeButtonEl && selectedAgentModeLabel && (_jsx(Tooltip, { target: agentModeButtonEl, smart: true, showDelay: 'none', hideDelay: 'none', children: selectedAgentModeLabel }))] })), modelSelectorProps && modelSelectorProps.options.length > 0 && (_jsxs(_Fragment, { children: [_jsx(StyledComposerSelector, { ref: setModelSelectorButtonEl, text: selectedModelLabel, "aria-label": t('model_selector_button', [selectedModelLabel]), variant: 'simple', "data-testid": testIds.modelSelector, menu: {
|
|
917
|
+
mode: 'single-select',
|
|
918
|
+
variant: 'flyout',
|
|
919
|
+
items: modelSelectorProps.options,
|
|
920
|
+
onItemClick: modelSelectorProps.onModelChange
|
|
921
|
+
}, showArrow: true }), modelSelectorButtonEl && selectedModelLabel && (_jsx(Tooltip, { target: modelSelectorButtonEl, smart: true, showDelay: 'none', hideDelay: 'none', children: selectedModelLabel }))] }))] }), (() => {
|
|
744
922
|
if (active && pendingResult.current) {
|
|
745
923
|
return (_jsxs(Flex, { container: {
|
|
746
924
|
gap: 1,
|
|
@@ -763,13 +941,13 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
763
941
|
return (_jsx(StyledStopGeneratingButton, { variant: 'primary', icon: true, label: t('stop'), "aria-label": t('stop'), onClick: () => {
|
|
764
942
|
textAreaRef.current?.focus();
|
|
765
943
|
onStopFn?.();
|
|
766
|
-
}, children: _jsx(Icon, { name: 'square-solid' }) }));
|
|
944
|
+
}, simplified: simplifiedAgent, children: _jsx(Icon, { name: 'square-solid' }) }));
|
|
767
945
|
}
|
|
768
946
|
const isLoading = latestMessage &&
|
|
769
947
|
isCoachMessage(latestMessage) &&
|
|
770
948
|
latestMessage.loading &&
|
|
771
949
|
!latestMessage.error;
|
|
772
|
-
const sendButton = (_jsx(StyledSendButton, { variant: 'primary', onClick: isCreatingConversation ? undefined : handleSendMessage, icon: true, label: t('send'), "aria-label": t('send_message'), children: _jsx(Icon, { name: 'send-solid' }) }));
|
|
950
|
+
const sendButton = (_jsx(StyledSendButton, { variant: 'primary', onClick: isCreatingConversation ? undefined : handleSendMessage, loading: isCreatingConversation, icon: true, label: t('send'), "aria-label": t('send_message'), simplified: simplifiedAgent, children: _jsx(Icon, { name: 'send-solid' }) }));
|
|
773
951
|
if (isLoading) {
|
|
774
952
|
if (isCreatingConversation) {
|
|
775
953
|
return sendButton;
|
|
@@ -782,44 +960,43 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
782
960
|
}, children: [t('generating_response'), _jsx(Progress, { placement: 'inline' })] }));
|
|
783
961
|
}
|
|
784
962
|
return sendButton;
|
|
785
|
-
})()] })] }) }) })] }), attachments && attachments.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Flex, { as: FileList, type: 'item', "aria-label": `${t('attachments')}`, items: attachments, container: { pad: [1, 0] } }), attachmentsError && (_jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, as: StyledErrorContainer, children: [_jsx(Icon, { name: 'warn-solid' }), _jsx(VisuallyHiddenText, { children: `${t('error')} ` }), attachmentsError] }))] })), _jsx(Flex, { container: { justify: 'center' }, children: _jsx(StyledDisclaimerText, { inFullPage: !condition, children: t('ai_disclaimer') }) })] }));
|
|
963
|
+
})()] })] }) }) }), agentInBanner && !guidedMode && staticSuggestions] }), attachments && attachments.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Flex, { as: FileList, type: 'item', "aria-label": `${t('attachments')}`, items: attachments, container: { pad: [1, 0] } }), attachmentsError && (_jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, as: StyledErrorContainer, children: [_jsx(Icon, { name: 'warn-solid' }), _jsx(VisuallyHiddenText, { children: `${t('error')} ` }), attachmentsError] }))] })), hasAgentResponse && (_jsx(Flex, { container: { justify: 'center' }, children: _jsx(StyledDisclaimerText, { inFullPage: !condition, children: t('ai_disclaimer') }) }))] }));
|
|
786
964
|
const isCompact = variant.placement === 'fullpage' &&
|
|
787
965
|
!fullScreen &&
|
|
788
966
|
!isInLandingPageUtilities &&
|
|
789
|
-
messages.length === 0
|
|
967
|
+
messages.length === 0 &&
|
|
968
|
+
!(agentInBanner && historyOpen);
|
|
790
969
|
const fullPageAndInitialScreen = (fullScreen || (variant.placement === 'fullpage' && !isInLandingPageUtilities)) &&
|
|
791
970
|
messages.length === 0;
|
|
792
|
-
const renderTextArea = fullPageAndInitialScreen ?
|
|
793
|
-
const GenAICoachElement = (_jsx(_Fragment, { children: ((isInUtilities(variant) && variant.state !== 'minimized') || !isInUtilities(variant)) && (_jsxs(Flex, { container: { direction: 'column' }, as: StyledFlexWrapper, children: [caseWorkflow && _jsx(CaseWorkflow, { ...caseWorkflow }), _jsx(Flex, { as: StyledMessagesContainer, ref: setMessageContainerRef, withSuggestionCards: !loading && !error && messages.length === 0 && !!suggestionCardsView, container: loading || error
|
|
971
|
+
const renderTextArea = agentInBanner || !fullPageAndInitialScreen ? genAIFooter : null;
|
|
972
|
+
const GenAICoachElement = (_jsx(_Fragment, { children: ((isInUtilities(variant) && variant.state !== 'minimized') || !isInUtilities(variant)) && (_jsxs(Flex, { container: { direction: 'column' }, as: StyledFlexWrapper, isExpanded: agentInBanner && agentExpanded, children: [caseWorkflow && _jsx(CaseWorkflow, { ...caseWorkflow }), _jsx(Flex, { as: StyledMessagesContainer, ref: setMessageContainerRef, withSuggestionCards: !loading && !error && messages.length === 0 && !!suggestionCardsView, container: loading || error
|
|
794
973
|
? { direction: 'column', pad: [0, 2], justify: 'center' }
|
|
795
974
|
: { direction: 'column', pad: [0, 2] }, ...(!loading && !error && messages.length === 0 && suggestionCardsView
|
|
796
975
|
? {}
|
|
797
|
-
: { item: { grow: 1 } }), onScroll: updateScrollStateOnScrollEvent, children: loading || error ? (_jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, children: loading ? (_jsx(
|
|
976
|
+
: { item: { grow: 1 } }), onScroll: updateScrollStateOnScrollEvent, children: loading || error ? (_jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, children: loading ? (_jsx(ThemeOverride, { theme: {
|
|
977
|
+
base: {
|
|
978
|
+
palette: {
|
|
979
|
+
'primary-background': theme.components.agent.background
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}, children: _jsx(Progress, { variant: 'ring', placement: 'block', message: typeof loading === 'string' ? loading : t('loading') }) })) : (_jsx(ErrorState, { message: error })) })) : (_jsx(_Fragment, { children: (agentInBanner ? showInitialScreen : messages.length === 0) ? (_jsxs(Flex, { as: StyledInitialMessageContainer, container: {
|
|
798
983
|
justify: suggestionCardsView ? undefined : 'center',
|
|
799
984
|
direction: 'column',
|
|
800
985
|
alignItems: 'center',
|
|
801
|
-
gap: 4,
|
|
802
|
-
pad: [6, 0, 2, 0]
|
|
986
|
+
gap: simplifiedAgent ? 2 : 4,
|
|
987
|
+
pad: simplifiedAgent ? [0, 0, 2, 0] : [6, 0, 2, 0]
|
|
803
988
|
}, ...(suggestionCardsView ? {} : { item: { grow: 1 } }), children: [((isInUtilities(variant) && variant.state === 'maximized') ||
|
|
804
989
|
!isInUtilities(variant)) &&
|
|
805
990
|
showSalutation && (_jsxs(Flex, { container: {
|
|
806
991
|
direction: 'column',
|
|
807
992
|
alignItems: 'center',
|
|
808
|
-
gap: 2,
|
|
809
|
-
pad: [0, 2]
|
|
810
|
-
}, children: [_jsx(AgentIcon, {}), _jsx(
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
else {
|
|
818
|
-
setMessage(initialMessage.message ?? '');
|
|
819
|
-
}
|
|
820
|
-
isUserTriggered.current = true;
|
|
821
|
-
textAreaRef.current?.focus();
|
|
822
|
-
}, testId: initialSuggestedMessage.id }))) })), fullPageAndInitialScreen && !guidedMode && !suggestionCardsView && genAIFooter] })) : (_jsx(Flex, { as: StyledMessagesList, ref: conversationRef, "aria-label": `${t('conversation')} ${t('view')}`, container: { direction: 'column' }, onMouseDown: (e) => {
|
|
993
|
+
gap: simplifiedAgent ? 2.5 : 2,
|
|
994
|
+
pad: simplifiedAgent ? [0, 2, 1, 2] : [0, 2]
|
|
995
|
+
}, as: simplifiedAgent ? StyledBannerSalutationBlock : undefined, isExpanded: agentExpanded, children: [!simplifiedAgent && _jsx(AgentIcon, {}), _jsx(StyledSalutation, { variant: simplifiedAgent ? 'h2' : 'h3', simplified: simplifiedAgent, children: salutation ?? t('welcome_text') }), simplifiedAgent && (_jsx(StyledSubHeading, { variant: 'primary', as: 'p', children: subHeading ?? t('what_can_i_help_you_with') }))] })), (!agentInBanner || guidedMode) && staticSuggestions, fullPageAndInitialScreen &&
|
|
996
|
+
!guidedMode &&
|
|
997
|
+
!suggestionCardsView &&
|
|
998
|
+
!agentInBanner &&
|
|
999
|
+
genAIFooter] })) : (_jsx(Flex, { as: StyledMessagesList, ref: conversationRef, simplified: simplifiedAgent, "aria-label": `${t('conversation')} ${t('view')}`, container: { direction: 'column' }, onMouseDown: (e) => {
|
|
823
1000
|
mouseTriggeredFocusRef.current = true;
|
|
824
1001
|
const target = e.target instanceof Element ? e.target : null;
|
|
825
1002
|
const clickedMessage = getMessageContainingElement(target);
|
|
@@ -911,11 +1088,13 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
911
1088
|
}
|
|
912
1089
|
}
|
|
913
1090
|
}, children: messages.map(item => {
|
|
914
|
-
|
|
915
|
-
|
|
1091
|
+
let messageProps;
|
|
1092
|
+
if (isCoachMessage(item)) {
|
|
1093
|
+
messageProps = {
|
|
916
1094
|
...item,
|
|
917
1095
|
suggestions: latestMessage?.id === item.id ? item.suggestions : undefined,
|
|
918
1096
|
onSend,
|
|
1097
|
+
showSenderInfo: simplifiedAgent ? showNextCoachSender.current : undefined,
|
|
919
1098
|
onSubmit: item.isToolConfirmation
|
|
920
1099
|
? (tools) => {
|
|
921
1100
|
onSend({
|
|
@@ -925,13 +1104,21 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
925
1104
|
});
|
|
926
1105
|
}
|
|
927
1106
|
: undefined
|
|
928
|
-
}
|
|
929
|
-
|
|
1107
|
+
};
|
|
1108
|
+
showNextCoachSender.current = false;
|
|
1109
|
+
}
|
|
1110
|
+
else if (isUserMessage(item) && simplifiedAgent) {
|
|
1111
|
+
showNextCoachSender.current = true;
|
|
1112
|
+
messageProps = { ...item, userName: operatorName };
|
|
1113
|
+
}
|
|
1114
|
+
else {
|
|
1115
|
+
messageProps = item;
|
|
1116
|
+
}
|
|
930
1117
|
return (_jsx(GenAIMessage, { ...messageProps, ref: getMessageCbRef(item.id), testId: item.id, announceInteraction: !focusInMessageListRef.current, onAnimationCursorUpdate: animatedTillCursor => {
|
|
931
1118
|
if (isCoachMessage(item)) {
|
|
932
1119
|
setAnimationInitialCursorPos(animatedTillCursor);
|
|
933
1120
|
}
|
|
934
|
-
}, ...(prevFullScreen !== fullScreen ? { animationInitialCursorPos } : {}) }));
|
|
1121
|
+
}, simplifiedAgent: simplifiedAgent, ...(prevFullScreen !== fullScreen ? { animationInitialCursorPos } : {}) }));
|
|
935
1122
|
}) })) })) }), showScrollToBottom && (_jsx(StyledScrollButton, { ref: scrollButtonRef, icon: true, onClick: handleScrollToBottomClick, ariaLabel: t('scroll_to_latest_message'), onKeyDown: focusLastMessageLi, children: _jsx(Icon, { name: 'caret-down' }) })), !loading && messages.length === 0 && suggestionCardsView ? (_jsxs(_Fragment, { children: [((isInUtilities(variant) && variant.state !== 'minimized') ||
|
|
936
1123
|
!isInUtilities(variant)) &&
|
|
937
1124
|
!guidedMode && (_jsx(StyledStickyComposer, { children: _jsx(Flex, { container: { direction: 'column' }, as: StyledInputContainer, ref: setInputContainerRef, children: _jsx(StyledComposerSection, { children: genAIFooter }) }) })), _jsx(Flex, { container: { direction: 'column' }, as: StyledSuggestionCardsBottomHalf, children: _jsx(StyledSuggestionCardsView, { ref: setSuggestionCardsViewRef, children: suggestionCardsView }) })] })) : (((isInUtilities(variant) && variant.state !== 'minimized') ||
|
|
@@ -965,7 +1152,7 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
965
1152
|
});
|
|
966
1153
|
}
|
|
967
1154
|
}
|
|
968
|
-
} }) })), _jsx(Flex, { container: { justify: 'center' }, children: _jsx(StyledDisclaimerText, { inFullPage: !condition, children: t('ai_disclaimer') }) })] })) })) : (renderTextArea)] }) })))] })) }));
|
|
1155
|
+
} }) })), hasAgentResponse && (_jsx(Flex, { container: { justify: 'center' }, children: _jsx(StyledDisclaimerText, { inFullPage: !condition, children: t('ai_disclaimer') }) }))] })) })) : (renderTextArea)] }) })))] })) }));
|
|
969
1156
|
useEffect(() => {
|
|
970
1157
|
if (focusTextArea.current && !conversationHistory && textAreaRef.current) {
|
|
971
1158
|
textAreaRef.current.focus();
|
|
@@ -989,19 +1176,26 @@ const GenAICoachContent = ({ testId, coachOptions: coachOptionsProps, onCoachCha
|
|
|
989
1176
|
attachmentsAdded.current = false;
|
|
990
1177
|
}
|
|
991
1178
|
}, [attachments, attachmentsError]);
|
|
992
|
-
const historyView = conversationHistory && (_jsx(ConversationHistory, { testId: testIds.root, ...conversationHistory, onItemClick:
|
|
1179
|
+
const historyView = conversationHistory && (_jsx(ConversationHistory, { testId: testIds.root, ...conversationHistory, onItemClick: selectedConversationId => {
|
|
993
1180
|
if (condition) {
|
|
994
1181
|
focusTextArea.current = true;
|
|
995
1182
|
}
|
|
996
1183
|
else {
|
|
997
1184
|
textAreaRef.current?.focus();
|
|
998
1185
|
}
|
|
999
|
-
conversationHistory.onItemClick?.(
|
|
1186
|
+
conversationHistory.onItemClick?.(selectedConversationId);
|
|
1000
1187
|
}, onDismiss: () => {
|
|
1001
1188
|
focusTextArea.current = true;
|
|
1189
|
+
if (agentInBanner && messages.length === 0 && genAICoachRef.current) {
|
|
1190
|
+
prevHeightRef.current = genAICoachRef.current.getBoundingClientRect().height;
|
|
1191
|
+
}
|
|
1002
1192
|
conversationHistory.onDismiss();
|
|
1003
1193
|
}, inFullPage: !condition, ref: historyViewRef }));
|
|
1004
|
-
return (_jsxs(Flex, { ...restProps, container: { direction: 'column' }, as: StyledGenAICoachContainer, "data-testid": testIds.root, variant: variant, fullScreen: fullScreen, isCompact: isCompact, isPortalAgent: isPortalAgent, ref: genAICoachRef, children: [_jsx(Flex, {
|
|
1194
|
+
return (_jsxs(Flex, { ...restProps, container: { direction: 'column' }, as: StyledGenAICoachContainer, "data-testid": testIds.root, variant: variant, fullScreen: fullScreen, isCompact: isCompact, isPortalAgent: isPortalAgent, simplifiedAgent: simplifiedAgent, ref: genAICoachRef, children: [_jsx(Flex, { as: agentExpanded ? StyledHeaderContainer : undefined, container: {
|
|
1195
|
+
justify: 'between',
|
|
1196
|
+
alignItems: 'center',
|
|
1197
|
+
pad: simplifiedAgent ? [0, 2, 0.5] : [1.5, 2, 0.5]
|
|
1198
|
+
}, children: headerContent }), condition ? (_jsx(_Fragment, { children: conversationHistory ? historyView : GenAICoachElement })) : (_jsxs(Grid, { container: { gap: 0.5, cols: '2fr 3fr' }, as: StyledGridContainer, conversationHistory: !!conversationHistory, children: [historyView, GenAICoachElement] })), lightboxPreviewProps && _jsx(Lightbox, { ...lightboxPreviewProps })] }));
|
|
1005
1199
|
};
|
|
1006
1200
|
const GenAICoach = (props) => (_jsx(Toaster, { children: _jsx(StyledFullscreenWrapper, { children: _jsx(GenAICoachContent, { ...props }) }) }));
|
|
1007
1201
|
export default withTestIds(GenAICoach, getGenAICoachTestIds);
|