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:
Peng Xiao
2025-07-03 16:19:19 +08:00
committed by GitHub
parent 532ea6af07
commit 81f542a4da
4 changed files with 185 additions and 50 deletions
@@ -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();
}