-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(quantic): es build plugin added to allow rtk query to work inside salesforce #4731
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request ReportPR Title✅ Title follows the conventional commit spec. Live demo linksBundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : buildInteractiveInstantResult search : buildInteractiveRecentResult search : buildInteractiveCitation search : buildGeneratedAnswer recommendation : missing SSR support case-assist : missing SSR support insight : missing SSR support commerce : missing SSR support |
alexprudhomme
approved these changes
Nov 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great explanation
packages/quantic/force-app/main/default/lwc/quanticFeedbackModalQna/quanticFeedbackModalQna.js
Show resolved
Hide resolved
SimonMilord
approved these changes
Nov 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
dmgauthier
approved these changes
Nov 28, 2024
Very wise! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SFINT-5831
The issue:
When submitting an evaluation from the Quantic Generated Answer in Salesforce the following issue occur preventing a successful request:
This is occurring because in Salesforce the AbortController/AbortSignal web API are not available and supported, so we are using a pony-fill that we are injecting in the headless bundle built for Quantic and Salesforce.
The problem is that Redux Toolkit Query does not seem to like this ponyfill and throws an error when starting to deal with it:
Screen.Recording.2024-11-28.at.8.28.31.AM.mov
To address this issue, we can avoid passing the Abort Signal to
fetchBaseQuery
which is the function provided by RTK Query and that is executed to fetch for the Answer API inanswer-slice.ts
.But to make sure this fix only impacts Salesforce and the Headless bundle used for Quantic, I added an es build plugin that will do a small modification to the
answer-slice.ts
when building, instead of callingfetchBaseQuery
like this:it will be called like the following:
to allow properly submitting evaluations in Salesforce:
Screen.Recording.2024-11-28.at.8.07.53.AM.mov