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:
@@ -6,6 +6,7 @@ import { X, FolderOpen } from 'lucide-react'
|
||||
import { useNotebooks } from '@/context/notebooks-context'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useLanguage } from '@/lib/i18n'
|
||||
import { useAiConsent } from '@/components/legal/ai-consent-provider'
|
||||
import { getNotebookIcon } from '@/lib/notebook-icon'
|
||||
|
||||
interface NotebookSuggestionToastProps {
|
||||
@@ -22,6 +23,7 @@ export function NotebookSuggestionToast({
|
||||
onMoveToNotebook
|
||||
}: NotebookSuggestionToastProps) {
|
||||
const { t } = useLanguage()
|
||||
const { hasAiConsent } = useAiConsent()
|
||||
const [suggestion, setSuggestion] = useState<any>(null)
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const [visible, setVisible] = useState(true)
|
||||
@@ -47,6 +49,8 @@ export function NotebookSuggestionToast({
|
||||
// Fetch suggestion when component mounts
|
||||
useEffect(() => {
|
||||
const fetchSuggestion = async () => {
|
||||
if (!hasAiConsent) return
|
||||
|
||||
// Only suggest if content is long enough (> 20 words)
|
||||
const wordCount = noteContent.trim().split(/\s+/).length
|
||||
if (wordCount < 20) {
|
||||
@@ -78,7 +82,7 @@ export function NotebookSuggestionToast({
|
||||
}
|
||||
|
||||
fetchSuggestion()
|
||||
}, [noteContent])
|
||||
}, [noteContent, hasAiConsent])
|
||||
|
||||
const handleDismiss = () => {
|
||||
setVisible(false)
|
||||
|
||||
Reference in New Issue
Block a user