mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-10 16:22:38 +02:00
refactor(mentions): replace sidebarSelectedDocumentsAtom with mentionedDocumentsAtom and introduce getMentionDocKey utility for consistent document key generation
This commit is contained in:
parent
282510f93c
commit
76c91adebc
5 changed files with 102 additions and 93 deletions
8
surfsense_web/lib/chat/mention-doc-key.ts
Normal file
8
surfsense_web/lib/chat/mention-doc-key.ts
Normal 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}`;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue