diff options
| author | haoyuren <13851610112@163.com> | 2026-03-15 20:52:13 -0500 |
|---|---|---|
| committer | haoyuren <13851610112@163.com> | 2026-03-15 20:52:13 -0500 |
| commit | 66a403488f3a7bc32a02bc9933c396dc4c4e031d (patch) | |
| tree | af52777ac10a1b31487203c4281178e9188c27ba /src/preload/index.ts | |
| parent | 6d4ee5ccd5529d6d2764da73e73fac57d7bfb216 (diff) | |
Add API key management UI and wire S2 key to MCP
- Settings modal on project list page for OpenAI, Anthropic, OpenRouter, Gemini, Semantic Scholar keys
- Keys stored in userData/api-keys.json, masked by default with show/hide toggle
- S2 API key passed to MCP server via .lattex-mcp.json to avoid rate limits
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/preload/index.ts')
| -rw-r--r-- | src/preload/index.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/preload/index.ts b/src/preload/index.ts index ea330c5..b1db391 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -229,6 +229,10 @@ const api = { return () => ipcRenderer.removeListener('comments:initContexts', handler) }, + // API Keys + getApiKeys: () => ipcRenderer.invoke('settings:getApiKeys') as Promise<Record<string, string>>, + setApiKeys: (keys: Record<string, string>) => ipcRenderer.invoke('settings:setApiKeys', keys), + // Shell openExternal: (url: string) => ipcRenderer.invoke('shell:openExternal', url), showInFinder: (path: string) => ipcRenderer.invoke('shell:showInFinder', path), |
