@rh-support/troubleshoot 2.6.250 → 2.6.251

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":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAsZ7C"}
1
+ {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA2Z7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAkCnD"}
1
+ {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAiCnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"PreCaseConfirmationModals.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/PreCaseConfirmationModals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,oBAAY,6BAA6B;IACrC,SAAS,aAAa;IACtB,mBAAmB,sBAAsB;IACzC,UAAU,cAAc;IACxB,mBAAmB,sBAAsB;CAC5C;AAED,UAAU,MAAM;IACZ,qBAAqB,EAAE,6BAA6B,CAAC;IACrD,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAqB9D"}
1
+ {"version":3,"file":"PreCaseConfirmationModals.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/PreCaseConfirmationModals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,oBAAY,6BAA6B;IACrC,SAAS,aAAa;IACtB,mBAAmB,sBAAsB;IACzC,UAAU,cAAc;IACxB,mBAAmB,sBAAsB;CAC5C;AAED,UAAU,MAAM;IACZ,qBAAqB,EAAE,6BAA6B,CAAC;IACrD,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAuB9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAmCvE,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,GAAI,uBAAuB,MAAM,sBA2ftD,CAAC"}
1
+ {"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAmChF,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,GAAI,uBAAuB,MAAM,sBAoiBtD,CAAC"}
@@ -12,9 +12,9 @@ import { sendRHDirectMessageFeedback } from '@ifd-ui/ask-redhat-core';
12
12
  import { Button, Card, CardBody, CardHeader, Content, ContentVariants, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateVariant, Icon, Label, Modal, ModalVariant, Skeleton, Spinner, } from '@patternfly/react-core';
13
13
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
14
14
  import { useFetch } from '@rh-support/components';
15
- import { dtmTrackEventAskRedhat } from '@rh-support/utils';
15
+ import { dtmTrackEventAskRedhat, isFunctionalCookieAccepted } from '@rh-support/utils';
16
16
  import isEqual from 'lodash/isEqual';
17
- import React, { useContext, useEffect, useRef, useState } from 'react';
17
+ import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
18
18
  import { Trans, useTranslation } from 'react-i18next';
19
19
  import { MODAL_MESSAGES, QUICK_RESPONSES, TOOLTIP_MESSAGES } from '../../constants/askRedHatMessages';
20
20
  import { useAIResponseDispatch, useAIResponseState } from '../../context/AIResponseContext';
@@ -208,6 +208,31 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
208
208
  navigator.clipboard.writeText(answer);
209
209
  } }, TOOLTIP_MESSAGES.copy),
210
210
  };
211
+ const isFunctionalCookieEnabled = useMemo(() => isFunctionalCookieAccepted(), []);
212
+ const handleManagePreferences = () => {
213
+ var _a, _b;
214
+ if (typeof ((_b = (_a = window.truste) === null || _a === void 0 ? void 0 : _a.eu) === null || _b === void 0 ? void 0 : _b.clickListener) === 'function') {
215
+ window.truste.eu.clickListener();
216
+ }
217
+ };
218
+ if (!isFunctionalCookieEnabled) {
219
+ return (React.createElement("div", { className: "ask-redhat" },
220
+ React.createElement("p", { className: "ask-redhat-title" },
221
+ React.createElement(StarIcon, { width: 20, height: 20 }),
222
+ isCaseCreate ? t('Resolve your issue now with AI insights') : t('Troubleshoot with AI insights'),
223
+ React.createElement(Label, { variant: "outline" },
224
+ React.createElement(Trans, null, "PREVIEW"))),
225
+ React.createElement("div", { className: "ask-redhat-cookie-error" },
226
+ React.createElement("div", { className: "ask-redhat-cookie-error__heading" },
227
+ React.createElement(Icon, { iconSize: "md", status: "danger" },
228
+ React.createElement(ExclamationCircleIcon, null)),
229
+ React.createElement("h4", null,
230
+ React.createElement(Trans, null, "Functional cookies not enabled"))),
231
+ React.createElement("p", { className: "ask-redhat-cookie-error__body" },
232
+ React.createElement(Trans, null, "To access this feature, functional cookies must be turned on. After updating your preferences, you may need to refresh the page.")),
233
+ React.createElement(Button, { variant: "primary", onClick: handleManagePreferences },
234
+ React.createElement(Trans, null, "Manage preferences")))));
235
+ }
211
236
  if (aiResponseState.isRateLimited) {
212
237
  return (React.createElement("div", { className: "ask-redhat" },
213
238
  React.createElement("p", { className: "ask-redhat-title" },
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAkBrD,OAAO,KAA+D,MAAM,OAAO,CAAC;AAEpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAmCpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAA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AA+f5B,eAAe,mBAAmB,CAAC"}
@@ -13,7 +13,7 @@ import { ARHEventName, AskRedHatChat, setAuthToken, } from '@ifd-ui/ask-redhat-c
13
13
  import { Button, Card, CardBody, CardHeader, Tooltip } from '@patternfly/react-core';
14
14
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
15
15
  import { ErrorBoundary, LoadingDots } from '@rh-support/components';
16
- import { PreviousCaseTypes } from '@rh-support/utils';
16
+ import { getValidUUID, isFunctionalCookieAccepted, PreviousCaseTypes } from '@rh-support/utils';
17
17
  import i18next from 'i18next';
18
18
  import isEmpty from 'lodash/isEmpty';
19
19
  import isEqual from 'lodash/isEqual';
@@ -25,10 +25,11 @@ import { RouteContext } from '../../context/RouteContext';
25
25
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
26
26
  import { TCStateContext } from '../../context/TopContentContext';
27
27
  import { useAB } from '../../hooks/useAB';
28
+ import { ARHConversationErrorType } from '../../reducers/AIResponseConstNTypes';
28
29
  import { setHasChunkReceived, updateConversationId } from '../../reducers/AIResponseReducer';
29
30
  import { appSourceId_ARH, excludedCaseTypesforARH } from '../../reducers/CaseConstNTypes';
30
31
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
31
- import { createOrUpdateSessionResources } from '../../reducers/SessionRestoreReducer';
32
+ import { createOrUpdateSessionResources, updateSession } from '../../reducers/SessionRestoreReducer';
32
33
  import { calculateEngagementWindow, DEFAULT_ENGAGEMENT_WINDOW } from '../../utils/engagementUtils';
33
34
  import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
34
35
  import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
@@ -103,7 +104,7 @@ function TroubleshootSection(props) {
103
104
  caseType: state.caseDetails.caseType,
104
105
  issue: state.caseDetails.issue,
105
106
  }), isEqual);
106
- const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
107
+ const { sessionRestore: { activeSessionId, sessionResourceTracking, previousSessions }, } = useContext(SessionRestoreStateContext);
107
108
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
108
109
  const canShowTopProducts = isEmpty(product);
109
110
  const canShowTopContent = !canShowTopProducts && ((_d = topContent === null || topContent === void 0 ? void 0 : topContent.data) === null || _d === void 0 ? void 0 : _d.length) > 0;
@@ -130,13 +131,24 @@ function TroubleshootSection(props) {
130
131
  }
131
132
  }, [activeSessionId, product, version, summary, issue, sessionRestoreDispatch, sessionResourceTracking]);
132
133
  const handleARHEvent = useCallback((eventData) => {
133
- // Enable "See more resources" button when first chunk iss received
134
+ var _a, _b, _c, _d;
135
+ const { conversationId } = eventData.payload;
136
+ if (isVariationA && conversationId && conversationId !== lastDispatchedConversationIdRef.current) {
137
+ lastDispatchedConversationIdRef.current = conversationId;
138
+ aiResponseDispatch(updateConversationId(conversationId));
139
+ // Store conversationId in session for persistence
140
+ if (activeSessionId) {
141
+ const sessionDetails = (_a = previousSessions.data[activeSessionId]) === null || _a === void 0 ? void 0 : _a.sessionDetails;
142
+ const newSession = { conversationId };
143
+ updateSession(sessionRestoreDispatch, activeSessionId, sessionDetails, newSession);
144
+ }
145
+ }
146
+ // Enable "See more resources" button when first chunk is received
134
147
  if (eventData.eventName === ARHEventName.FirstMessageReceived) {
135
148
  aiResponseDispatch(setHasChunkReceived(true));
136
149
  }
137
150
  // If message sent with conversationId, call API immediately (engagement happened)
138
151
  if (eventData.eventName === ARHEventName.MessageSent && isVariationA) {
139
- const { conversationId } = eventData.payload;
140
152
  if (conversationId === undefined || conversationId === null || conversationId === '') {
141
153
  hasFirstMessageSentRef.current = true;
142
154
  }
@@ -149,7 +161,7 @@ function TroubleshootSection(props) {
149
161
  }
150
162
  }
151
163
  if (eventData.eventName === ARHEventName.SourcePresented) {
152
- const { conversationId, sources } = eventData.payload;
164
+ const { sources } = eventData.payload;
153
165
  if (sources && Array.isArray(sources)) {
154
166
  sourcesRef.current = sources.map((source) => (Object.assign(Object.assign({}, source), { url: source.sourceUrl || source.url, link: source.sourceUrl || source.link })));
155
167
  }
@@ -172,6 +184,13 @@ function TroubleshootSection(props) {
172
184
  hasFirstMessageSentRef.current = true;
173
185
  setStreamingErrorOccurred();
174
186
  aiResponseDispatch(setHasChunkReceived(true));
187
+ const existingSessionConversationId = (_c = (_b = previousSessions.data[activeSessionId]) === null || _b === void 0 ? void 0 : _b.session) === null || _c === void 0 ? void 0 : _c.conversationId;
188
+ if (!conversationId && activeSessionId && !existingSessionConversationId) {
189
+ const sessionDetails = (_d = previousSessions.data[activeSessionId]) === null || _d === void 0 ? void 0 : _d.sessionDetails;
190
+ updateSession(sessionRestoreDispatch, activeSessionId, sessionDetails, {
191
+ conversationId: ARHConversationErrorType.AI_RESPONSE_ERROR,
192
+ });
193
+ }
175
194
  }
176
195
  // Count characters from DOM when answer is fully received
177
196
  if (eventData.eventName === ARHEventName.AnswerReceived) {
@@ -190,7 +209,15 @@ function TroubleshootSection(props) {
190
209
  setHasAnswerReceived(true);
191
210
  }, 100);
192
211
  }
193
- }, [aiResponseDispatch, callResourceAPI, clearEngagementTimer, isVariationA]);
212
+ }, [
213
+ activeSessionId,
214
+ aiResponseDispatch,
215
+ callResourceAPI,
216
+ clearEngagementTimer,
217
+ isVariationA,
218
+ previousSessions.data,
219
+ sessionRestoreDispatch,
220
+ ]);
194
221
  const preprocessRequest = () => __awaiter(this, void 0, void 0, function* () {
195
222
  var _a;
196
223
  if (!keycloakSession) {
@@ -217,9 +244,22 @@ function TroubleshootSection(props) {
217
244
  (!isVariationA && ((_f = aiResponseState.aiResponse) === null || _f === void 0 ? void 0 : _f.conversationId) && ((_g = props.haveARHFieldsChangedForBRef) === null || _g === void 0 ? void 0 : _g.current))
218
245
  ? detailedQuestion
219
246
  : '';
220
- const firstUserMessage = isVariationA && !((_h = aiResponseState.aiResponse) === null || _h === void 0 ? void 0 : _h.conversationId) && !hasFirstMessageSentRef.current
247
+ const firstUserMessage = isVariationA &&
248
+ !((_h = aiResponseState.aiResponse) === null || _h === void 0 ? void 0 : _h.conversationId) &&
249
+ !hasFirstMessageSentRef.current &&
250
+ isFunctionalCookieAccepted()
221
251
  ? detailedQuestion
222
252
  : '';
253
+ useEffect(() => {
254
+ var _a;
255
+ if (!isFunctionalCookieAccepted() && activeSessionId) {
256
+ const sessionDetails = (_a = previousSessions.data[activeSessionId]) === null || _a === void 0 ? void 0 : _a.sessionDetails;
257
+ updateSession(sessionRestoreDispatch, activeSessionId, sessionDetails, {
258
+ conversationId: ARHConversationErrorType.FUNCTIONAL_COOKIE_NOT_ACCEPTED,
259
+ });
260
+ }
261
+ // eslint-disable-next-line react-hooks/exhaustive-deps
262
+ }, [activeSessionId]);
223
263
  // Reset haveNewARHFieldsChangedRef after 100ms on mount
224
264
  useEffect(() => {
225
265
  const timer = setTimeout(() => {
@@ -255,7 +295,7 @@ function TroubleshootSection(props) {
255
295
  appEnv: Env.getEnvName(),
256
296
  showWelcomeMessage: false,
257
297
  firstUserMessage: firstUserMessage,
258
- conversationId: (_l = (_k = aiResponseState.aiResponse) === null || _k === void 0 ? void 0 : _k.conversationId) !== null && _l !== void 0 ? _l : '',
298
+ conversationId: (_l = getValidUUID((_k = aiResponseState.aiResponse) === null || _k === void 0 ? void 0 : _k.conversationId)) !== null && _l !== void 0 ? _l : '',
259
299
  latestUserMessage: latestUserMessage,
260
300
  enableHeaderMenu: false,
261
301
  enableTheme: false,
@@ -311,7 +351,8 @@ function TroubleshootSection(props) {
311
351
  React.createElement(AskRedHatChat, { initConfig: initConfig }),
312
352
  React.createElement("div", { className: "fullscreen-chat-footer" }, isVariationA && activeSection === AppRouteSections.RESOURCES ? (React.createElement(React.Fragment, null,
313
353
  React.createElement("button", { onClick: props.onBack, className: "btn btn-app btn-open-white main-nav-button", type: "button" }, t('Go back')),
314
- React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: props.aiServicesAvailable &&
354
+ React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: isFunctionalCookieAccepted() &&
355
+ props.aiServicesAvailable &&
315
356
  !aiResponseState.hasChunkReceived &&
316
357
  !aiResponseState.error }, t('See more resources')))) : isCaseCreate ? (React.createElement("span", null,
317
358
  React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
@@ -1 +1 @@
1
- {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IA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E,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAkbtC;kBAlbQ,gBAAgB;;;AAobzB,eAAe,gBAAgB,CAAC"}
@@ -11,7 +11,7 @@ import { pcm } from '@cee-eng/hydrajs';
11
11
  import { Button, ButtonVariant, WizardFooterWrapper } from '@patternfly/react-core';
12
12
  import { useFetch, usePrevious } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
14
- import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
14
+ import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, isFunctionalCookieAccepted, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
15
15
  import find from 'lodash/find';
16
16
  import isEmpty from 'lodash/isEmpty';
17
17
  import isEqual from 'lodash/isEqual';
@@ -283,7 +283,10 @@ function WizardNavigation(props) {
283
283
  React.createElement(WizardFooterWrapper, null,
284
284
  shouldShowNewARHFlowFooterButtons ? (React.createElement(React.Fragment, null,
285
285
  props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack({}), className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button" }, t('Go back'))),
286
- React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: props.aiServicesAvailable && !aiResponseState.hasChunkReceived && !aiResponseState.error }, t('See more resources')))) : props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (isCaseCreate ? (React.createElement("span", null,
286
+ React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: isFunctionalCookieAccepted() &&
287
+ props.aiServicesAvailable &&
288
+ !aiResponseState.hasChunkReceived &&
289
+ !aiResponseState.error }, t('See more resources')))) : props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (isCaseCreate ? (React.createElement("span", null,
287
290
  React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
288
291
  span: React.createElement("span", { className: "return-to-case-text" }),
289
292
  button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: props.onReturnToCaseCreation })),
@@ -462,3 +462,34 @@ body:has(.pf-chatbot--embedded) .hide-for-askredhat {
462
462
  .ask-redhat-core .pf-chatbot__expand-collapse-button:focus .pf-v6-c-button__text {
463
463
  color: #151515 !important;
464
464
  }
465
+
466
+ .ask-redhat-cookie-error {
467
+ display: flex;
468
+ flex-direction: column;
469
+ align-items: center;
470
+ gap: 16px;
471
+ padding: 24px;
472
+ border: 1px solid var(--pf-v6-global--BorderColor--100, #c7c7c7);
473
+ border-radius: var(--pf-t--global--border--radius--small, 6px);
474
+ }
475
+
476
+ .ask-redhat-cookie-error__heading {
477
+ display: flex;
478
+ align-items: center;
479
+ justify-content: center;
480
+ gap: 8px;
481
+ }
482
+
483
+ .ask-redhat-cookie-error__heading h4 {
484
+ margin: 0;
485
+ font-size: 16px;
486
+ font-weight: 500;
487
+ }
488
+
489
+ .ask-redhat-cookie-error__body {
490
+ text-align: center;
491
+ font-size: 14px;
492
+ line-height: 21px;
493
+ max-width: 535px;
494
+ margin: 0;
495
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"useARHResponse.d.ts","sourceRoot":"","sources":["../../../src/hooks/useARHResponse.ts"],"names":[],"mappings":"AAqBA;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,wEAQ5B;IACC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,CAAC;CACf;;CAgGA,CAAC"}
1
+ {"version":3,"file":"useARHResponse.d.ts","sourceRoot":"","sources":["../../../src/hooks/useARHResponse.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,wEAQ5B;IACC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,CAAC;CACf;;CAoGA,CAAC"}
@@ -8,11 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { askRHDirectAIResponse, getRHDirectConversationQuota, } from '@ifd-ui/ask-redhat-core';
11
+ import { getValidUUID, isFunctionalCookieAccepted } from '@rh-support/utils';
11
12
  import i18n from 'i18next';
12
13
  import { useCallback, useContext } from 'react';
13
14
  import { generateAIQuestion } from '../components/wizardLayout/WizardMain';
14
15
  import { useAIResponseDispatch } from '../context/AIResponseContext';
15
16
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../context/SessionRestoreContext';
17
+ import { ARHConversationErrorType } from '../reducers/AIResponseConstNTypes';
16
18
  import { streamingChunkReceived, streamingCompleted, streamingError, streamingStarted, updateQuotaLimit, } from '../reducers/AIResponseReducer';
17
19
  import { updateSession } from '../reducers/SessionRestoreReducer';
18
20
  /**
@@ -22,9 +24,21 @@ export const useARHResponse = ({ activeSection, product, version, summary, issue
22
24
  const aiResponseDispatch = useAIResponseDispatch();
23
25
  const { sessionRestore } = useContext(SessionRestoreStateContext);
24
26
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
27
+ const persistConversationId = useCallback((conversationId) => __awaiter(void 0, void 0, void 0, function* () {
28
+ var _a;
29
+ if (!sessionRestore.activeSessionId)
30
+ return;
31
+ const sessionDetails = (_a = sessionRestore.previousSessions.data[sessionRestore.activeSessionId]) === null || _a === void 0 ? void 0 : _a.sessionDetails;
32
+ yield updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, sessionDetails, {
33
+ conversationId,
34
+ });
35
+ }), [sessionRestore.activeSessionId, sessionRestore.previousSessions.data, sessionRestoreDispatch]);
25
36
  const fetchARHResponse = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
26
37
  var _a;
27
38
  try {
39
+ if (!isFunctionalCookieAccepted()) {
40
+ return;
41
+ }
28
42
  // Check conversation quota
29
43
  const quotaResponse = yield getRHDirectConversationQuota(config);
30
44
  // Update quota limit in state
@@ -32,6 +46,7 @@ export const useARHResponse = ({ activeSection, product, version, summary, issue
32
46
  // Check if quota is exceeded
33
47
  if (quotaResponse.quota.used >= quotaResponse.quota.limit) {
34
48
  aiResponseDispatch(streamingError('Chat limit reached', true));
49
+ yield persistConversationId(ARHConversationErrorType.ARH_LIMIT_EXCEEDED);
35
50
  return;
36
51
  }
37
52
  }
@@ -46,26 +61,21 @@ export const useARHResponse = ({ activeSection, product, version, summary, issue
46
61
  aiResponseDispatch(streamingChunkReceived(chunk, accumulatedResponse));
47
62
  },
48
63
  onComplete: (finalResponse) => __awaiter(void 0, void 0, void 0, function* () {
49
- var _a;
50
64
  aiResponseDispatch(streamingCompleted(finalResponse));
51
- // Store conversationId in session for persistence
52
- if (finalResponse.conversationId && sessionRestore.activeSessionId) {
53
- const sessionDetails = (_a = sessionRestore.previousSessions.data[sessionRestore.activeSessionId]) === null || _a === void 0 ? void 0 : _a.sessionDetails;
54
- const newSession = {
55
- conversationId: finalResponse.conversationId,
56
- };
57
- yield updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, sessionDetails, newSession);
65
+ if (finalResponse.conversationId) {
66
+ yield persistConversationId(finalResponse.conversationId);
58
67
  }
59
68
  }),
60
- onError: (error) => {
69
+ onError: (error) => __awaiter(void 0, void 0, void 0, function* () {
61
70
  aiResponseDispatch(streamingError(error));
62
- },
71
+ yield persistConversationId(ARHConversationErrorType.AI_RESPONSE_ERROR);
72
+ }),
63
73
  };
64
74
  aiResponseDispatch(streamingStarted());
65
75
  try {
66
76
  // Get existing conversation ID from session
67
77
  const currentSessionItem = sessionRestore.previousSessions.data[sessionRestore.activeSessionId];
68
- const existingConversationId = (_a = currentSessionItem === null || currentSessionItem === void 0 ? void 0 : currentSessionItem.session) === null || _a === void 0 ? void 0 : _a.conversationId;
78
+ const existingConversationId = getValidUUID((_a = currentSessionItem === null || currentSessionItem === void 0 ? void 0 : currentSessionItem.session) === null || _a === void 0 ? void 0 : _a.conversationId);
69
79
  yield askRHDirectAIResponse(detailedQuestion, config, true, // response to be streamed or not
70
80
  existingConversationId, streamingCallbacks);
71
81
  }
@@ -81,10 +91,10 @@ export const useARHResponse = ({ activeSection, product, version, summary, issue
81
91
  issue,
82
92
  caseType,
83
93
  aiResponseDispatch,
94
+ persistConversationId,
95
+ config,
84
96
  sessionRestore.activeSessionId,
85
97
  sessionRestore.previousSessions.data,
86
- sessionRestoreDispatch,
87
- config,
88
98
  ]);
89
99
  return { fetchARHResponse };
90
100
  };
package/lib/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // PCM-15277-Hotfix
1
+ // test
2
2
  import './scss/index.scss';
3
3
  export { Troubleshoot } from './components/wizardLayout';
4
4
  export { CaseApp } from './components/CaseEditView';
@@ -16,6 +16,11 @@ export interface IAIResponseState {
16
16
  hasChunkReceived?: boolean;
17
17
  }
18
18
  export declare const initialAIResponseState: IAIResponseState;
19
+ export declare enum ARHConversationErrorType {
20
+ AI_RESPONSE_ERROR = "error_in_arh_ai_response",
21
+ FUNCTIONAL_COOKIE_NOT_ACCEPTED = "functional_cookie_not_accepted",
22
+ ARH_LIMIT_EXCEEDED = "arh_limit_exceeded"
23
+ }
19
24
  export declare enum AIResponseConstants {
20
25
  clearAIResponse = "clearAIResponse",
21
26
  streamingStarted = "streamingStarted",
@@ -1 +1 @@
1
- {"version":3,"file":"AIResponseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,E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AI,EAAE,mBAAmB,CAAC,cAAc,CAAC;IACzC,OAAO,EAAE;QACL,aAAa,EAAE,OAAO,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED,MAAM,WAAW,+BAAgC,SAAQ,WAAW;IAChE,IAAI,EAAE,mBAAmB,CAAC,wBAAwB,CAAC;IACnD,OAAO,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;KACxB,CAAC;CACL;AAED,MAAM,WAAW,kCAAmC,SAAQ,WAAW;IACnE,IAAI,EAAE,mBAAmB,CAAC,2BAA2B,CAAC;CACzD;AAED,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IACxD,IAAI,EAAE,mBAAmB,CAAC,gBAAgB,CAAC;IAC3C,OAAO,EAAE;QACL,UAAU,EAAE,MAAM,CAAC;KACtB,CAAC;CACL;AAED,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC5D,IAAI,EAAE,mBAAmB,CAAC,oBAAoB,CAAC;IAC/C,OAAO,EAAE;QACL,cAAc,EAAE,MAAM,CAAC;KAC1B,CAAC;CACL;AAED,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC3D,IAAI,EAAE,mBAAmB,CAAC,mBAAmB,CAAC;IAC9C,OAAO,EAAE;QACL,gBAAgB,EAAE,OAAO,CAAC;KAC7B,CAAC;CACL;AAED,MAAM,MAAM,qBAAqB,GAC3B,sBAAsB,GACtB,uBAAuB,GACvB,6BAA6B,GAC7B,yBAAyB,GACzB,qBAAqB,GACrB,+BAA+B,GAC/B,kCAAkC,GAClC,uBAAuB,GACvB,2BAA2B,GAC3B,0BAA0B,CAAC"}
@@ -11,6 +11,12 @@ export const initialAIResponseState = {
11
11
  quotaLimit: undefined,
12
12
  hasChunkReceived: false,
13
13
  };
14
+ export var ARHConversationErrorType;
15
+ (function (ARHConversationErrorType) {
16
+ ARHConversationErrorType["AI_RESPONSE_ERROR"] = "error_in_arh_ai_response";
17
+ ARHConversationErrorType["FUNCTIONAL_COOKIE_NOT_ACCEPTED"] = "functional_cookie_not_accepted";
18
+ ARHConversationErrorType["ARH_LIMIT_EXCEEDED"] = "arh_limit_exceeded";
19
+ })(ARHConversationErrorType || (ARHConversationErrorType = {}));
14
20
  // Action Constants
15
21
  export var AIResponseConstants;
16
22
  (function (AIResponseConstants) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.250",
3
+ "version": "2.6.251",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@cee-eng/hydrajs": "4.18.111",
49
49
  "@cee-eng/ui-toolkit": "1.1.9",
50
- "@ifd-ui/ask-redhat-core": "^0.0.50",
50
+ "@ifd-ui/ask-redhat-core": "^0.0.56",
51
51
  "@patternfly/patternfly": "6.2.1",
52
52
  "@patternfly/react-core": "6.2.1",
53
53
  "@patternfly/react-table": "6.2.1",
@@ -55,11 +55,11 @@
55
55
  "@progress/kendo-licensing": "1.3.5",
56
56
  "@progress/kendo-react-pdf": "^5.16.0",
57
57
  "@redux-devtools/extension": "^3.3.0",
58
- "@rh-support/components": "2.5.140",
59
- "@rh-support/react-context": "2.5.230",
60
- "@rh-support/types": "2.0.18",
61
- "@rh-support/user-permissions": "2.5.103",
62
- "@rh-support/utils": "2.5.84",
58
+ "@rh-support/components": "2.5.157",
59
+ "@rh-support/react-context": "2.5.247",
60
+ "@rh-support/types": "2.0.19",
61
+ "@rh-support/user-permissions": "2.5.104",
62
+ "@rh-support/utils": "2.5.85",
63
63
  "@types/react-redux": "^7.1.33",
64
64
  "@types/redux": "^3.6.0",
65
65
  "date-fns": "3.6.0",
@@ -129,5 +129,5 @@
129
129
  "defaults and supports es6-module",
130
130
  "maintained node versions"
131
131
  ],
132
- "gitHead": "110a7c2cc1732e644be99bd8f552d610c57a4ea8"
132
+ "gitHead": "8a8ffc020ac2271c3a88160f816a5fc14082737c"
133
133
  }