feat(ollama): 트레이 메뉴 "Ollama 설정..." (v0.2.3.1)

- 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) <noreply@anthropic.com>
This commit is contained in:
altair823
2026-05-04 23:43:00 +09:00
parent 833a598368
commit 0c0327ddb6
2 changed files with 10 additions and 2 deletions

View File

@@ -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 캡처 수로 갱신.

View File

@@ -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}`);