@rh-support/troubleshoot 2.5.41 → 2.5.44

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAyBlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkO5C"}
1
+ {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBA8O5C"}
@@ -12,6 +12,7 @@ import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageCon
12
12
  import { PDFContext } from './PDFContainer';
13
13
  import CaseDetailsManagement from './Tabs/CaseDetails/CaseDetailsManagement';
14
14
  import CaseHistory from './Tabs/CaseHistory/CaseHistory';
15
+ import { CaseSummary } from './Tabs/CaseSummary/CaseSummary';
15
16
  const RelatedTasks = React.lazy(() => import(/* webpackChunkName: 'CaseBugzilla' */ './Tabs/RelatedTasks/RelatedTasks'));
16
17
  const CaseActionPlan = React.lazy(() => import(/* webpackChunkName: 'CaseActionPlan' */ './Tabs/CaseActionPlan/CaseActionPlan'));
17
18
  const CasePrivateNotes = React.lazy(() => import(/* webpackChunkName: 'CasePrivateNotes' */ './Tabs/CasePrivateNotes/CasePrivateNotes'));
@@ -47,6 +48,7 @@ export function CaseDetailsTabs(props) {
47
48
  const escalationTabRef = useRef(null);
48
49
  const relatedTasksRef = useRef(null);
49
50
  const caseHistoryTabRef = useRef(null);
51
+ const generateAiCaseSummaryTabRef = useRef(null);
50
52
  const tabsToRender = [];
51
53
  const handleTabClick = (event, tabIndex) => {
52
54
  setActiveTabKey(tabIndex);
@@ -114,6 +116,16 @@ export function CaseDetailsTabs(props) {
114
116
  ref: caseHistoryTabRef,
115
117
  component: React.createElement(CaseHistory, { caseNumber: caseNumber }),
116
118
  });
119
+ !loggedInUsersAccount.data.secureSupport &&
120
+ !loggedInUsersAccount.data.hasConfirmedStatesideSupport &&
121
+ tabsToRender.push({
122
+ 'data-tracking-id': 'generate-ai-case-summary-tab',
123
+ title: CaseDetailsTabsEnum.GENERATE_AI_CASE_SUMMARY,
124
+ key: 'generate ai case summary',
125
+ routePath: 'generate-ai-case-summary',
126
+ ref: generateAiCaseSummaryTabRef,
127
+ component: React.createElement(CaseSummary, { caseNumber: caseNumber }),
128
+ });
117
129
  const getActiveTabKey = () => {
118
130
  if (!activeTab)
119
131
  return activeTabKey;
@@ -28,10 +28,6 @@
28
28
  text-overflow: ellipsis;
29
29
  }
30
30
 
31
- .timelineMenu button.pf-v5-c-button.pf-m-primary {
32
- margin-bottom: 31px;
33
- }
34
-
35
31
  /* fixes a bug with datepicker month input being bigger than the day */
36
32
  .timelineMenu div.pf-v5-c-calendar-month__header-year span.pf-v5-c-form-control input {
37
33
  margin-bottom: -3px;
@@ -258,7 +254,6 @@ ul#case-history-paginated-timeline {
258
254
  }
259
255
 
260
256
  .case-history-timeline-search {
261
- margin-bottom: 1%;
262
257
  width: 30%;
263
258
  }
264
259
 
@@ -266,12 +261,11 @@ ul#case-history-paginated-timeline {
266
261
  display: flex;
267
262
  justify-content: space-between;
268
263
  align-items: center;
269
- margin-bottom: 1rem;
264
+ margin-bottom: 2rem;
270
265
  }
271
266
 
272
267
  .case-history-timeline-datepicker {
273
268
  display: flex;
274
- margin-bottom: 1%;
275
269
  /* position: absolute; */
276
270
  justify-content: flex-end;
277
271
  width: 64.2%;
@@ -281,6 +275,12 @@ ul#case-history-paginated-timeline {
281
275
  margin-left: 82%;
282
276
  }
283
277
 
278
+ /* Ensure button maintains fixed size */
279
+ .case-history-timeline-datepicker button {
280
+ flex: 0 0 auto;
281
+ height: 36px;
282
+ }
283
+
284
284
  .timeline-sort-order-select {
285
285
  display: flex;
286
286
  justify-content: flex-end;
@@ -0,0 +1,8 @@
1
+ import './caseSummary.css';
2
+ import React from 'react';
3
+ interface IProps {
4
+ caseNumber: string;
5
+ }
6
+ export declare const CaseSummary: (props: IProps) => React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=CaseSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAwB3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,UAAW,MAAM,sBAsKxC,CAAC"}
@@ -0,0 +1,104 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import './caseSummary.css';
11
+ import { caseSummary } from '@cee-eng/hydrajs';
12
+ import { parseCommentMarkdown } from '@cee-eng/ui-toolkit';
13
+ import { Alert, AlertActionLink, AlertVariant, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Spinner, TextContent, } from '@patternfly/react-core';
14
+ import CubesIcon from '@patternfly/react-icons/dist/js/icons/cubes-icon';
15
+ import { SupportFeedbackModal } from '@rh-support/components';
16
+ import { getApiResourceObject } from '@rh-support/utils';
17
+ import { formatDate } from '@rh-support/utils/lib/esm/dateUtils';
18
+ import DOMPurify from 'dompurify';
19
+ import isEqual from 'lodash/isEqual';
20
+ import React, { useEffect, useState } from 'react';
21
+ import { Trans } from 'react-i18next';
22
+ import { CASE_SUMMARY_AI_MODEL_ID, CaseSummaryStates } from '../../../../constants/caseDetailsConstants';
23
+ import { useCaseSelector } from '../../../../context/CaseContext';
24
+ import { CaseSummaryErrorMessage } from './CaseSummaryErrorMessage';
25
+ export const CaseSummary = (props) => {
26
+ var _a, _b, _c, _d;
27
+ const [isFeedbackModalOpen, setIsFeedbackModalOpen] = useState(false);
28
+ const [caseSummaryData, setCaseSummaryData] = useState(getApiResourceObject(null, true));
29
+ const [caseSummaryState, setCaseSummaryState] = useState();
30
+ const [errorMessage, setErrorMessage] = useState('');
31
+ const { caseLanguage, caseComments } = useCaseSelector((state) => ({
32
+ caseLanguage: state.caseDetails.caseLanguage,
33
+ caseComments: state.caseDetails.comments,
34
+ }), isEqual);
35
+ const onCloseFeedbackModal = () => {
36
+ setIsFeedbackModalOpen(false);
37
+ };
38
+ const triggerAppFeedbackItem = (e) => {
39
+ e.preventDefault();
40
+ setIsFeedbackModalOpen(true);
41
+ };
42
+ useEffect(() => {
43
+ if (caseLanguage !== 'en') {
44
+ setCaseSummaryState(CaseSummaryStates.CASE_LANGUAGE_NOT_SUPPORTED);
45
+ return;
46
+ }
47
+ if (!(caseComments === null || caseComments === void 0 ? void 0 : caseComments.length)) {
48
+ setCaseSummaryState(CaseSummaryStates.NEW_CASE);
49
+ setErrorMessage('Due to its recent creation and lack of comments, a case summary cannot be generated for this case.');
50
+ return;
51
+ }
52
+ else {
53
+ const fetchCaseSummary = () => __awaiter(void 0, void 0, void 0, function* () {
54
+ try {
55
+ const data = yield caseSummary.getCaseSummary(props.caseNumber, CASE_SUMMARY_AI_MODEL_ID);
56
+ setCaseSummaryData(getApiResourceObject(data));
57
+ setCaseSummaryState(CaseSummaryStates.SUCCESS);
58
+ }
59
+ catch (error) {
60
+ setCaseSummaryData(getApiResourceObject(null, false, true, error.message));
61
+ setCaseSummaryState(CaseSummaryStates.FAILED);
62
+ }
63
+ });
64
+ fetchCaseSummary();
65
+ }
66
+ // eslint-disable-next-line react-hooks/exhaustive-deps
67
+ }, []);
68
+ const formatSummary = (summary) => {
69
+ if (!summary) {
70
+ return null;
71
+ }
72
+ const markeddownOptions = { openLinksInNewTab: true, gfm: true, breaks: true };
73
+ const sanitizedHtml = DOMPurify.sanitize(parseCommentMarkdown(summary, { openImagesInNewTab: false, lazyLoadImages: false }, markeddownOptions));
74
+ return (React.createElement(TextContent, { className: "case-summary-text-content" },
75
+ React.createElement("div", { dangerouslySetInnerHTML: { __html: sanitizedHtml } })));
76
+ };
77
+ return (React.createElement("section", { className: "card card-white" },
78
+ React.createElement(Alert, { variant: AlertVariant.info, title: "Case recap uses AI. Check for mistakes.", isInline: true, actionLinks: React.createElement(AlertActionLink, { onClick: (e) => triggerAppFeedbackItem(e), href: "#" },
79
+ React.createElement(Trans, null, "Send Feedback")) },
80
+ React.createElement("p", null, "By using this feature, your support case information will be used to create an AI-generated summary of your cases. Information may not be up-to-date or without error. Always review AI generated content prior to use. We encourage you to send feedback to improve the case summary feature")),
81
+ caseSummaryState === CaseSummaryStates.NEW_CASE ? (React.createElement(EmptyState, { variant: EmptyStateVariant.lg },
82
+ React.createElement(EmptyStateHeader, { titleText: React.createElement(Trans, null, "Unable to generate case recap"), icon: React.createElement(EmptyStateIcon, { icon: CubesIcon }), headingLevel: "h2" }),
83
+ React.createElement(EmptyStateBody, null,
84
+ React.createElement("p", { className: "push-top-narrow" },
85
+ React.createElement(Trans, null, errorMessage))))) : caseSummaryState === CaseSummaryStates.FAILED ||
86
+ caseSummaryState === CaseSummaryStates.CASE_LANGUAGE_NOT_SUPPORTED ? (React.createElement(CaseSummaryErrorMessage, { caseSummaryState: caseSummaryState, caseNumber: props.caseNumber, caseSummaryId: (_a = caseSummaryData.data) === null || _a === void 0 ? void 0 : _a.id, errorMessage: errorMessage, setErrorMessage: setErrorMessage })) : caseSummaryState === CaseSummaryStates.SUCCESS ? (React.createElement(React.Fragment, null,
87
+ React.createElement("div", { className: "ai-case-recap-container" },
88
+ React.createElement("h2", { className: "ai-recap-title" }, "AI Case summary"),
89
+ React.createElement("p", { className: "ai-recap-date" }, formatDate((_b = caseSummaryData.data) === null || _b === void 0 ? void 0 : _b.created_date, 'en-US', {
90
+ month: 'short',
91
+ day: 'numeric',
92
+ year: 'numeric',
93
+ hour: '2-digit',
94
+ minute: '2-digit',
95
+ second: '2-digit',
96
+ hour12: true,
97
+ })),
98
+ React.createElement("div", { className: "case-summary-content" }, formatSummary((_c = caseSummaryData.data) === null || _c === void 0 ? void 0 : _c.generated_summary))))) : (React.createElement(EmptyState, { variant: EmptyStateVariant.lg },
99
+ React.createElement(EmptyStateHeader, { titleText: React.createElement(Trans, null, "Generating case summary using AI"), icon: React.createElement(EmptyStateIcon, { icon: Spinner }), headingLevel: "h2" }),
100
+ React.createElement(EmptyStateBody, null,
101
+ React.createElement("p", { className: "push-top-narrow" },
102
+ React.createElement(Trans, null, "Almost there! case summary will be ready in approximately 30 seconds."))))),
103
+ React.createElement(SupportFeedbackModal, { isModalOpen: isFeedbackModalOpen, onClose: onCloseFeedbackModal, caseSummaryId: (_d = caseSummaryData.data) === null || _d === void 0 ? void 0 : _d.id, errorMessage: errorMessage, isCaseSummary: true })));
104
+ };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ caseSummaryState: any;
4
+ caseNumber: string;
5
+ caseSummaryId: number;
6
+ errorMessage?: string;
7
+ setErrorMessage?: any;
8
+ }
9
+ export declare function CaseSummaryErrorMessage(props: IProps): React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=CaseSummaryErrorMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaseSummaryErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,UAAU,MAAM;IACZ,gBAAgB,EAAE,GAAG,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,GAAG,CAAC;CACzB;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBAgGpD"}
@@ -0,0 +1,59 @@
1
+ import { Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Flex, FlexItem, } from '@patternfly/react-core';
2
+ import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
3
+ import RedoIcon from '@patternfly/react-icons/dist/esm/icons/redo-icon';
4
+ import globalDangerColor100 from '@patternfly/react-tokens/dist/js/global_danger_color_100';
5
+ import { SupportFeedbackModal } from '@rh-support/components';
6
+ import React, { useEffect, useState } from 'react';
7
+ import { Trans } from 'react-i18next';
8
+ export function CaseSummaryErrorMessage(props) {
9
+ const [isFeedbackModalOpen, setIsFeedbackModalOpen] = useState(false);
10
+ const onCloseFeedbackModal = () => {
11
+ setIsFeedbackModalOpen(false);
12
+ };
13
+ const triggerAppFeedbackItem = (e) => {
14
+ e.preventDefault();
15
+ setIsFeedbackModalOpen(true);
16
+ };
17
+ const title = props.caseSummaryState === 'failed'
18
+ ? 'Error while loading case recap'
19
+ : props.caseSummaryState === 'case_language_not_supported' ||
20
+ props.caseSummaryState === 'input_comments_too_large'
21
+ ? 'Error while generating case recap'
22
+ : undefined;
23
+ useEffect(() => {
24
+ if (!props.setErrorMessage)
25
+ return;
26
+ let message = '';
27
+ const shared = `Failed to generate case recap for Case ${props.caseNumber}, due to `;
28
+ switch (props.caseSummaryState) {
29
+ case 'failed':
30
+ message =
31
+ 'The AI is either currently unavailable or is processing case details. <br/> Try reloading the page';
32
+ break;
33
+ case 'case_language_not_supported':
34
+ message = `${shared}unsupported case language.`;
35
+ break;
36
+ case 'input_comments_too_large':
37
+ message = `${shared}input comments text is too large.`;
38
+ break;
39
+ default:
40
+ break;
41
+ }
42
+ if (message) {
43
+ props.setErrorMessage(message);
44
+ }
45
+ // eslint-disable-next-line react-hooks/exhaustive-deps
46
+ }, []);
47
+ return (React.createElement(React.Fragment, null,
48
+ React.createElement(EmptyState, { variant: EmptyStateVariant.full },
49
+ React.createElement(EmptyStateHeader, { titleText: title, icon: React.createElement(EmptyStateIcon, { icon: ExclamationCircleIcon, color: globalDangerColor100.value }), headingLevel: "h2" }),
50
+ React.createElement(EmptyStateBody, null,
51
+ React.createElement(Trans, null, props.errorMessage && React.createElement("div", { dangerouslySetInnerHTML: { __html: props.errorMessage } }))),
52
+ React.createElement(EmptyStateFooter, null,
53
+ React.createElement(Flex, null,
54
+ props.caseSummaryState === 'failed' && (React.createElement(FlexItem, null,
55
+ React.createElement(Button, { variant: "primary", icon: React.createElement(RedoIcon, null), onClick: () => window.location.reload(), "data-tracking-id": "refresh-page-button" }, "Refresh page"))),
56
+ React.createElement(FlexItem, null,
57
+ React.createElement(Button, { variant: "secondary", onClick: (e) => triggerAppFeedbackItem(e), href: "#", "data-tracking-id": "send-feedback-button" }, "Send Feedback"))))),
58
+ React.createElement(SupportFeedbackModal, { isModalOpen: isFeedbackModalOpen, onClose: onCloseFeedbackModal, caseSummaryId: props.caseSummaryId, isCaseSummary: true, errorMessage: props.errorMessage })));
59
+ }
@@ -0,0 +1,36 @@
1
+ .ai-case-recap-container {
2
+ margin-top: 10px;
3
+ }
4
+
5
+ .ai-recap-title {
6
+ font-size: 20px;
7
+ font-family: 'Red Hat Display';
8
+ font-weight: 500;
9
+ margin-bottom: 8px;
10
+ }
11
+
12
+ .ai-recap-date {
13
+ color: black;
14
+ font-size: 12px;
15
+ font-weight: 400;
16
+ margin-bottom: 16px;
17
+ }
18
+
19
+ .case-summary-content {
20
+ margin-top: 10px;
21
+ }
22
+
23
+ .case-summary-text-content p {
24
+ margin-bottom: 16px;
25
+ line-height: 1.5;
26
+ }
27
+
28
+ .case-summary-text-content ol {
29
+ padding-left: 20px;
30
+ margin-bottom: 16px;
31
+ }
32
+
33
+ .case-summary-text-content ol li {
34
+ margin-bottom: 6px;
35
+ line-height: 1.5;
36
+ }
@@ -6,8 +6,10 @@ export declare enum CaseDetailsTabsEnum {
6
6
  PRIVATE_NOTES = "Private Notes",
7
7
  ESCALATION = "Escalations",
8
8
  RELATED_TASKS = "Related tasks",
9
- HISTORY = "History"
9
+ HISTORY = "History",
10
+ GENERATE_AI_CASE_SUMMARY = "Generate AI Case summary"
10
11
  }
12
+ export declare const CASE_SUMMARY_AI_MODEL_ID = "granite-3-1-8b-instruct";
11
13
  export declare enum CaseStatusEnum {
12
14
  CLOSED = "Closed",
13
15
  WAITING_ON_CUSTOMER = "Waiting on Customer",
@@ -18,6 +20,13 @@ export declare enum CaseRecommendationEvalEnum {
18
20
  NOT_HELPFUL = "-1",
19
21
  NEUTRAL = "0"
20
22
  }
23
+ export declare enum CaseSummaryStates {
24
+ NEW_CASE = "new_case",
25
+ SUCCESS = "success",
26
+ FAILED = "failed",
27
+ CASE_LANGUAGE_NOT_SUPPORTED = "case_language_not_supported",
28
+ INPUT_COMMENTS_TOO_LARGE = "input_comments_too_large"
29
+ }
21
30
  export declare const PHONE_LINE_CANNOT_BE_EMPTY = "Phone number cannot be empty when country code is given.";
22
31
  export declare const PHONE_NO_CHAR_ERROR = "Phone number can only have digits.";
23
32
  export declare const PHONE_IS_NOT_VALID = "Phone number without country code is invalid.";
@@ -1 +1 @@
1
- {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;IAC1B,aAAa,kBAAkB;IAC/B,OAAO,YAAY;CACtB;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,oBAAY,0BAA0B;IAClC,OAAO,MAAM;IACb,WAAW,OAAO;IAClB,OAAO,MAAM;CAChB;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,kDAAkD,CAAC;AAElF,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
1
+ {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;IAC1B,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,wBAAwB,6BAA6B;CACxD;AAED,eAAO,MAAM,wBAAwB,4BAA4B,CAAC;AAElE,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,oBAAY,0BAA0B;IAClC,OAAO,MAAM;IACb,WAAW,OAAO;IAClB,OAAO,MAAM;CAChB;AAED,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,2BAA2B,gCAAgC;IAC3D,wBAAwB,6BAA6B;CACxD;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,kDAAkD,CAAC;AAElF,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
@@ -8,7 +8,9 @@ export var CaseDetailsTabsEnum;
8
8
  CaseDetailsTabsEnum["ESCALATION"] = "Escalations";
9
9
  CaseDetailsTabsEnum["RELATED_TASKS"] = "Related tasks";
10
10
  CaseDetailsTabsEnum["HISTORY"] = "History";
11
+ CaseDetailsTabsEnum["GENERATE_AI_CASE_SUMMARY"] = "Generate AI Case summary";
11
12
  })(CaseDetailsTabsEnum || (CaseDetailsTabsEnum = {}));
13
+ export const CASE_SUMMARY_AI_MODEL_ID = 'granite-3-1-8b-instruct';
12
14
  export var CaseStatusEnum;
13
15
  (function (CaseStatusEnum) {
14
16
  CaseStatusEnum["CLOSED"] = "Closed";
@@ -21,6 +23,14 @@ export var CaseRecommendationEvalEnum;
21
23
  CaseRecommendationEvalEnum["NOT_HELPFUL"] = "-1";
22
24
  CaseRecommendationEvalEnum["NEUTRAL"] = "0";
23
25
  })(CaseRecommendationEvalEnum || (CaseRecommendationEvalEnum = {}));
26
+ export var CaseSummaryStates;
27
+ (function (CaseSummaryStates) {
28
+ CaseSummaryStates["NEW_CASE"] = "new_case";
29
+ CaseSummaryStates["SUCCESS"] = "success";
30
+ CaseSummaryStates["FAILED"] = "failed";
31
+ CaseSummaryStates["CASE_LANGUAGE_NOT_SUPPORTED"] = "case_language_not_supported";
32
+ CaseSummaryStates["INPUT_COMMENTS_TOO_LARGE"] = "input_comments_too_large";
33
+ })(CaseSummaryStates || (CaseSummaryStates = {}));
24
34
  export const PHONE_LINE_CANNOT_BE_EMPTY = 'Phone number cannot be empty when country code is given.';
25
35
  export const PHONE_NO_CHAR_ERROR = 'Phone number can only have digits.';
26
36
  export const PHONE_IS_NOT_VALID = 'Phone number without country code is invalid.';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.5.41",
3
+ "version": "2.5.44",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -25,7 +25,7 @@
25
25
  "lib/**/*"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@cee-eng/hydrajs": "4.18.38",
28
+ "@cee-eng/hydrajs": "4.18.57",
29
29
  "@cee-eng/ui-toolkit": "1.1.8",
30
30
  "@patternfly/patternfly": "5.4.2",
31
31
  "@patternfly/react-core": "5.4.2",
@@ -49,7 +49,7 @@
49
49
  "react-virtualized": "^9.22.5"
50
50
  },
51
51
  "dependencies": {
52
- "@cee-eng/hydrajs": "4.18.38",
52
+ "@cee-eng/hydrajs": "4.18.57",
53
53
  "@cee-eng/ui-toolkit": "1.1.8",
54
54
  "@patternfly/patternfly": "5.4.2",
55
55
  "@patternfly/react-core": "5.4.2",
@@ -58,11 +58,11 @@
58
58
  "@progress/kendo-licensing": "1.3.5",
59
59
  "@progress/kendo-react-pdf": "^5.16.0",
60
60
  "@redux-devtools/extension": "^3.3.0",
61
- "@rh-support/components": "2.5.17",
62
- "@rh-support/react-context": "2.5.19",
61
+ "@rh-support/components": "2.5.18",
62
+ "@rh-support/react-context": "2.5.20",
63
63
  "@rh-support/types": "2.0.5",
64
- "@rh-support/user-permissions": "2.5.11",
65
- "@rh-support/utils": "2.5.10",
64
+ "@rh-support/user-permissions": "2.5.12",
65
+ "@rh-support/utils": "2.5.11",
66
66
  "@types/react-redux": "^7.1.33",
67
67
  "@types/redux": "^3.6.0",
68
68
  "date-fns": "3.6.0",
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "023b279f4f5f41e7d37b2877a8d5acbaa8c7ca85"
137
+ "gitHead": "48b1925b17a320ff0c74ed3a018274a5e4cb0a87"
138
138
  }