feat: create named feature flag for settings v2 (#1976)

This commit is contained in:
Alex Hancock
2025-04-01 14:18:03 -04:00
committed by GitHub
parent 2fbf601446
commit 177cdbe0f2
6 changed files with 20 additions and 15 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ import { GOOSE_PROVIDER, GOOSE_MODEL } from '../env_vars';
import { Model } from '../components/settings/models/ModelContext';
import { gooseModels } from '../components/settings/models/GooseModels';
import { initializeAgent } from '../agent';
import { settingsV2Enabled } from '../flags';
import {
initializeBundledExtensions,
syncBundledExtensions,
@@ -85,7 +86,7 @@ export const initializeSystem = async (
await initializeAgent({ provider, model });
// This will go away after the release of settings v2 as this is now handled in config.yaml
if (!process.env.ALPHA) {
if (!settingsV2Enabled) {
// Sync the model state with React
const syncedModel = syncModelWithAgent(provider, model);
console.log('Model synced with React state:', syncedModel);
@@ -118,7 +119,7 @@ export const initializeSystem = async (
}
}
if (process.env.ALPHA) {
if (settingsV2Enabled) {
if (!options?.getExtensions || !options?.addExtension) {
console.warn('Extension helpers not provided in alpha mode');
return;