diff --git a/packages/web/editor.tsx b/packages/web/editor.tsx index 6ce1f934..801e5968 100644 --- a/packages/web/editor.tsx +++ b/packages/web/editor.tsx @@ -62,6 +62,7 @@ import { eventSyscalls } from "@plugos/plugos/syscalls/event"; import { storeSyscalls } from "./syscalls/store"; import { inlineImagesPlugin } from "./inline_image"; import { ConsoleLogger } from "@plugos/plugos/environments/custom_logger"; +import { fulltextSyscalls } from "./syscalls/fulltext"; class PageState { constructor( @@ -170,6 +171,7 @@ export class Editor { editorSyscalls(this), spaceSyscalls(this), indexerSyscalls(this.space), + fulltextSyscalls(this.space), systemSyscalls(this), markdownSyscalls(buildMarkdown(this.mdExtensions)), clientStoreSyscalls(), diff --git a/packages/web/syscalls/fulltext.ts b/packages/web/syscalls/fulltext.ts new file mode 100644 index 00000000..66a5cdf5 --- /dev/null +++ b/packages/web/syscalls/fulltext.ts @@ -0,0 +1,10 @@ +import { SysCallMapping } from "@plugos/plugos/system"; +import { proxySyscalls } from "@plugos/plugos/syscalls/transport"; +import { Space } from "@silverbulletmd/common/spaces/space"; + +export function fulltextSyscalls(space: Space): SysCallMapping { + return proxySyscalls( + ["fulltext.search", "fulltext.delete", "fulltext.index"], + (ctx, name, ...args) => space.proxySyscall(ctx.plug, name, args) + ); +}