feat(notes): liens internes, onglet Réseau, living blocks et consentement IA
Some checks failed
CI / Lint, Test & Build (push) Failing after 1m19s
CI / Deploy production (on server) (push) Has been skipped

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:
Antigravity
2026-05-24 14:27:29 +00:00
parent 077e665dfc
commit e2672cd2c2
323 changed files with 20670 additions and 42431 deletions

View File

@@ -1,5 +1,6 @@
import { useState, useEffect, useRef } from 'react'
import { useDebounce } from './use-debounce'
import { useAiConsent } from '@/components/legal/ai-consent-provider'
export interface TitleSuggestion {
title: string
@@ -13,6 +14,7 @@ interface UseTitleSuggestionsProps {
}
export function useTitleSuggestions({ content, enabled = true }: UseTitleSuggestionsProps) {
const { requestAiConsent, hasAiConsent } = useAiConsent()
const [suggestions, setSuggestions] = useState<TitleSuggestion[]>([])
const [isAnalyzing, setIsAnalyzing] = useState(false)
const [error, setError] = useState<string | null>(null)
@@ -41,6 +43,14 @@ export function useTitleSuggestions({ content, enabled = true }: UseTitleSuggest
abortRef.current = controller
const generateTitles = async () => {
if (!hasAiConsent) {
const consented = await requestAiConsent()
if (!consented) {
setSuggestions([])
return
}
}
setIsAnalyzing(true)
setError(null)
@@ -73,7 +83,7 @@ export function useTitleSuggestions({ content, enabled = true }: UseTitleSuggest
}
generateTitles()
}, [debouncedContent, enabled])
}, [debouncedContent, enabled, hasAiConsent, requestAiConsent])
// Cleanup on unmount
useEffect(() => {