L'assistant IA peut desormais inserer sa reponse dans l'editeur Forge (postMessage parent-insert) en plus d'Editer, et chaque bloc de code propose un bouton « Ajouter la section » pour n'inserer que ce bloc.
Le conteneur d'edition (#editor-container, CodeMirror ou iframe Forge) est deplace dans la zone de contenu du document (#content-area ou pane active) au lieu de l'overlay plein ecran : le mode edition remplace la vue lecture. L'overlay reste monte (transparent, pointer-events: none) car le ruban d'edition mobile y est ancre ; il ne sert plus que de repli quand la cible n'est pas le document affiche. Garde-fou dans renderFile() pour liberer proprement la session (destroy CodeMirror/Yjs, retrait de l'iframe Forge) ; forge-close passe par closeEditor() ; cache d'onglet invalide au retour en lecture.
Assistant IA : app_context.editing annonce le document en cours d'edition (frontend bookslm.js + backend bookslm.py), et chaque ecriture d'outil (edit_file, append_to_file, create_file, restore_backup) recharge le document affiche (obsigate:file-written) — tampon CodeMirror remplace avec auto-save neutralisee, parent-reload pour l'iframe Forge, re-rendu de la vue lecture sinon.
Tests : tests/frontend/editor-inline.test.mjs (19), tests/test_bookslm.py::TestGeneralPrompt (3 nouveaux). Fiche : docs/features/editeur-inline.md.
- Section Profil dans Configuration: langue (fr/en/es/de), nom
- Persistance localStorage (obsigate-lang, obsigate-name)
- Ghost text adapte le prompt a la langue du profil
- CSS profile-form, config-select stylise
- Mid-word: prompt avec contexte de la phrase + exemple
- acceptGhost: trim leading whitespace pour eviter double espace
- Prompt plus direct pour le modele 1.5B
- Mid-word: extrait le mot partiel, demande ONLY remaining letters
- Post-process: strip le texte d'entree du debut de la reponse
- Support caracteres accentues dans la regex mid-word
- Prompt plus direct: Complete this word / Continue this text
- Ollama provider ajoute dans ai.py (OpenAI-compatible API)
- Service ollama dans docker-compose (auto-pull qwen2.5-coder:1.5b)
- Ghost overlay dans Forge: prediction en texte pale apres le curseur
- Tab pour accepter, Escape pour rejeter, taper pour annuler
- Declenchement automatique apres 800ms de pause
- Scroll sync entre overlay et textarea
- Env vars: AI_DEFAULT_PROVIDER, OLLAMA_BASE_URL, OLLAMA_MODEL
- Listes: reconstruit fullLine (before+after) pour matcher regex milieu de ligne
- curseur dans le prefixe → laisse le navigateur gerer (pas d'interception)
- Autocomplete: suggest/detectContext charges via import() dynamique
- Alt+Backslash gere les deux variantes de key (\ et Backslash)
- Enter sur '- [ ]' sans texte: casse la liste (supprime la ligne vide)
- Raccourci: Alt+/ → Alt+\ (n'entre pas en conflit avec le slash menu)
- Aide F1, barre statut, console mis a jour
- Raccourci: Ctrl+Space → Alt+/ (evite conflit OS)
- Enter sur ligne liste (-, *, +) → continue la puce
- Enter sur ligne vide (puce sans texte) → termine la liste
- Enter sur liste numerotee (1.) → auto-incremente (2.)
- Enter sur checkbox (- [ ]) → nouvelle checkbox vide
- Aide F1 mise a jour, barre statut mise a jour
- Retrait des 3 boutons (delete/cancel/save) de la barre Forge (doublons)
- Retrait des handlers JS associés dans editor-poc.html
- Le header parent ObsiGate reste visible quand Forge est ouvert
- Les boutons save/delete du parent délèguent à Forge via postMessage
- Forge écoute 'parent-save' et 'parent-delete' du parent
- state.editorVault/editorPath settés dans viewer.js pour le parent
Tab/Shift+Tab: indent/dedent list items. Ctrl+K: link insertion prompt. Qi button: position:fixed (always visible). Auto-focus textarea on load. AI ready indicator in status bar. All error messages in French. Force-save shows 'Sauvegarde' toast.
Added CDN scripts: mermaid@11, highlight.js@11 with atom-one-dark theme. After server-rendered HTML is injected, processPreviewBlocks() renders Mermaid diagrams via mermaid.render() and highlights code blocks via hljs.highlightElement(). Preview now matches ObsiGate viewer fidelity.
Preview now saves content via API then fetches rendered HTML from GET /api/file/{vault}?path=... instead of client-side marked.parse(). This enables Mermaid diagrams, syntax highlighting, wikilink resolution, and frontmatter cards. Demo mode still uses marked.js fallback. Debounce increased to 500ms. Loading spinner during render.
Added autoHeight() helper called after ta.value is set in both demo mode and API load. Previously only triggered on input event, so loaded files only showed first line (scrollHeight was 0 until user typed).
Changed from selectionStart to selectionEnd so bubble follows where user finished selecting. Removed broken fallback that repositioned to textarea bottom on every scroll. Simple viewport clamp instead.
Table: inline form with cols/rows inputs, positioned at cursor. Enter to insert, Esc to cancel. Code block: language picker with 41 languages (bash,js,ts,py,java,rust,go,c,cpp,html,css,json,yaml,sql,dockerfile...), navigable via arrows+Enter. All positioned via caretToPixel like other menus. Click outside closes.
Textarea overflow:hidden + auto-height via scrollHeight to eliminate double scrollbar. Sync scroll between editor and preview panes (bidirectional percentage). Alt+I menu now includes 7 Mermaid diagram templates (flowchart, sequence, class, state, ER, gantt, pie). Table now prompts for cols/rows via prompt(). Bubble menu follows cursor via document selectionchange event.
Slash nav: moved from textarea keydown to slashSearch input keydown (textarea loses focus when slash menu opens). QI nav: document-level up/down/enter/esc with highlight. Bubble: positioned at selection start via caretToPixel instead of textarea bottom center.
Slash menu now positioned below current line at the / character using monospace caret-to-pixel calc. Bubble menu now below textarea (was above). Quick Insert menu now opens below cursor line via Alt+I shortcut and click button. Status bar shows Alt+I hint.
GET /api/file/{vault}?path=... returns html/title but not raw content. Switched to GET /api/file/{vault}/raw?path=... which returns {raw:...}. Title now extracted from first # heading in the content.
Load file via ?vault=X&path=Y params using API. Auto-save 2s debounce with PUT /api/file/{vault}/save. Force save with Ctrl+S. Real AI integration: improve, fix-spelling, continue, summarize, translate, simplify, lengthen via /api/ai/* endpoints. AI status check + button states. Live markdown preview with marked.js CDN. Split view with draggable resize handle. Dirty/unsaved indicator. Vault+path in status bar. Word+char counter. All 5 zones preserved.
Replace contenteditable div with textarea for real markdown editing. insertAtCursor, wrapSelection, replaceLineAtCursor. 18 slash commands map to real markdown syntax. Bubble menu Bold/Italic/Strike/Code/Highlight wrap selection. Ctrl+B/I shortcuts. Word+char count.
Add standalone /editor-poc page demonstrating all 5 toolbar zones:
- Zone 1: Top Fixed Bar (hamburger, title, AI glow button, save indicator)
- Zone 2a: Slash Command Menu (/ on empty line, 15 commands, filtering)
- Zone 2b: Bubble Menu (on text selection, formatting + AI dropdown)
- Zone 3: Floating Quick Insert (per-line, Image/PDF/Code/Table/AI)
- Zone 4: AI Side Panel (Ctrl+J toggle, chat, suggestions)
- Zone 5: Drag & Drop overlay with dashed border
Files:
- new: frontend/editor-poc.html (46KB standalone vanilla JS)
- backend/main.py: +/editor-poc route before catch-all
- frontend/index.html: Editor POC button in header menu
- frontend/js/config.js: initEditorPocBtn() function + export
- frontend/js/legacy.js: re-export initEditorPocBtn
- frontend/js/app.js + frontend/app.js: init call in both versions