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 {