Skip to content

Commit f2ca6c2

Browse files
committed
hide the performance insight entrypoints behind its own feature flag
1 parent d54cea5 commit f2ca6c2

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

packages/compass-assistant/src/compass-assistant-provider.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export function useAssistantActions(): AssistantActionsType {
9191
const actions = useContext(AssistantActionsContext);
9292
const isAIFeatureEnabled = useIsAIFeatureEnabled();
9393
const isAssistantFlagEnabled = usePreference('enableAIAssistant');
94+
const isPerformanceInsightEntrypointsEnabled = usePreference(
95+
'enablePerformanceInsightsEntrypoints'
96+
);
97+
9498
if (!isAIFeatureEnabled || !isAssistantFlagEnabled) {
9599
return {
96100
getIsAssistantEnabled: () => false,
@@ -106,7 +110,9 @@ export function useAssistantActions(): AssistantActionsType {
106110
return {
107111
interpretExplainPlan,
108112
interpretConnectionError,
109-
tellMoreAboutInsight,
113+
tellMoreAboutInsight: isPerformanceInsightEntrypointsEnabled
114+
? tellMoreAboutInsight
115+
: undefined,
110116
getIsAssistantEnabled: () => true,
111117
};
112118
}

packages/compass-preferences-model/src/feature-flags.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type FeatureFlags = {
3030
enableSearchActivationProgramP1: boolean;
3131
enableUnauthenticatedGenAI: boolean;
3232
enableAIAssistant: boolean;
33+
enablePerformanceInsightsEntrypoints: boolean;
3334
};
3435

3536
export const featureFlags: Required<{
@@ -178,4 +179,14 @@ export const featureFlags: Required<{
178179
short: 'Enable AI Assistant',
179180
},
180181
},
182+
183+
/*
184+
* Feature flag for AI Assistant's performance insight entrypoints.
185+
*/
186+
enablePerformanceInsightsEntrypoints: {
187+
stage: 'development',
188+
description: {
189+
short: 'Enable the performance insights AI Assistant entrypoints',
190+
},
191+
},
181192
};

0 commit comments

Comments
 (0)