From 358f741d7d95dd5faa50ac28adbafffe03d9ff2b Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 15 Oct 2024 16:41:32 +0530 Subject: [PATCH] Use via worker --- web/packages/new/photos/services/ml/index.ts | 4 ++-- web/packages/new/photos/services/ml/worker.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/packages/new/photos/services/ml/index.ts b/web/packages/new/photos/services/ml/index.ts index c19f32abe0..f3469a7dd0 100644 --- a/web/packages/new/photos/services/ml/index.ts +++ b/web/packages/new/photos/services/ml/index.ts @@ -794,5 +794,5 @@ export const deleteCGroup = async ({ id }: CGroup) => { * * The suggestion computation happens in a web worker. */ -export const suggestionsForPerson = async (person: CGroupPerson) => - worker().then((w) => w.suggestionsForPerson(person)); +export const suggestionsAndChoicesForPerson = async (person: CGroupPerson) => + worker().then((w) => w.suggestionsAndChoicesForPerson(person)); diff --git a/web/packages/new/photos/services/ml/worker.ts b/web/packages/new/photos/services/ml/worker.ts index 906a7a2771..5507c0875b 100644 --- a/web/packages/new/photos/services/ml/worker.ts +++ b/web/packages/new/photos/services/ml/worker.ts @@ -44,7 +44,7 @@ import { type RawRemoteMLData, type RemoteMLData, } from "./ml-data"; -import { suggestionsForPerson, type CGroupPerson } from "./people"; +import { suggestionsAndChoicesForPerson, type CGroupPerson } from "./people"; import type { CLIPMatches, MLWorkerDelegate } from "./worker-types"; /** @@ -341,10 +341,10 @@ export class MLWorker { } /** - * Return suggestions for the given cgroup {@link person}. + * Return suggestions and choices for the given cgroup {@link person}. */ - async suggestionsForPerson(person: CGroupPerson) { - return suggestionsForPerson(person); + async suggestionsAndChoicesForPerson(person: CGroupPerson) { + return suggestionsAndChoicesForPerson(person); } }