Use via worker

This commit is contained in:
Manav Rathi
2024-10-15 16:41:32 +05:30
parent e0b8999696
commit 358f741d7d
2 changed files with 6 additions and 6 deletions

View File

@@ -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));

View File

@@ -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);
}
}