1+ import { flagsHooks } from '@/app/common/hooks/flags-hooks' ;
12import {
23 aiFormSchemaResolver ,
34 AiSettingsFormSchema ,
@@ -16,7 +17,7 @@ import {
1617 Label ,
1718 Switch ,
1819} from '@openops/components/ui' ;
19- import { AiConfig } from '@openops/shared' ;
20+ import { AiConfig , FlagId , OpsEdition } from '@openops/shared' ;
2021import equal from 'fast-deep-equal' ;
2122import { t } from 'i18next' ;
2223import { CircleCheck } from 'lucide-react' ;
@@ -42,7 +43,8 @@ const AiSettingsForm = ({
4243 isSaving,
4344} : AiSettingsFormProps ) => {
4445 const assistantName = useAssistantName ( ) ;
45- const isEnterprise = assistantName === t ( 'OpenOps Agent' ) ;
46+ const edition = flagsHooks . useFlag < OpsEdition > ( FlagId . EDITION ) . data ;
47+ const isEnterprise = edition !== OpsEdition . COMMUNITY ;
4648
4749 const form = useForm < AiSettingsFormSchema > ( {
4850 resolver : aiFormSchemaResolver ,
@@ -92,13 +94,13 @@ const AiSettingsForm = ({
9294 ? t (
9395 'Enables {assistantName} and other AI-powered features such as the CLI command generation and chat interfaces.' ,
9496 {
95- assistantName : assistantName ,
97+ assistantName,
9698 } ,
9799 )
98100 : t (
99101 'Enables {assistantName} and other AI-powered features such as the CLI command generation.' ,
100102 {
101- assistantName : assistantName ,
103+ assistantName,
102104 } ,
103105 ) ;
104106
0 commit comments