Skip to content

Commit

Permalink
feat(ai): Update individual consent option for sentry employees (#60565)
Browse files Browse the repository at this point in the history
  • Loading branch information
trillville committed Dec 1, 2023
1 parent 5cad8d9 commit 8134223
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions static/app/components/events/aiSuggestedSolution/suggestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import PanelFooter from 'sentry/components/panels/panelFooter';
import PanelHeader from 'sentry/components/panels/panelHeader';
import {IconFile, IconFlag, IconHappy, IconMeh, IconSad} from 'sentry/icons';
import {t} from 'sentry/locale';
import ConfigStore from 'sentry/stores/configStore';
import {space} from 'sentry/styles/space';
import {Event, Project} from 'sentry/types';
import {trackAnalytics} from 'sentry/utils/analytics';
Expand Down Expand Up @@ -65,14 +66,23 @@ function ErrorDescription({
}

if (restriction === 'individual_consent') {
const {isStaff} = ConfigStore.get('user');

const title = isStaff ? t('Confirm there is no PII') : t('We need your consent');
const description = isStaff
? t(
'Before using this feature, please confirm that there is no personally identifiable information in this event.'
)
: t(
'By using this feature, you agree that OpenAI is a subprocessor and may process the data that you’ve chosen to submit. Sentry makes no guarantees as to the accuracy of the feature’s AI-generated recommendations.'
);

const activeSuperUser = isActiveSuperuser();
return (
<EmptyMessage
icon={<IconFlag size="xl" />}
title={t('We need your consent')}
description={t(
'By using this feature, you agree that OpenAI is a subprocessor and may process the data that you’ve chosen to submit. Sentry makes no guarantees as to the accuracy of the feature’s AI-generated recommendations.'
)}
title={title}
description={description}
action={
<ButtonBar gap={2}>
<Button onClick={onHideSuggestion}>{t('Dismiss')}</Button>
Expand Down

0 comments on commit 8134223

Please sign in to comment.