From 20394bf2a35b2dbc7dfdcc684a1b435d28a1e7e2 Mon Sep 17 00:00:00 2001 From: altair823 Date: Sat, 2 May 2026 13:22:16 +0900 Subject: [PATCH] =?UTF-8?q?feat(recall):=20IPC=20+=20preload=20+=20InboxAp?= =?UTF-8?q?i=20=E2=80=94=205=20channels=20(#6=20v0.2.3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ipcMain.handle: list/markOpened/dismiss/emitShown/emitSnoozed - preload inboxApi: 5 entries (ipcRenderer.invoke) - shared/types InboxApi: 5 method signatures Co-Authored-By: Claude Opus 4.7 (1M context) --- src/main/ipc/inboxApi.ts | 6 ++++++ src/preload/index.ts | 7 ++++++- src/shared/types.ts | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/ipc/inboxApi.ts b/src/main/ipc/inboxApi.ts index 3acb463..5579cb8 100644 --- a/src/main/ipc/inboxApi.ts +++ b/src/main/ipc/inboxApi.ts @@ -136,6 +136,12 @@ export function registerInboxApi(deps: InboxIpcDeps): void { ipcMain.handle('inbox:retryAllFailed', async () => deps.capture.retryAllFailed()); ipcMain.handle('inbox:failedCount', () => deps.repo.countFailed()); + + ipcMain.handle('inbox:listRecallCandidate', () => deps.capture.listRecallCandidate()); + ipcMain.handle('inbox:markRecallOpened', (_e, id: string) => deps.capture.markRecallOpened(id)); + ipcMain.handle('inbox:dismissRecall', (_e, id: string) => deps.capture.dismissRecall(id)); + ipcMain.handle('inbox:emitRecallShown', (_e, id: string) => deps.capture.emitRecallShown(id)); + ipcMain.handle('inbox:emitRecallSnoozed', (_e, id: string) => deps.capture.emitRecallSnoozed(id)); } export function pushNoteUpdated(getWin: () => BrowserWindow | null, note: Note): void { diff --git a/src/preload/index.ts b/src/preload/index.ts index 2cb2a39..eaa043f 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -39,7 +39,12 @@ const api: InklingApi = { return () => ipcRenderer.off('ollama:status', listener); }, retryAllFailed: () => ipcRenderer.invoke('inbox:retryAllFailed'), - getFailedCount: () => ipcRenderer.invoke('inbox:failedCount') + getFailedCount: () => ipcRenderer.invoke('inbox:failedCount'), + listRecallCandidate: () => ipcRenderer.invoke('inbox:listRecallCandidate'), + markRecallOpened: (id: string) => ipcRenderer.invoke('inbox:markRecallOpened', id), + dismissRecall: (id: string) => ipcRenderer.invoke('inbox:dismissRecall', id), + emitRecallShown: (id: string) => ipcRenderer.invoke('inbox:emitRecallShown', id), + emitRecallSnoozed: (id: string) => ipcRenderer.invoke('inbox:emitRecallSnoozed', id) } }; diff --git a/src/shared/types.ts b/src/shared/types.ts index 726b63d..e1dccea 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -84,6 +84,11 @@ export interface InboxApi { onOllamaStatus(cb: (status: { ok: boolean; reason?: string }) => void): () => void; retryAllFailed(): Promise<{ count: number }>; getFailedCount(): Promise; + listRecallCandidate(): Promise; + markRecallOpened(id: string): Promise<{ note: Note }>; + dismissRecall(id: string): Promise<{ note: Note }>; + emitRecallShown(id: string): Promise; + emitRecallSnoozed(id: string): Promise; } export interface InklingApi {