feat(notes): liens internes, onglet Réseau, living blocks et consentement IA
Rend les liens entre notes visibles et persistants (sync NoteLink au save, auto-save, graphe réseau rafraîchi), ajoute living blocks, Memory Echo, recherche globale, consentement IA explicite et consolide les prototypes design en architectural-grid. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useSearchParams } from 'next/navigation'
|
||||
import { useSession } from 'next-auth/react'
|
||||
import { useAiConsent } from '@/components/legal/ai-consent-provider'
|
||||
|
||||
/**
|
||||
* Hook to check if auto label suggestions should be shown for the current notebook
|
||||
@@ -8,6 +9,7 @@ import { useSession } from 'next-auth/react'
|
||||
*/
|
||||
export function useAutoLabelSuggestion() {
|
||||
const { data: session } = useSession()
|
||||
const { hasAiConsent } = useAiConsent()
|
||||
const searchParams = useSearchParams()
|
||||
const [shouldSuggest, setShouldSuggest] = useState(false)
|
||||
const [notebookId, setNotebookId] = useState<string | null>(searchParams.get('notebook'))
|
||||
@@ -23,11 +25,11 @@ export function useAutoLabelSuggestion() {
|
||||
setShouldSuggest(false)
|
||||
|
||||
// Check if we should suggest labels for this notebook
|
||||
if (currentNotebookId && session?.user?.id) {
|
||||
if (currentNotebookId && session?.user?.id && hasAiConsent) {
|
||||
checkNotebookForSuggestions(currentNotebookId)
|
||||
}
|
||||
}
|
||||
}, [searchParams, notebookId, session])
|
||||
}, [searchParams, notebookId, session, hasAiConsent])
|
||||
|
||||
const checkNotebookForSuggestions = async (nbId: string) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user