add rebuildEditorState function to the syscalls (#1254)
parent
9e0925beff
commit
2a3c926849
|
@ -118,6 +118,13 @@ export function reloadUI(): Promise<void> {
|
|||
return syscall("editor.reloadUI");
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuilds the editor state to ensure the dispatch updates the state.
|
||||
*/
|
||||
export function rebuildEditorState() {
|
||||
return syscall("editor.rebuildEditorState");
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the config and commands, also in the server
|
||||
*/
|
||||
|
|
|
@ -64,6 +64,9 @@ export function editorSyscalls(client: Client): SysCallMapping {
|
|||
"editor.reloadUI": () => {
|
||||
location.reload();
|
||||
},
|
||||
"editor.rebuildEditorState": () => {
|
||||
client.rebuildEditorState();
|
||||
},
|
||||
"editor.reloadConfigAndCommands": async () => {
|
||||
await client.loadConfig();
|
||||
|
||||
|
|
Loading…
Reference in New Issue