mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(core): hide start-with-ai if service feature is not enabled (#11633)
> CLOSE BS-3062
This commit is contained in:
@@ -3,9 +3,9 @@ import {
|
||||
handleInlineAskAIAction,
|
||||
pageAIGroups,
|
||||
} from '@affine/core/blocksuite/ai';
|
||||
import { useEnableAI } from '@affine/core/components/hooks/affine/use-enable-ai';
|
||||
import { DocsService } from '@affine/core/modules/doc';
|
||||
import { EditorService } from '@affine/core/modules/editor';
|
||||
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||
import { TemplateDocService } from '@affine/core/modules/template-doc';
|
||||
import {
|
||||
TemplateListMenu,
|
||||
@@ -59,7 +59,6 @@ const StarterBarNotEmpty = ({ doc }: { doc: Store }) => {
|
||||
const t = useI18n();
|
||||
|
||||
const templateDocService = useService(TemplateDocService);
|
||||
const featureFlagService = useService(FeatureFlagService);
|
||||
const docsService = useService(DocsService);
|
||||
const editorService = useService(EditorService);
|
||||
|
||||
@@ -71,7 +70,7 @@ const StarterBarNotEmpty = ({ doc }: { doc: Store }) => {
|
||||
[doc.id, templateDocService.list]
|
||||
)
|
||||
);
|
||||
const enableAI = useLiveData(featureFlagService.flags.enable_ai.$);
|
||||
const enableAI = useEnableAI();
|
||||
|
||||
const handleSelectTemplate = useAsyncCallback(
|
||||
async (templateId: string) => {
|
||||
|
||||
Reference in New Issue
Block a user