-
Notifications
You must be signed in to change notification settings - Fork 57
Attachment client improvements #466
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
Attachment client improvements #466
Conversation
…ential initialization
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.
Pull Request Overview
This PR enhances the AMS attachment client with support for whitelisted and region-based URLs, configurable via new internal flags, and refactors widget snippet URL parsing.
- Introduced
AMSClientUtilswithwhitelistedUrls,shouldUseFramedMode, andretrieveRegionBasedUrl - Added
disableAMSWhitelistedUrls&disableAMSRegionBasedUrlconfig flags and wired them intocreateAMSClient - Extracted widget snippet base URL parsing into
setWidgetSnippetBaseUrland updated loading logic - Simplified Jest node setup and added tests for new utilities
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/AMSClientUtils.ts | New utility functions and URL whitelist array |
| src/core/ChatSDKConfig.ts | Added internal config flags; minor doc comment update |
| src/OmnichannelChatSDK.ts | Integrated new AMSClientUtils, added widgetSnippetBaseUrl handling, and updated AMS client calls |
| jest.setup.node.js | Removed legacy JSDOM mocks, retained global.self mock |
| tests/utils/AMSClientUtils.web.spec.ts | Tests for new utils in browser environment |
| tests/utils/AMSClientUtils.node.spec.ts | Tests for new utils in Node environment |
| tests/external/ACSAdapter/createFileScanIngressMiddleware.spec.ts | Minor window mock addition |
| CHANGELOG.md | Updated changelog entry for attachment client improvements |
Comments suppressed due to low confidence (1)
src/core/ChatSDKConfig.ts:36
- [nitpick] The flag name
disableAMSRegionBasedUrlis inconsistent withdisableAMSWhitelistedUrls(singular vs plural). Consider renaming for consistency, e.g.,disableAMSRegionBasedUrls.
disableAMSRegionBasedUrl?: boolean;
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.