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:
Wu Yue
2025-06-26 17:04:57 +08:00
committed by GitHub
parent 5e193b58c0
commit 2171d1bfe2
16 changed files with 52 additions and 64 deletions
@@ -1,6 +1,6 @@
// packages/frontend/core/src/blocksuite/ai/hooks/useChatPanelConfig.ts
import { AIModelSwitchService } from '@affine/core/modules/ai-button/services/model-switch';
import { AINetworkSearchService } from '@affine/core/modules/ai-button/services/network-search';
import { AIPlaygroundService } from '@affine/core/modules/ai-button/services/playground';
import { AIReasoningService } from '@affine/core/modules/ai-button/services/reasoning';
import { CollectionService } from '@affine/core/modules/collection';
import { DocsService } from '@affine/core/modules/doc';
@@ -22,7 +22,7 @@ export function useAIChatConfig() {
const searchService = framework.get(AINetworkSearchService);
const reasoningService = framework.get(AIReasoningService);
const modelSwitchService = framework.get(AIModelSwitchService);
const playgroundService = framework.get(AIPlaygroundService);
const docDisplayMetaService = framework.get(DocDisplayMetaService);
const workspaceService = framework.get(WorkspaceService);
const searchMenuService = framework.get(SearchMenuService);
@@ -42,8 +42,8 @@ export function useAIChatConfig() {
setEnabled: reasoningService.setEnabled,
};
const modelSwitchConfig = {
visible: modelSwitchService.visible,
const playgroundConfig = {
visible: playgroundService.visible,
};
const docDisplayConfig = {
@@ -130,6 +130,6 @@ export function useAIChatConfig() {
reasoningConfig,
docDisplayConfig,
searchMenuConfig,
modelSwitchConfig,
playgroundConfig,
};
}