feat: Add related notes functionality with new API endpoint and frontend components, and update note search route.

This commit is contained in:
2025-12-26 00:35:32 +01:00
parent 64f8118228
commit c8276ac306
12 changed files with 245 additions and 37 deletions

View File

@@ -30,4 +30,7 @@ pub trait LinkRepository: Send + Sync {
/// Delete existing links for a specific source note (e.g., before regenerating).
async fn delete_links_for_source(&self, source_note_id: Uuid) -> DomainResult<()>;
/// Get links for a specific source note.
async fn get_links_for_note(&self, source_note_id: Uuid) -> DomainResult<Vec<NoteLink>>;
}

View File

@@ -406,6 +406,14 @@ impl SmartNoteService {
Ok(())
}
/// Get related notes for a given note ID
pub async fn get_related_notes(
&self,
note_id: Uuid,
) -> DomainResult<Vec<crate::entities::NoteLink>> {
self.link_repo.get_links_for_note(note_id).await
}
}
#[cfg(test)]