Skip to content

Commit 4810241

Browse files
cstnshardillb
andauthored
Gate snapshot description and inline completions flags behind assistant config (#7318)
Co-authored-by: Ben Hardill <ben@flowforge.com>
1 parent b552536 commit 4810241

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

forge/ee/lib/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ module.exports = fp(async function (app, opts) {
4242
app.config.features.register('ai', app.config?.ai?.enabled ?? true, true)
4343

4444
// Set the Generate Snapshot Description Feature Flag
45-
app.config.features.register('generatedSnapshotDescription', true, true)
45+
const isAssistantConfigured = app.config.assistant?.enabled === true && !!app.config.assistant?.service?.url
46+
app.config.features.register('generatedSnapshotDescription', isAssistantConfigured, true)
4647

4748
// Set the assistant inline completions Feature Flag
48-
app.config.features.register('assistantInlineCompletions', true, true)
49+
app.config.features.register('assistantInlineCompletions', isAssistantConfigured, true)
4950

5051
// Set the expert assistant Feature Flag
5152
app.config.features.register('expertAssistant', app.config?.expert?.enabled ?? false, true)

0 commit comments

Comments
 (0)