From 0c0327ddb6af52ef0579271e9c6f085e38904160 Mon Sep 17 00:00:00 2001 From: altair823 Date: Mon, 4 May 2026 23:43:00 +0900 Subject: [PATCH] =?UTF-8?q?feat(ollama):=20=ED=8A=B8=EB=A0=88=EC=9D=B4=20?= =?UTF-8?q?=EB=A9=94=EB=89=B4=20"Ollama=20=EC=84=A4=EC=A0=95..."=20(v0.2.3?= =?UTF-8?q?.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - createTray 10번째 positional callback runOpenOllamaSettings - 트레이 → 메뉴 클릭 → main 이 inbox:openOllamaSettings IPC push - renderer App.tsx 가 구독해 modal open backlog #4/#26 (TrayCallbacks object refactor) 와 합산 — v0.2.4 시 일괄 정리 Co-Authored-By: Claude Opus 4.7 (1M context) --- src/main/index.ts | 6 +++++- src/main/tray.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index f5c0d56..14a16c1 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -359,7 +359,11 @@ app.whenReady().then(async () => { } }, /* runOllamaRecheck */ () => { void health.runOnce({ manual: true }); }, - /* runRetryAllFailed */ () => { void capture.retryAllFailed(); } + /* runRetryAllFailed */ () => { void capture.retryAllFailed(); }, + /* runOpenOllamaSettings */ () => { + const win = getInboxWindow(); + if (win) win.webContents.send('inbox:openOllamaSettings'); + } ); // F4-C 환경 앵커 — tray tooltip + 메뉴 첫 항목을 오늘 KST 캡처 수로 갱신. diff --git a/src/main/tray.ts b/src/main/tray.ts index 9d7e8bc..38af617 100644 --- a/src/main/tray.ts +++ b/src/main/tray.ts @@ -15,6 +15,7 @@ let _ollamaOk = true; let _todayCount = 0; let _runRetryAllFailed: () => void = () => {}; let _failedCount = 0; +let _runOpenOllamaSettings: () => void = () => {}; function buildMenu() { const items: MenuItemConstructorOptions[] = []; @@ -41,6 +42,7 @@ function buildMenu() { enabled: _failedCount > 0, click: _runRetryAllFailed }); + items.push({ label: 'Ollama 설정...', click: () => _runOpenOllamaSettings() }); if (app.isPackaged) { const { openAtLogin } = app.getLoginItemSettings(); items.push({ @@ -71,7 +73,8 @@ export function createTray( runSync: () => void, runExportTelemetry: () => void, runOllamaRecheck: () => void, - runRetryAllFailed: () => void + runRetryAllFailed: () => void, + runOpenOllamaSettings: () => void ): TrayType { _showInbox = showInbox; _showCapture = showCapture; @@ -82,6 +85,7 @@ export function createTray( _runExportTelemetry = runExportTelemetry; _runOllamaRecheck = runOllamaRecheck; _runRetryAllFailed = runRetryAllFailed; + _runOpenOllamaSettings = runOpenOllamaSettings; const icon = nativeImage.createEmpty(); tray = new Tray(icon); tray.setToolTip(`Inkling — 오늘 ${_todayCount}`);