Skip to content

Commit

Permalink
chore: remove ai template (#10515)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickoferrall authored Nov 27, 2024
1 parent a8cfa03 commit 556ff3f
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 325 deletions.
1 change: 0 additions & 1 deletion codegen.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"GenerateGroupsSuccess": "./types/GenerateGroupsSuccess#GenerateGroupsSuccessSource",
"GenerateInsightSuccess": "./types/GenerateInsightSuccess#GenerateInsightSuccessSource",
"GenerateRetroSummariesSuccess": "./types/GenerateRetroSummariesSuccess#GenerateRetroSummariesSuccessSource",
"GetTemplateSuggestionSuccess": "./types/GetTemplateSuggestionSuccess#GetTemplateSuggestionSuccessSource",
"GitHubIntegration": "../../postgres/queries/getGitHubAuthByUserIdTeamId#GitHubAuth",
"GitLabIntegration": "./types/GitLabIntegration#GitLabIntegrationSource",
"IntegrationProviderOAuth1": "../../postgres/queries/getIntegrationProvidersByIds#TIntegrationProvider",
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@
"git-url-parse": "12.0.0",
"fbjs": "^3.0.0",
"parse-url": "^8.1.0",
"recursive-readdir": "^2.2.3",
"json5": "^2.2.3"
"recursive-readdir": "^2.2.3"
},
"devDependencies": {
"@babel/core": "^7.20.12",
Expand Down
97 changes: 0 additions & 97 deletions packages/client/components/ActivityLibrary/AISearch.tsx

This file was deleted.

33 changes: 11 additions & 22 deletions packages/client/components/ActivityLibrary/ActivityLibrary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import logoMarkPurple from '../../styles/theme/images/brand/mark-color.svg'
import SendClientSideEvent from '../../utils/SendClientSideEvent'
import IconLabel from '../IconLabel'
import LoadingComponent from '../LoadingComponent/LoadingComponent'
import AISearch from './AISearch'
import ActivityGrid from './ActivityGrid'
import ActivityLibraryEmptyState from './ActivityLibraryEmptyState'
import {
Expand Down Expand Up @@ -117,9 +116,6 @@ const query = graphql`
}
}
}
organizations {
hasAITemplateFlag: featureFlag(featureName: "aiTemplate")
}
}
}
`
Expand Down Expand Up @@ -226,8 +222,7 @@ export const ActivityLibrary = (props: Props) => {
const {queryRef} = props
const data = usePreloadedQuery<ActivityLibraryQuery>(query, queryRef)
const {viewer} = data
const {availableTemplates, organizations} = viewer
const hasAITemplateFeatureFlag = organizations.some((org) => org.hasAITemplateFlag)
const {availableTemplates} = viewer

const [isSearching, setIsSearching] = useState(true)
const [templateSearch, refetchTemplateSearch] = useRefetchableFragment<
Expand Down Expand Up @@ -361,17 +356,16 @@ export const ActivityLibrary = (props: Props) => {
Start Activity
</div>
</div>
{!hasAITemplateFeatureFlag && (
<div className='hidden grow md:block'>
<SearchBar
searchQuery={searchQuery}
onChange={(e) => {
onQueryChange(e)
setSearch(e.target.value)
}}
/>
</div>
)}
<div className='hidden grow md:block'>
<SearchBar
searchQuery={searchQuery}
onChange={(e) => {
onQueryChange(e)
setSearch(e.target.value)
}}
/>
</div>

<Link
className='rounded-full bg-sky-500 px-4 py-2 text-sm font-medium text-white hover:bg-sky-600'
to={`/activity-library/new-activity/${categoryId}`}
Expand Down Expand Up @@ -429,11 +423,6 @@ export const ActivityLibrary = (props: Props) => {

<ScrollArea.Root className='h-full w-full overflow-hidden'>
<ScrollArea.Viewport className='flex h-full flex-col lg:mx-[15%]'>
{hasAITemplateFeatureFlag && (
<div className='mx-auto mt-4 pt-2'>
<AISearch />
</div>
)}
{templatesToRender.length === 0 && !showLoading ? (
<ActivityLibraryEmptyState
searchQuery={searchQuery}
Expand Down
41 changes: 0 additions & 41 deletions packages/client/mutations/GetTemplateSuggestionMutation.ts

This file was deleted.

65 changes: 0 additions & 65 deletions packages/server/graphql/public/mutations/getTemplateSuggestion.ts

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions packages/server/graphql/public/typeDefs/Mutation.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1460,16 +1460,6 @@ type Mutation {
"""
createStripeSubscription(orgId: ID!, paymentMethodId: ID!): CreateStripeSubscriptionPayload!

"""
Ask the AI for a template suggestion
"""
getTemplateSuggestion(
"""
The question the user has for the AI
"""
prompt: String!
): GetTemplateSuggestionPayload!

"""
Sign up or login using Google
"""
Expand Down

This file was deleted.

Loading

0 comments on commit 556ff3f

Please sign in to comment.