Skip to content

Conversation

gribnoysup
Copy link
Collaborator

This patch moves ai endpoint implementation from ai-query-request to atlas-service with all the tests (and some new ones added). Auth is now passed as a bearer token returned by oidc plugin

@gribnoysup gribnoysup added the wip label Jul 20, 2023
@gribnoysup gribnoysup removed the wip label Jul 20, 2023
import type { AtlasService as AtlasServiceMain } from './main';
import { ipcInvoke } from './util';

export function AtlasService() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking, this one kinda confuses me when i see it in the rest of the code, looks like a class name and has the same name of AtlasService (the main process class), could we disambiguate it and also have a separate type name for the return type?

For example, probably i would have easier life to look at the client code with something like this:

export function getAtlasServiceRenderer(): ... { ... }

export type AtlasServiceRenderer = ReturnType<getAtlasServiceRenderer>;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was going back and forth on this wrt interface, couldn't decide what I want (I kinda like the idea of having both as classes, but I definitely should've made ipcInvoke to return a constructor then, not a factory). I'll update, but if you don't mind as a follow-up as I already have the incoming PR with opt-in modal that is based on this branch and I don't want to rebase 😅

@gribnoysup gribnoysup merged commit 8c579fa into main Jul 20, 2023
@gribnoysup gribnoysup deleted the compass-7030-move-endpoint-handling-to-atlas-service branch July 20, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants