Use via worker
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user