Skip to content

Commit 404c18b

Browse files
committed
fixup: variable naming and commented code
1 parent a5cd319 commit 404c18b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

packages/compass-generative-ai/src/atlas-ai-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ export class AtlasAiService {
327327
}
328328

329329
async ensureAiFeatureAccess({ signal }: { signal?: AbortSignal } = {}) {
330-
// When the ai feature is attempted to be opened we need to make sure
330+
// When the ai feature is attempted to be opened we make sure
331331
// the user is signed into Atlas and opted in.
332332
return getStore().dispatch(signIntoAtlasWithModalPrompt({ signal }));
333333
}

packages/compass-generative-ai/src/store/atlas-signin-reducer.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ describe('atlasSignInReducer', function () {
2929
});
3030

3131
expect(store.getState()).to.have.nested.property('state', 'initial');
32-
// void store.dispatch(signIntoAtlasWithModalPrompt()).catch(() => {});
3332
void store.dispatch(atlasServiceSignedIn());
3433
await store.dispatch(signIn());
3534
expect(mockAtlasService.signIn).not.to.have.been.called;

packages/compass-generative-ai/src/store/atlas-signin-store.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ import reducer, {
88
import type { AtlasAuthService } from '@mongodb-js/atlas-service/provider';
99
import type { ActivateHelpers } from 'hadron-app-registry';
1010

11-
let store: AtlasServiceStore;
11+
let store: CompassGenerativeAIServiceStore;
1212
export function getStore() {
1313
if (!store) {
14-
throw new Error('AtlasAuthPlugin not activated');
14+
throw new Error('CompassGenerativeAIPlugin not activated');
1515
}
1616
return store;
1717
}
1818

19-
export type AtlasAuthPluginServices = {
19+
export type CompassGenerativeAIPluginServices = {
2020
atlasAuthService: AtlasAuthService;
2121
};
2222
export function activatePlugin(
2323
_: Record<string, never>,
24-
services: AtlasAuthPluginServices,
24+
services: CompassGenerativeAIPluginServices,
2525
{ cleanup }: ActivateHelpers
2626
) {
2727
store = configureStore(services);
@@ -41,12 +41,14 @@ export function activatePlugin(
4141
return { store, deactivate: cleanup };
4242
}
4343

44-
export function configureStore({ atlasAuthService }: AtlasAuthPluginServices) {
44+
export function configureStore({
45+
atlasAuthService,
46+
}: CompassGenerativeAIPluginServices) {
4547
const store = createStore(
4648
reducer,
4749
applyMiddleware(thunk.withExtraArgument({ atlasAuthService }))
4850
);
4951
return store;
5052
}
5153

52-
export type AtlasServiceStore = ReturnType<typeof configureStore>;
54+
export type CompassGenerativeAIServiceStore = ReturnType<typeof configureStore>;

0 commit comments

Comments
 (0)