Skip to content

Commit 151ce8b

Browse files
author
Amrit Kashyap Borah
committed
chore: hide ask devtorn intelligence if flag not present
1 parent c8c91c1 commit 151ce8b

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/Shared/Components/Header/PageHeader.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,17 @@ const PageHeader = ({
148148

149149
const renderLogoutHelpSection = () => (
150150
<>
151-
<Button
152-
dataTestId="ask-devtron-button"
153-
variant={ButtonVariantType.secondary}
154-
style={ButtonStyleType.neutral}
155-
onClick={onAskButtonClick}
156-
text="Ask AI"
157-
startIcon={<Icon name="ic-sparkle-color" color={null} />}
158-
size={ComponentSizeType.small}
159-
/>
151+
{window._env_?.FEATURE_ASK_DEVTRON_EXPERT && (
152+
<Button
153+
dataTestId="ask-devtron-button"
154+
variant={ButtonVariantType.secondary}
155+
style={ButtonStyleType.neutral}
156+
onClick={onAskButtonClick}
157+
text="Ask AI"
158+
startIcon={<Icon name="ic-sparkle-color" color={null} />}
159+
size={ComponentSizeType.small}
160+
/>
161+
)}
160162
<HelpButton
161163
serverInfo={currentServerInfo.serverInfo}
162164
fetchingServerInfo={currentServerInfo.fetchingServerInfo}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export interface customEnv {
159159
GATEKEEPER_URL?: string
160160
FEATURE_AI_INTEGRATION_ENABLE?: boolean
161161
LOGIN_PAGE_IMAGE?: string
162-
FEATURE_AI_APP_DETAILS_ENABLE?: boolean
162+
FEATURE_ASK_DEVTRON_EXPERT?: boolean
163163
}
164164
declare global {
165165
interface Window {

0 commit comments

Comments
 (0)