diff options
| author | haoyuren <13851610112@163.com> | 2026-07-30 08:53:27 +0800 |
|---|---|---|
| committer | haoyuren <13851610112@163.com> | 2026-07-30 08:53:27 +0800 |
| commit | c9cd5119077c69088eb8ba768ee1e1602baec751 (patch) | |
| tree | 843842b3c7676b66672db3893ee25a89b47830b6 /src/preload | |
| parent | d35a6a0ef366f86aeba28c06f40e44cd29cf1f07 (diff) | |
Add workspace file browser and OpenAlex citation search
Workspace browser:
- The left panel gains a Project/Workspace toggle; the Workspace view
browses the agent scratch space (claude-workspace/, never synced)
- Open/edit workspace text files in the editor with debounced auto-save
(flushed on tab switch); binaries open with the system default app
- Import to Project copies a workspace file/folder into the project root
where the sync bridge picks it up and creates it on Overleaf
(collision-safe: falls back to a -imported suffix)
- New file/folder, rename, delete, reveal in Finder, drag-drop into the
workspace, 5s auto-refresh while visible
OpenAlex search (MCP):
- New search_openalex tool: broad OpenAlex coverage with an explicit
citation-authority policy — BibTeX is cross-checked against Semantic
Scholar (by DOI, then by exact title, since OpenAlex DOIs can point at
mirrors); entries not found on S2 are flagged "OpenAlex only" with
instructions to verify via web search before citing
- Tool description, agent guide, permission allowlist, and README updated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'src/preload')
| -rw-r--r-- | src/preload/index.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/preload/index.ts b/src/preload/index.ts index d3cddea..a4d8179 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -12,8 +12,20 @@ window.addEventListener('wheel', (e) => { const api = { // File system - readFile: (path: string) => ipcRenderer.invoke('fs:readFile', path), + readFile: (path: string) => ipcRenderer.invoke('fs:readFile', path) as Promise<string>, readBinary: (path: string) => ipcRenderer.invoke('fs:readBinary', path) as Promise<ArrayBuffer>, + writeFile: (path: string, content: string) => ipcRenderer.invoke('fs:writeFile', path, content) as Promise<void>, + listDirTree: (rootPath: string, pathPrefix: string) => + ipcRenderer.invoke('fs:listDirTree', rootPath, pathPrefix) as Promise<Array<{ + name: string; path: string; isDir: boolean + children?: Array<{ name: string; path: string; isDir: boolean; children?: unknown[] }> + }>>, + mkdirp: (path: string) => ipcRenderer.invoke('fs:mkdirp', path) as Promise<void>, + renamePath: (oldPath: string, newPath: string) => ipcRenderer.invoke('fs:rename', oldPath, newPath) as Promise<void>, + deletePath: (path: string) => ipcRenderer.invoke('fs:deletePath', path) as Promise<void>, + copyPath: (src: string, dest: string) => ipcRenderer.invoke('fs:copyPath', src, dest) as Promise<void>, + pathExists: (path: string) => ipcRenderer.invoke('fs:exists', path) as Promise<boolean>, + openPath: (path: string) => ipcRenderer.invoke('shell:openPath', path) as Promise<string>, // LaTeX onCompileLog: (cb: (log: string) => void) => { |
