feat(core): add ai playground feature flag and remove model switch feature flag (#12934)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for the "AI Playground" experimental feature, including new settings and localization entries. * **Refactor** * Renamed configuration and service references from "Model Switch" to "Playground" across the AI chat and playground interfaces. * Updated feature flag from "enable_ai_model_switch" to "enable_ai_playground" for consistency. * **Bug Fixes** * The "Model" submenu in AI chat preferences is now always visible, simplifying menu options. * **Chores** * Removed outdated Claude model options from the chat prompt. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -7,8 +7,8 @@ import { FeatureFlagService } from '../feature-flag';
|
||||
import { GlobalStateService } from '../storage';
|
||||
import { AIButtonProvider } from './provider/ai-button';
|
||||
import { AIButtonService } from './services/ai-button';
|
||||
import { AIModelSwitchService } from './services/model-switch';
|
||||
import { AINetworkSearchService } from './services/network-search';
|
||||
import { AIPlaygroundService } from './services/playground';
|
||||
import { AIReasoningService } from './services/reasoning';
|
||||
|
||||
export const configureAIButtonModule = (framework: Framework) => {
|
||||
@@ -28,6 +28,6 @@ export function configureAIReasoningModule(framework: Framework) {
|
||||
framework.service(AIReasoningService, [GlobalStateService]);
|
||||
}
|
||||
|
||||
export function configureAIModelSwitchModule(framework: Framework) {
|
||||
framework.service(AIModelSwitchService, [FeatureFlagService]);
|
||||
export function configureAIPlaygroundModule(framework: Framework) {
|
||||
framework.service(AIPlaygroundService, [FeatureFlagService]);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Service } from '@toeverything/infra';
|
||||
|
||||
import type { FeatureFlagService } from '../../feature-flag';
|
||||
|
||||
export class AIModelSwitchService extends Service {
|
||||
export class AIPlaygroundService extends Service {
|
||||
constructor(private readonly featureFlagService: FeatureFlagService) {
|
||||
super();
|
||||
|
||||
@@ -22,5 +22,5 @@ export class AIModelSwitchService extends Service {
|
||||
visible: Signal<boolean | undefined>;
|
||||
|
||||
private readonly _visible$ =
|
||||
this.featureFlagService.flags.enable_ai_model_switch.$;
|
||||
this.featureFlagService.flags.enable_ai_playground.$;
|
||||
}
|
||||
Reference in New Issue
Block a user