This repository was archived by the owner on Jan 5, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
ui/shell/explorer/servicesExplorer/connectedServiceEditor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,3 +56,6 @@ export const DOCUMENT_ID_APP_SETTINGS = 'app:settings';
5656export const DOCUMENT_ID_BOT_SETTINGS = 'bot:settings' ;
5757export const DOCUMENT_ID_WELCOME_PAGE = 'welcome-page' ;
5858export const DOCUMENT_ID_MARKDOWN_PAGE = 'markdown-page' ;
59+
60+ /* a QnA maker service needs to be initialized with a valid hostname or msbot will throw */
61+ export const QnAMakerSampleHostname = 'https://myqna.azurewebsites.net' ;
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ import {
6464import { sortExplorerContents } from '../actions/explorerActions' ;
6565import { SortCriteria } from '../reducers/explorer' ;
6666import { RootState } from '../store' ;
67+ import { QnAMakerSampleHostname } from '../../constants' ;
6768
6869import { AzureAuthSaga } from './azureAuthSaga' ;
6970
@@ -166,8 +167,7 @@ export class ServicesExplorerSagas {
166167 if ( result === 1 ) {
167168 action . payload . connectedService = BotConfigurationBase . serviceFromJSON ( {
168169 type,
169- hostname :
170- 'https://myqna.azurewebsites.net' /* a QnA maker service needs to be initialized with a valid hostname or msbot will throw */ ,
170+ hostname : QnAMakerSampleHostname ,
171171 } as any ) ;
172172 result = yield * ServicesExplorerSagas . launchConnectedServiceEditor ( action ) ;
173173 }
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import * as React from 'react';
3939import { ChangeEvent , Component , ReactNode } from 'react' ;
4040
4141import { serviceTypeLabels } from '../../../../../utils/serviceTypeLables' ;
42+ import { QnAMakerSampleHostname } from '../../../../../constants' ;
4243
4344import * as styles from './connectedServiceEditor.scss' ;
4445import { KvPair } from './kvPair' ;
@@ -106,8 +107,7 @@ export class ConnectedServiceEditor extends Component<ConnectedServiceEditorProp
106107 } ;
107108 // if qnamaker, initialize with sample hostname so that botframework-config doesn't throw
108109 if ( props . serviceType === ServiceTypes . QnA ) {
109- ( connectedService as IQnAService ) . hostname =
110- ( connectedService as IQnAService ) . hostname || 'https://myqna.azurewebsites.net' ;
110+ ( connectedService as IQnAService ) . hostname = ( connectedService as IQnAService ) . hostname || QnAMakerSampleHostname ;
111111 }
112112 this . state = {
113113 connectedServiceCopy : BotConfigurationBase . serviceFromJSON ( connectedService ) ,
You can’t perform that action at this time.
0 commit comments