chore: reorganize mention setup

This commit is contained in:
kolaente
2025-11-10 11:24:45 +01:00
parent 43a5ae1309
commit 0d83a568ce
3 changed files with 3 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ import {Node} from '@tiptap/pm/model'
import Commands from './commands'
import suggestionSetup from './suggestion'
import mentionSuggestionSetup from './mentionSuggestion'
import mentionSuggestionSetup from './mention/mentionSuggestion'
import {common, createLowlight} from 'lowlight'

View File

@@ -7,6 +7,7 @@ import ProjectUserService from '@/services/projectUsers'
import { fetchAvatarBlobUrl, getDisplayName } from '@/models/user'
import type { IUser } from '@/modelTypes/IUser'
import type { MentionNodeAttrs } from '@tiptap/extension-mention'
interface MentionItem extends MentionNodeAttrs {
id: string
label: string
@@ -25,7 +26,7 @@ async function searchUsersForProject(projectId: number, query: string): Promise<
users.map(async (user) => {
const avatarUrl = await fetchAvatarBlobUrl(user, 32)
return {
id: String(user.id),
id: user.username,
label: getDisplayName(user),
username: user.username,
avatarUrl: avatarUrl as string,