Files
orca/src/main/ipc/zcode-plan-credentials.ts
T
Neil e9f4df2c0f refactor: organize rate-limit providers and remove forwarding modules (#40116)
* refactor: group rate-limit providers under concrete owners

* test: preserve mixed Claude account-switch regression

* refactor: consolidate Antigravity service contract import
2026-11-08 20:29:13 -08:00

18 lines
708 B
TypeScript

import { ipcMain } from 'electron'
import {
clearZcodePlanApiKeyCredential,
getZcodePlanCredentialsStatus,
saveZcodePlanApiKeyCredential
} from '../zcode/zcode-plan-credential-commands'
import type { RateLimitService } from '../rate-limits/service/rate-limit-service'
export function registerZcodePlanCredentialsHandlers(rateLimits: RateLimitService | null): void {
ipcMain.handle('zcodePlanCredentials:getStatus', () => getZcodePlanCredentialsStatus())
ipcMain.handle('zcodePlanCredentials:saveApiKey', (_event, key: unknown) =>
saveZcodePlanApiKeyCredential(rateLimits, key)
)
ipcMain.handle('zcodePlanCredentials:clearApiKey', () =>
clearZcodePlanApiKeyCredential(rateLimits)
)
}