feat: migrate to react-markdown for robust markdown rendering
- Replace custom markdown parser with react-markdown + remark-gfm - Fix document link navigation (./ and ../ references) - Simplify doc viewing flow (direct markdown content instead of parsed structure) - Update electron main process to only use api folder for docs - Add blueprint loading from docs/blueprint.md dynamically - Fix sidebar file selection path matching - Update preload scripts for new API structure
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
selectFolder: () => ipcRenderer.invoke('select-folder'),
|
||||
getDocsPath: () => ipcRenderer.invoke('get-docs-path'),
|
||||
onDocsPathChanged: (callback: (path: string) => void) => {
|
||||
ipcRenderer.on('docs-path-changed', (_event, path) => callback(path));
|
||||
},
|
||||
listDocsFiles: (basePath) => ipcRenderer.invoke('list-docs-files', basePath),
|
||||
readDocFile: (filePath) => ipcRenderer.invoke('read-doc-file', filePath),
|
||||
log: (level, ...args) => ipcRenderer.send('renderer-log', level, ...args),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user