mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-03 18:40:00 +08:00
fix(core): dedicated link config for comments (#13003)
#### PR Dependency Tree * **PR #13003** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced enhanced member mention functionality in the comment editor, including improved search, highlighting, and avatar display for mentioning users. * **Refactor** * Simplified configuration options for linked widgets and menu groups, removing the ability to selectively include menu groups. * Updated internal logic to streamline menu group handling and improve performance during member searches. * **Bug Fixes** * Prevented unnecessary member search calls on empty queries for better efficiency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
import {
|
||||
AtMenuConfigService,
|
||||
type LinkedMenuGroupType,
|
||||
} from '@affine/core/modules/at-menu-config/services';
|
||||
import { AtMenuConfigService } from '@affine/core/modules/at-menu-config/services';
|
||||
import type { LinkedWidgetConfig } from '@blocksuite/affine/widgets/linked-doc';
|
||||
import { type FrameworkProvider } from '@toeverything/infra';
|
||||
|
||||
export function createLinkedWidgetConfig(
|
||||
framework: FrameworkProvider,
|
||||
options?: {
|
||||
includedGroups?: LinkedMenuGroupType[];
|
||||
}
|
||||
framework: FrameworkProvider
|
||||
): Partial<LinkedWidgetConfig> | undefined {
|
||||
const service = framework.getOptional(AtMenuConfigService);
|
||||
if (!service) return;
|
||||
return service.getConfig(options?.includedGroups);
|
||||
return service.getConfig();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user