diff options
| author | haoyuren <13851610112@163.com> | 2026-03-14 22:26:36 -0500 |
|---|---|---|
| committer | haoyuren <13851610112@163.com> | 2026-03-14 22:26:36 -0500 |
| commit | c261b8c4a95a7af64e3cd95a65c50f4dcbbb802c (patch) | |
| tree | b2b31cd96a1ab8b1740402b417692a7ef5935581 /src/preload/index.ts | |
| parent | 2ee6d867bd93bb955429a274865320dfa5bd0f69 (diff) | |
Add new file sync to Overleaf, Copy Comments button with file filtering
- Sync new local files (created by Claude Code etc.) to Overleaf via REST API
- Create intermediate folders as needed, handle both text docs and binaries
- Scan for orphaned files on startup that weren't synced previously
- Add "Copy Comments" quick action: copies unresolved comments for current file
to clipboard with line numbers, context, author names, and timestamps
- Filter comments to active file only, exclude resolved threads
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/preload/index.ts')
| -rw-r--r-- | src/preload/index.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/preload/index.ts b/src/preload/index.ts index aa16872..7b23d27 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -149,6 +149,11 @@ const api = { }, syncContentChanged: (docId: string, content: string) => ipcRenderer.invoke('sync:contentChanged', docId, content), + onSyncNewDoc: (cb: (data: { docId: string | null; relPath: string }) => void) => { + const handler = (_e: Electron.IpcRendererEvent, data: { docId: string | null; relPath: string }) => cb(data) + ipcRenderer.on('sync:newDoc', handler) + return () => ipcRenderer.removeListener('sync:newDoc', handler) + }, // Cursor tracking cursorUpdate: (docId: string, row: number, column: number) => |
