feat: bloc Toggle/Section repliable + infrastructure embeddings par fragments
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m33s
CI / Deploy production (on server) (push) Has been skipped

- Nouveau bloc Toggle : sections dépliables dans l'éditeur (slash menu + drag handle)
  - Transformer un bloc existant en section repliable via le menu d'action
  - Boutons désactiver (unwrap) et supprimer dans l'en-tête
  - i18n FR/EN complet
- Infrastructure embeddings par fragments (inspiré AppFlowy)
  - Table NoteEmbeddingChunk + index HNSW
  - Chunking sémantique (~1000 chars, overlap 200, dedup par hash)
  - Indexation incrémentale au save (createNote + updateNote + clip)
  - Queue concurrence 4, retry backoff exponentiel
This commit is contained in:
Antigravity
2026-06-14 16:23:56 +00:00
parent a623454347
commit fccad72d47
7 changed files with 219 additions and 1 deletions

View File

@@ -14,8 +14,10 @@ import {
Heading1, Heading2, Heading3, List, ListOrdered,
CheckSquare, Quote, CodeXml, Database,
ArrowUp, ArrowDown, AlignLeft, ClipboardCopy, Sparkles,
ChevronsRightLeft,
} from 'lucide-react'
import { replaceBlockWithStructuredView } from '@/components/tiptap-structured-view-block-extension'
import { insertToggleBlock, turnIntoToggleBlock } from '@/components/tiptap-toggle-extension'
interface BlockActionMenuProps {
editor: Editor
@@ -369,6 +371,14 @@ export function BlockActionMenu({
<div className="block-action-separator" />
{/* Section repliable */}
<button type="button" className="block-action-item" onClick={() => { turnIntoToggleBlock(editor, blockPos, blockNode); onClose() }}>
<ChevronsRightLeft size={16} />
<span>{t('richTextEditor.blockActionInsertToggle')}</span>
</button>
<div className="block-action-separator" />
{/* Création de diagramme */}
<button type="button" className="block-action-item" onClick={() => { void handleCreateDiagram() }}>
<Sparkles size={16} className="text-amber-500 transition-all duration-200" />