Skip to content

Commit

Permalink
chore: add service name to widget playground
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed Sep 25, 2024
1 parent 8a82fe4 commit 365ae66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/self-service/playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<!-- Initialize chat-ai-widget and render the widget component -->
<script type="text/babel">
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
const { ChatWindow } = window.ChatAiWidget;
const { ChatWindow, widgetServiceName } = window.ChatAiWidget;
function getHost(region) {
if (region && region.startsWith('no')) {
return { apiHost: `https://api-${region}.sendbirdtest.com`, wsHost: `wss://ws-${region}.sendbirdtest.com` };
Expand Down Expand Up @@ -127,6 +127,7 @@
deviceType={mode}
apiHost={apiHost}
wsHost={wsHost}
serviceName={widgetServiceName.playground}
callbacks={{
onWidgetSettingFailure() {
window.document.getElementById('root').classList.add('hide');
Expand Down
1 change: 1 addition & 0 deletions src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ export const elementIds = {

export const widgetServiceName = {
default: 'genai-chatbot-widget',
playground: 'genai-widget-playground',
self: {
default: 'genai-self-service',
wordpress: 'genai-wordpress-self-service',
Expand Down

0 comments on commit 365ae66

Please sign in to comment.