WIP: real-time collab support
This commit is contained in:
@@ -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();
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user