Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: hide find in page command in cmdk (#7413)

pengx17fc729d6a3292
diff --git a/packages/frontend/core/src/hooks/affine/use-register-find-in-page-commands.ts b/packages/frontend/core/src/hooks/affine/use-register-find-in-page-commands.ts
index 11cb88d812..dbca1c48c7 100644
--- a/packages/frontend/core/src/hooks/affine/use-register-find-in-page-commands.ts
+++ b/packages/frontend/core/src/hooks/affine/use-register-find-in-page-commands.ts
@@ -1,4 +1,7 @@
-import { registerAffineCommand } from '@affine/core/commands';
+import {
+ PreconditionStrategy,
+ registerAffineCommand,
+} from '@affine/core/commands';
import { FindInPageService } from '@affine/core/modules/find-in-page/services/find-in-page';
import { useService } from '@toeverything/infra';
import { useCallback, useEffect } from 'react';
@@ -20,6 +23,7 @@ export function useRegisterFindInPageCommands() {
const unsubs: Array<() => void> = [];
unsubs.push(
registerAffineCommand({
+ preconditionStrategy: PreconditionStrategy.Never,
id: `editor:find-in-page`,
keyBinding: {
binding: '$mod+f',