From c261b8c4a95a7af64e3cd95a65c50f4dcbbb802c Mon Sep 17 00:00:00 2001 From: haoyuren <13851610112@163.com> Date: Sat, 14 Mar 2026 22:26:36 -0500 Subject: 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 --- src/preload/index.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/preload') 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) => -- cgit v1.2.3