WIP: real-time collab support

This commit is contained in:
Zef Hemel
2022-10-25 18:50:07 +02:00
parent f04f429c29
commit 590440748b
11 changed files with 138 additions and 10 deletions
+20
View File
@@ -0,0 +1,20 @@
import { SysCallMapping } from "../../plugos/system.ts";
import type { Editor } from "../editor.tsx";
export function collabSyscalls(editor: Editor): SysCallMapping {
return {
"collab.start": (
_ctx,
serverUrl: string,
token: string,
username: string,
) => {
editor.startCollab(serverUrl, token, username);
},
"collab.stop": (
_ctx,
) => {
editor.collabState?.stop();
},
};
}