From cfb2b68e486caa8bcdc3e19af4224a3dfd254083 Mon Sep 17 00:00:00 2001 From: cstns Date: Wed, 20 May 2026 17:54:52 +0300 Subject: [PATCH 1/3] Add AI feature flag configuration --- etc/flowforge.yml | 10 +++++++++- forge/ee/lib/index.js | 3 +++ forge/lib/features.js | 2 ++ frontend/src/stores/account-settings.js | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/etc/flowforge.yml b/etc/flowforge.yml index 6bf59658d9..42059a3fd7 100644 --- a/etc/flowforge.yml +++ b/etc/flowforge.yml @@ -67,6 +67,14 @@ driver: # public_url: ws://localhost:4881 +################################################# +# AI Configuration # +################################################# + +# ai: +# enabled: false + + ################################################# # Assistant Configuration # ################################################# @@ -127,4 +135,4 @@ rate_limits: # Create Default Admin # ################################################# # create_admin: false -# create_admin_access_token: false \ No newline at end of file +# create_admin_access_token: false diff --git a/forge/ee/lib/index.js b/forge/ee/lib/index.js index 75c472a704..83a5e97c79 100644 --- a/forge/ee/lib/index.js +++ b/forge/ee/lib/index.js @@ -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 ?? false, true) + // Set the Generate Snapshot Description Feature Flag app.config.features.register('generatedSnapshotDescription', true, true) diff --git a/forge/lib/features.js b/forge/lib/features.js index 17bef62554..7be6973bd0 100644 --- a/forge/lib/features.js +++ b/forge/lib/features.js @@ -20,6 +20,7 @@ const featureList = [ 'instanceResources', 'tables', 'certifiedNodes', + 'ai', 'assistantInlineCompletions', 'generatedSnapshotDescription', 'ffNodes', @@ -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', diff --git a/frontend/src/stores/account-settings.js b/frontend/src/stores/account-settings.js index a2c1f5ed13..e47c1f0049 100644 --- a/frontend/src/stores/account-settings.js +++ b/frontend/src/stores/account-settings.js @@ -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' }, From 93900f4db5ac622ea04bc2a75c63a514436f709a Mon Sep 17 00:00:00 2001 From: cstns Date: Thu, 21 May 2026 13:53:56 +0300 Subject: [PATCH 2/3] Enable AI features by default in configuration --- etc/flowforge.yml | 2 +- forge/ee/lib/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/flowforge.yml b/etc/flowforge.yml index 42059a3fd7..949b8bdbd1 100644 --- a/etc/flowforge.yml +++ b/etc/flowforge.yml @@ -72,7 +72,7 @@ driver: ################################################# # ai: -# enabled: false +# enabled: true ################################################# diff --git a/forge/ee/lib/index.js b/forge/ee/lib/index.js index 83a5e97c79..b9d72cd14e 100644 --- a/forge/ee/lib/index.js +++ b/forge/ee/lib/index.js @@ -39,7 +39,7 @@ module.exports = fp(async function (app, opts) { 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 ?? false, true) + 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) From 9cc3e9bc190db8a33cd3c47e162c0a1e45ae5b56 Mon Sep 17 00:00:00 2001 From: cstns Date: Thu, 21 May 2026 16:10:50 +0300 Subject: [PATCH 3/3] Refactor `TeamTypeEditDialog` to filter features dynamically based on platform-loaded settings --- .../TeamTypes/dialogs/TeamTypeEditDialog.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/admin/TeamTypes/dialogs/TeamTypeEditDialog.vue b/frontend/src/pages/admin/TeamTypes/dialogs/TeamTypeEditDialog.vue index 6842974da5..985aaf6eb9 100644 --- a/frontend/src/pages/admin/TeamTypes/dialogs/TeamTypeEditDialog.vue +++ b/frontend/src/pages/admin/TeamTypes/dialogs/TeamTypeEditDialog.vue @@ -172,9 +172,9 @@
Persistent File storage limit (Mb) Persistent Context storage limit (Mb) @@ -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) }, @@ -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