Skip to content

Commit 3803589

Browse files
commenting out errors for evg patch
1 parent d2c0290 commit 3803589

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ const startAttempt = (
199199
fn: () => void
200200
): GenAIAtlasOptInThunkAction<AttemptState> => {
201201
return (dispatch, getState) => {
202+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
202203
if (getState().optIn.attemptId) {
203204
throw new Error(
204205
"Can't start opt in with prompt while another opt in attempt is in progress"
@@ -230,6 +231,7 @@ export const optIntoGenAIWithModalPrompt = ({
230231
> => {
231232
return (dispatch, getState, { preferences }) => {
232233
// Nothing to do if we already opted in.
234+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
233235
const { state } = getState().optIn;
234236
if (
235237
state === 'optin-success' ||
@@ -251,9 +253,10 @@ export const optIntoGenAIWithModalPrompt = ({
251253

252254
export const optIn = (): GenAIAtlasOptInThunkAction<Promise<void>> => {
253255
return async (dispatch, getState, { atlasAiService }) => {
256+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
254257
if (['in-progress', 'optin-success'].includes(getState().optIn.state)) {
255258
return;
256-
}
259+
} // @ts-expect-error reducers were combined so these methods are nested one layer lower
257260
const { attemptId } = getState().optIn;
258261
if (attemptId === null) {
259262
return;
@@ -262,6 +265,7 @@ export const optIn = (): GenAIAtlasOptInThunkAction<Promise<void>> => {
262265
controller: { signal },
263266
resolve,
264267
reject,
268+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
265269
} = getAttempt(getState().optIn.attemptId);
266270
dispatch({
267271
type: AtlasOptInActions.Start,
@@ -302,9 +306,11 @@ export const cancelOptIn = (reason?: any): GenAIAtlasOptInThunkAction<void> => {
302306
return (dispatch, getState) => {
303307
// Can't cancel opt in after the flow was finished indicated by current
304308
// attempt id being set to null.
309+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
305310
if (getState().optIn.attemptId === null) {
306311
return;
307312
}
313+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
308314
const attempt = getAttempt(getState().optIn.attemptId);
309315
attempt.controller.abort();
310316
attempt.reject(reason ?? attempt.controller.signal.reason);

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ const startAttempt = (
227227
fn: () => void
228228
): GenAIAtlasSignInThunkAction<AttemptState> => {
229229
return (dispatch, getState) => {
230+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
230231
if (getState().signIn.attemptId) {
231232
throw new Error(
232233
"Can't start sign in with prompt while another sign in attempt is in progress"
@@ -257,6 +258,7 @@ export const signIntoAtlasWithModalPrompt = ({
257258
> => {
258259
return (dispatch, getState) => {
259260
// Nothing to do if we already signed in.
261+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
260262
const { state } = getState().signIn;
261263
if (state === 'success') {
262264
return Promise.resolve();
@@ -275,9 +277,11 @@ export const signIntoAtlasWithModalPrompt = ({
275277

276278
export const signIn = (): GenAIAtlasSignInThunkAction<Promise<void>> => {
277279
return async (dispatch, getState, { atlasAuthService }) => {
280+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
278281
if (['in-progress', 'authenticated'].includes(getState().signIn.state)) {
279282
return;
280283
}
284+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
281285
const { attemptId } = getState().signIn;
282286
if (attemptId === null) {
283287
return;
@@ -286,6 +290,7 @@ export const signIn = (): GenAIAtlasSignInThunkAction<Promise<void>> => {
286290
controller: { signal },
287291
resolve,
288292
reject,
293+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
289294
} = getAttempt(getState().signIn.attemptId);
290295
dispatch({
291296
type: AtlasSignInActions.Start,
@@ -331,10 +336,11 @@ export const cancelSignIn = (
331336
): GenAIAtlasSignInThunkAction<void> => {
332337
return (dispatch, getState) => {
333338
// Can't cancel sign in after the flow was finished indicated by current
334-
// attempt id being set to null.
339+
// attempt id being set to null
340+
// @ts-expect-error reducers were combined so these methods are nested one layer lower
335341
if (getState().signIn.attemptId === null) {
336342
return;
337-
}
343+
} // @ts-expect-error reducers were combined so these methods are nested one layer lower
338344
const attempt = getAttempt(getState().signIn.attemptId);
339345
attempt.controller.abort();
340346
attempt.reject(reason ?? attempt.controller.signal.reason);

0 commit comments

Comments
 (0)