Closed leehuwuj closed 1 month ago
Latest commit: 01a309ba4f7b594dd1cc89a1a4efe6166996c4d8
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The changes enhance the useClientConfig
function's logic, allowing it to flexibly derive the backendOrigin
. It first checks for the chatAPI
variable and, if unavailable, falls back on window.ENV.BASE_URL
. This adjustment improves adaptability across various runtime environments, ensuring a valid backend origin is always constructed for the chat component.
Files | Change Summary |
---|---|
templates/components/ui/html/chat/hooks/use-config.ts |
Updated useClientConfig to include conditional checks for chatAPI and window.ENV.BASE_URL for deriving backendOrigin . |
πβ¨
In the world where chatbirds sing,
A config change brings a spring!
With checks forAPI
bright and fair,
Our backend finds its rightful lair.
Now flexible, it dances through,
Adapting well, just like we do!
πΌπ¬
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
chatAPI
is not defined, ensuring a valid fallback is available.