Skip to content

Commit 2a3c926

Browse files
authored
add rebuildEditorState function to the syscalls (#1254)
1 parent 9e0925b commit 2a3c926

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

plug-api/syscalls/editor.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ export function reloadUI(): Promise<void> {
118118
return syscall("editor.reloadUI");
119119
}
120120

121+
/**
122+
* Rebuilds the editor state to ensure the dispatch updates the state.
123+
*/
124+
export function rebuildEditorState() {
125+
return syscall("editor.rebuildEditorState");
126+
}
127+
121128
/**
122129
* Reloads the config and commands, also in the server
123130
*/

web/syscalls/editor.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export function editorSyscalls(client: Client): SysCallMapping {
6464
"editor.reloadUI": () => {
6565
location.reload();
6666
},
67+
"editor.rebuildEditorState": () => {
68+
client.rebuildEditorState();
69+
},
6770
"editor.reloadConfigAndCommands": async () => {
6871
await client.loadConfig();
6972

0 commit comments

Comments
 (0)