use rowboat model gateway when logged in

This commit is contained in:
Ramnique Singh 2026-03-06 14:37:34 +05:30
parent bd6ef0df28
commit 7311501343
8 changed files with 121 additions and 6 deletions

View file

@ -25,6 +25,8 @@ import { ServiceEvent } from '@x/shared/dist/service-events.js';
import container from '@x/core/dist/di/container.js';
import { listOnboardingModels } from '@x/core/dist/models/models-dev.js';
import { testModelConnection } from '@x/core/dist/models/models.js';
import { isSignedIn } from '@x/core/dist/account/account.js';
import { listGatewayModels } from '@x/core/dist/models/gateway.js';
import type { IModelConfigRepo } from '@x/core/dist/models/repo.js';
import type { IOAuthRepo } from '@x/core/dist/auth/repo.js';
import { IGranolaConfigRepo } from '@x/core/dist/knowledge/granola/repo.js';
@ -375,6 +377,9 @@ export function setupIpcHandlers() {
return { success: true };
},
'models:list': async () => {
if (await isSignedIn()) {
return await listGatewayModels();
}
return await listOnboardingModels();
},
'models:test': async (_event, args) => {