Skip to content
10 changes: 9 additions & 1 deletion etc/flowforge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ driver:
# public_url: ws://localhost:4881


#################################################
# AI Configuration #
#################################################

# ai:
# enabled: true


#################################################
# Assistant Configuration #
#################################################
Expand Down Expand Up @@ -127,4 +135,4 @@ rate_limits:
# Create Default Admin #
#################################################
# create_admin: false
# create_admin_access_token: false
# create_admin_access_token: false
3 changes: 3 additions & 0 deletions forge/ee/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ module.exports = fp(async function (app, opts) {
// Expert
await app.register(require('./expert'))

// Set the AI Features Flag (global gate for all AI features)
app.config.features.register('ai', app.config?.ai?.enabled ?? true, true)

// Set the Generate Snapshot Description Feature Flag
app.config.features.register('generatedSnapshotDescription', true, true)

Expand Down
2 changes: 2 additions & 0 deletions forge/lib/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const featureList = [
'instanceResources',
'tables',
'certifiedNodes',
'ai',
'assistantInlineCompletions',
'generatedSnapshotDescription',
'ffNodes',
Expand Down Expand Up @@ -47,6 +48,7 @@ const featureNames = {
instanceResources: 'Instance Resources',
tables: 'Tables',
certifiedNodes: 'Certified Nodes',
ai: 'AI Features',
assistantInlineCompletions: 'Assistant Inline Code Completions',
generatedSnapshotDescription: 'Generate Snapshot Descriptions',
ffNodes: 'FlowFuse Exclusive Nodes',
Expand Down
15 changes: 12 additions & 3 deletions frontend/src/pages/admin/TeamTypes/dialogs/TeamTypeEditDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@
</div>
<div class="grid gap-3 grid-cols-2">
<template v-if="!input.properties.enableAllFeatures">
<FormRow v-for="(feature, index) in featureList" :key="index" v-model="input.properties.features[feature]" :disabled="input.properties.enableAllFeatures" type="checkbox">{{ featureNames[feature] }}</FormRow>
<FormRow v-for="(feature, index) in teamTypeFeatureList" :key="index" v-model="input.properties.features[feature]" :disabled="input.properties.enableAllFeatures" type="checkbox">{{ featureNames[feature] }}</FormRow>
<!-- to make the grid work nicely, only needed if there is an odd number of checkbox features above-->
<span v-if="featureList.length % 2 === 1" />
<span v-if="teamTypeFeatureList.length % 2 === 1" />
</template>
<FormRow v-model="input.properties.features.fileStorageLimit">Persistent File storage limit (Mb)</FormRow>
<FormRow v-model="input.properties.features.contextLimit">Persistent Context storage limit (Mb)</FormRow>
Expand Down Expand Up @@ -419,6 +419,14 @@ export default {
},
computed: {
...mapState(useAccountSettingsStore, ['features']),
teamTypeFeatureList () {
return this.featureList.filter(feature => {
if (!Object.prototype.hasOwnProperty.call(this.features, feature)) {
return true
}
return this.features[feature] !== false
})
},
formValid () {
return (this.input.name)
},
Expand All @@ -436,7 +444,8 @@ export default {
return !!this.features.billing
},
teamBrokerEnabled () {
return !!this.input.properties.features.teamBroker
const disabledOnPlatform = Object.prototype.hasOwnProperty.call(this.features, 'teamBroker') && this.features.teamBroker === false
return !disabledOnPlatform && !!this.input.properties.features.teamBroker
},
autoStackUpdateEnforced () {
return !!this.input.properties.autoStackUpdate?.enabled
Expand Down
1 change: 1 addition & 0 deletions frontend/src/stores/account-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const FEATURE_CONFIGS = [
{ output: 'isGitIntegrationFeatureEnabled', platformKey: 'gitIntegration', teamKey: 'gitIntegration' },
{ output: 'isInstanceResourcesFeatureEnabled', platformKey: 'instanceResources', teamKey: 'instanceResources' },
{ output: 'isTablesFeatureEnabled', platformKey: 'tables', teamKey: 'tables' },
{ output: 'isAiFeatureEnabled', platformKey: 'ai', teamKey: 'ai' },
{ output: 'isGeneratedSnapshotDescriptionFeatureEnabled', platformKey: 'generatedSnapshotDescription', teamKey: 'generatedSnapshotDescription' },
{ output: 'isApplicationsRBACFeatureEnabled', platformKey: 'rbacApplication', teamKey: 'rbacApplication' },

Expand Down
Loading