diff --git a/packages/compass-generative-ai/src/atlas-ai-service.ts b/packages/compass-generative-ai/src/atlas-ai-service.ts index c6691713675..89cdccfaf8f 100644 --- a/packages/compass-generative-ai/src/atlas-ai-service.ts +++ b/packages/compass-generative-ai/src/atlas-ai-service.ts @@ -327,7 +327,7 @@ export class AtlasAiService { } async ensureAiFeatureAccess({ signal }: { signal?: AbortSignal } = {}) { - // When the ai feature is attempted to be opened we need to make sure + // When the ai feature is attempted to be opened we make sure // the user is signed into Atlas and opted in. return getStore().dispatch(signIntoAtlasWithModalPrompt({ signal })); } diff --git a/packages/compass-generative-ai/src/store/atlas-signin-reducer.spec.ts b/packages/compass-generative-ai/src/store/atlas-signin-reducer.spec.ts index 1dd97168176..3ceadcedf47 100644 --- a/packages/compass-generative-ai/src/store/atlas-signin-reducer.spec.ts +++ b/packages/compass-generative-ai/src/store/atlas-signin-reducer.spec.ts @@ -29,7 +29,6 @@ describe('atlasSignInReducer', function () { }); expect(store.getState()).to.have.nested.property('state', 'initial'); - // void store.dispatch(signIntoAtlasWithModalPrompt()).catch(() => {}); void store.dispatch(atlasServiceSignedIn()); await store.dispatch(signIn()); expect(mockAtlasService.signIn).not.to.have.been.called; diff --git a/packages/compass-generative-ai/src/store/atlas-signin-store.ts b/packages/compass-generative-ai/src/store/atlas-signin-store.ts index b5bb380b01a..389a92549bd 100644 --- a/packages/compass-generative-ai/src/store/atlas-signin-store.ts +++ b/packages/compass-generative-ai/src/store/atlas-signin-store.ts @@ -8,20 +8,20 @@ import reducer, { import type { AtlasAuthService } from '@mongodb-js/atlas-service/provider'; import type { ActivateHelpers } from 'hadron-app-registry'; -let store: AtlasServiceStore; +let store: CompassGenerativeAIServiceStore; export function getStore() { if (!store) { - throw new Error('AtlasAuthPlugin not activated'); + throw new Error('CompassGenerativeAIPlugin not activated'); } return store; } -export type AtlasAuthPluginServices = { +export type CompassGenerativeAIPluginServices = { atlasAuthService: AtlasAuthService; }; export function activatePlugin( _: Record, - services: AtlasAuthPluginServices, + services: CompassGenerativeAIPluginServices, { cleanup }: ActivateHelpers ) { store = configureStore(services); @@ -41,7 +41,9 @@ export function activatePlugin( return { store, deactivate: cleanup }; } -export function configureStore({ atlasAuthService }: AtlasAuthPluginServices) { +export function configureStore({ + atlasAuthService, +}: CompassGenerativeAIPluginServices) { const store = createStore( reducer, applyMiddleware(thunk.withExtraArgument({ atlasAuthService })) @@ -49,4 +51,4 @@ export function configureStore({ atlasAuthService }: AtlasAuthPluginServices) { return store; } -export type AtlasServiceStore = ReturnType; +export type CompassGenerativeAIServiceStore = ReturnType;