refactor(mentions): replace sidebarSelectedDocumentsAtom with mentionedDocumentsAtom and introduce getMentionDocKey utility for consistent document key generation

This commit is contained in:
Anish Sarkar 2026-04-29 04:12:42 +05:30
parent 282510f93c
commit 76c91adebc
5 changed files with 102 additions and 93 deletions

View file

@ -0,0 +1,8 @@
type MentionKeyInput = {
id: number;
document_type?: string | null;
};
export function getMentionDocKey(doc: MentionKeyInput): string {
return `${doc.document_type ?? "UNKNOWN"}:${doc.id}`;
}