Skip to content

Commit

Permalink
chore: Roll out AIGeneratedDiscussion to all users (#9554)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianrunhe authored Mar 25, 2024
1 parent 87c84a2 commit b8fa708
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
1 change: 0 additions & 1 deletion packages/client/modules/demo/initDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ const initDemoOrg = () => {
suggestGroups: false,
teamsLimit: false,
noPromptToJoinOrg: false,
AIGeneratedDiscussionPrompt: false,
publicTeams: false
},
showConversionModal: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const RetroTopic = (props: Props) => {
reflections {
...EmailReflectionCard_reflection
}
topicSummary: summary
discussionPromptQuestion
}
discussion {
commentCount
Expand Down Expand Up @@ -121,7 +121,7 @@ const RetroTopic = (props: Props) => {

const {reflectionGroup, discussion, id: stageId} = stage
const {commentCount, discussionSummary} = discussion
const {reflections, title, voteCount, topicSummary} = reflectionGroup!
const {reflections, title, voteCount, discussionPromptQuestion} = reflectionGroup!
const imageSource = isEmail ? 'static' : 'local'
const icon = imageSource === 'local' ? 'thumb_up_18.svg' : '[email protected]'
const src = `${ExternalLinks.EMAIL_CDN}${icon}`
Expand All @@ -143,16 +143,16 @@ const RetroTopic = (props: Props) => {
</AnchorIfEmail>
</td>
</tr>
{(topicSummary || discussionSummary) && (
{(discussionPromptQuestion || discussionSummary) && (
<tr>
<td align='left' style={{lineHeight: '22px', fontSize: 14}}>
{topicSummary && (
{discussionPromptQuestion && (
<>
<tr>
<td style={topicTitleStyle}>{'🤖 Topic Summary'}</td>
<td style={topicTitleStyle}>{'🤖 Discussion Question'}</td>
</tr>
<tr>
<td style={textStyle}>{topicSummary}</td>
<td style={textStyle}>{discussionPromptQuestion}</td>
</tr>
</>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const generateGroupSummaries = async (
dataLoader.get('users').loadNonNull(facilitatorUserId),
dataLoader.get('teams').loadNonNull(teamId)
])
const organization = await dataLoader.get('organizations').load(team.orgId)
const isAISummaryAccessible = await canAccessAISummary(
team,
facilitator.featureFlags,
Expand All @@ -35,9 +34,6 @@ const generateGroupSummaries = async (
sendToSentry(error, {userId: facilitator.id, tags: {meetingId}})
return
}
const aiGeneratedDiscussionPromptEnabled = organization.featureFlags?.includes(
'AIGeneratedDiscussionPrompt'
)
await Promise.all(
reflectionGroups.map(async (group) => {
const reflectionsByGroupId = reflections.filter(
Expand All @@ -49,9 +45,7 @@ const generateGroupSummaries = async (
)
const [fullSummary, fullQuestion] = await Promise.all([
manager.getSummary(reflectionTextByGroupId),
aiGeneratedDiscussionPromptEnabled
? manager.getDiscussionPromptQuestion(group.title ?? 'Unknown', reflectionsByGroupId)
: undefined
manager.getDiscussionPromptQuestion(group.title ?? 'Unknown', reflectionsByGroupId)
])
if (!fullSummary && !fullQuestion) return
const summary = fullSummary?.slice(0, 2000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ A flag to give an individual organization super powers
"""
enum OrganizationFeatureFlagsEnum {
noAISummary
AIGeneratedDiscussionPrompt
standupAISummary
noPromptToJoinOrg
suggestGroups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ The types of flags that give an individual organization super powers
"""
type OrganizationFeatureFlags {
noAISummary: Boolean!
AIGeneratedDiscussionPrompt: Boolean!
standupAISummary: Boolean!
noPromptToJoinOrg: Boolean!
suggestGroups: Boolean!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const OrganizationFeatureFlags: OrganizationFeatureFlagsResolvers = {
noAISummary: ({noAISummary}) => !!noAISummary,
standupAISummary: ({standupAISummary}) => !!standupAISummary,
noPromptToJoinOrg: ({noPromptToJoinOrg}) => !!noPromptToJoinOrg,
AIGeneratedDiscussionPrompt: ({AIGeneratedDiscussionPrompt}) => !!AIGeneratedDiscussionPrompt,
zoomTranscription: ({zoomTranscription}) => !!zoomTranscription,
shareSummary: ({shareSummary}) => !!shareSummary,
suggestGroups: ({suggestGroups}) => !!suggestGroups,
Expand Down

0 comments on commit b8fa708

Please sign in to comment.