Adding chatbot behind feature flag

This commit is contained in:
Bala Lakshmi Narayanasami
2022-05-06 16:59:47 +05:30
parent c0b5e185aa
commit a089bac80e
2 changed files with 3 additions and 1 deletions

View File

@@ -196,7 +196,7 @@ export function createControlCommandBarButtons(container: Explorer): CommandButt
const showOpenFullScreen =
configContext.platform === Platform.Portal && !isRunningOnNationalCloud() && userContext.apiType !== "Gremlin";
if (userContext.authType === AuthType.AAD) {
if (userContext.authType === AuthType.AAD && userContext.features.enableChatbot) {
const label = "Chat Assistant";
const supportPaneButton: CommandButtonComponentProps = {
iconName: "ChatBot",

View File

@@ -30,6 +30,7 @@ export type Features = {
readonly mongoProxyAPIs?: string;
readonly enableThroughputCap: boolean;
readonly enableNewQuickstart: boolean;
readonly enableChatbot?: boolean;
// can be set via both flight and feature flag
autoscaleDefault: boolean;
@@ -92,6 +93,7 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear
notebooksDownBanner: "true" === get("notebooksDownBanner"),
enableThroughputCap: "true" === get("enablethroughputcap"),
enableNewQuickstart: "true" === get("enablenewquickstart"),
enableChatbot: "true" === get("enablechatbot"),
};
}