Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

imports

Manav Rathi080d5630a81c
diff --git a/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx b/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
index 599a27fe79..185121d344 100644
--- a/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
+++ b/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
@@ -1,4 +1,5 @@
import { FILE_TYPE } from "@/media/file-type";
+import type { Person } from "@/new/photos/services/ml/people";
import { EnteFile } from "@/new/photos/types/file";
import CloseIcon from "@mui/icons-material/Close";
import { IconButton } from "@mui/material";
@@ -11,7 +12,6 @@ import { components } from "react-select";
import AsyncSelect from "react-select/async";
import { InputActionMeta } from "react-select/src/types";
import { City } from "services/locationSearchService";
-import type { Person } from "services/ml/people";
import {
getAutoCompleteSuggestions,
getDefaultOptions,
diff --git a/web/apps/photos/src/components/ml/MLSearchSettings.tsx b/web/apps/photos/src/components/ml/MLSearchSettings.tsx
index 9deb9613a2..7d67514066 100644
--- a/web/apps/photos/src/components/ml/MLSearchSettings.tsx
+++ b/web/apps/photos/src/components/ml/MLSearchSettings.tsx
@@ -1,3 +1,4 @@
+import { canEnableFaceIndexing } from "@/new/photos/services/ml/indexer";
import log from "@/next/log";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import {
@@ -18,7 +19,6 @@ import { t } from "i18next";
import { AppContext } from "pages/_app";
import { useContext, useEffect, useState } from "react";
import { Trans } from "react-i18next";
-import { canEnableFaceIndexing } from "services/ml/indexer";
import {
getFaceSearchEnabledStatus,
updateFaceSearchEnabledStatus,
diff --git a/web/apps/photos/src/components/ml/PeopleList.tsx b/web/apps/photos/src/components/ml/PeopleList.tsx
index 00936d5baa..83c7067457 100644
--- a/web/apps/photos/src/components/ml/PeopleList.tsx
+++ b/web/apps/photos/src/components/ml/PeopleList.tsx
@@ -1,11 +1,11 @@
+import { unidentifiedFaceIDs } from "@/new/photos/services/ml/indexer";
+import type { Person } from "@/new/photos/services/ml/people";
import { EnteFile } from "@/new/photos/types/file";
import { blobCache } from "@/next/blob-cache";
import { Skeleton, styled } from "@mui/material";
import { Legend } from "components/PhotoViewer/styledComponents/Legend";
import { t } from "i18next";
import React, { useEffect, useState } from "react";
-import { unidentifiedFaceIDs } from "services/ml/indexer";
-import type { Person } from "services/ml/people";
const FaceChipContainer = styled("div")`
display: flex;
diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsx
index 38a43561ad..0109da7f8f 100644
--- a/web/apps/photos/src/pages/_app.tsx
+++ b/web/apps/photos/src/pages/_app.tsx
@@ -1,4 +1,9 @@
import DownloadManager from "@/new/photos/services/download";
+import {
+ isFaceIndexingEnabled,
+ setIsFaceIndexingEnabled,
+} from "@/new/photos/services/ml/indexer";
+import mlWorkManager from "@/new/photos/services/ml/mlWorkManager";
import { clientPackageName, staticAppTitle } from "@/next/app";
import { CustomHead } from "@/next/components/Head";
import { setupI18n } from "@/next/i18n";
@@ -51,11 +56,6 @@ import { createContext, useContext, useEffect, useRef, useState } from "react";
import LoadingBar from "react-top-loading-bar";
import { resumeExportsIfNeeded } from "services/export";
import { photosLogout } from "services/logout";
-import {
- isFaceIndexingEnabled,
- setIsFaceIndexingEnabled,
-} from "services/ml/indexer";
-import mlWorkManager from "services/ml/mlWorkManager";
import {
getFamilyPortalRedirectURL,
getRoadmapRedirectURL,
diff --git a/web/apps/photos/src/services/logout.ts b/web/apps/photos/src/services/logout.ts
index 3f0736457d..2013553fe7 100644
--- a/web/apps/photos/src/services/logout.ts
+++ b/web/apps/photos/src/services/logout.ts
@@ -1,7 +1,7 @@
import DownloadManager from "@/new/photos/services/download";
+import { clearFeatureFlagSessionState } from "@/new/photos/services/feature-flags";
import { terminateFaceWorker } from "@/new/photos/services/ml";
import { clearFaceData } from "@/new/photos/services/ml/db";
-import { clearFeatureFlagSessionState } from "@/new/photos/services/feature-flags";
import mlWorkManager from "@/new/photos/services/ml/mlWorkManager";
import log from "@/next/log";
import { accountLogout } from "@ente/accounts/services/logout";
diff --git a/web/apps/photos/src/services/searchService.ts b/web/apps/photos/src/services/searchService.ts
index 73cbb476ef..2b0482f07f 100644
--- a/web/apps/photos/src/services/searchService.ts
+++ b/web/apps/photos/src/services/searchService.ts
@@ -4,12 +4,12 @@ import {
isFaceIndexingEnabled,
} from "@/new/photos/services/ml/indexer";
import mlWorkManager from "@/new/photos/services/ml/mlWorkManager";
+import type { Person } from "@/new/photos/services/ml/people";
import { EnteFile } from "@/new/photos/types/file";
import { isDesktop } from "@/next/app";
import log from "@/next/log";
import * as chrono from "chrono-node";
import { t } from "i18next";
-import type { Person } from "services/ml/people";
import { Collection } from "types/collection";
import { EntityType, LocationTag, LocationTagData } from "types/entity";
import {
diff --git a/web/apps/photos/src/types/search/index.ts b/web/apps/photos/src/types/search/index.ts
index 369a4a957c..693e087cd6 100644
--- a/web/apps/photos/src/types/search/index.ts
+++ b/web/apps/photos/src/types/search/index.ts
@@ -1,8 +1,8 @@
import { FILE_TYPE } from "@/media/file-type";
+import type { FaceIndexingStatus } from "@/new/photos/services/ml/indexer";
+import type { Person } from "@/new/photos/services/ml/people";
import { EnteFile } from "@/new/photos/types/file";
import { City } from "services/locationSearchService";
-import type { FaceIndexingStatus } from "services/ml/indexer";
-import type { Person } from "services/ml/people";
import { LocationTagData } from "types/entity";
export enum SuggestionType {
diff --git a/web/packages/new/photos/services/ml/mlWorkManager.ts b/web/packages/new/photos/services/ml/mlWorkManager.ts
index e71a8f8398..c2f4fdf476 100644
--- a/web/packages/new/photos/services/ml/mlWorkManager.ts
+++ b/web/packages/new/photos/services/ml/mlWorkManager.ts
@@ -295,7 +295,7 @@ class MLWorkManager {
const userAgent = await getUserAgent();
const jobWorkerProxy = await this.getSyncJobWorker();
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
+
return await jobWorkerProxy.sync(token, userID, userAgent);
// this.terminateSyncJobWorker();
// TODO: redirect/refresh to gallery in case of session_expired, stop ml sync job