fix init.ml

This commit is contained in:
cqc
2024-02-17 14:34:49 -06:00
parent cf00deb1ed
commit 3105e2bb8e
3 changed files with 415 additions and 3 deletions

View File

@ -112,3 +112,22 @@ let setup_workspace ~container cstore : unit Lwt.t =
csl
in
cstore >>= render ~container
let _ =
Lwt.async (fun () ->
let container = by_id "toplevel-container" in
let textbox : 'a Js.t =
by_id_coerce "userinput" Dom_html.CoerceTo.textarea
in
let rootstore = Store.test_pull () in
rootstore >>= fun rs ->
let workspace_store =
Store.S.Tree.find_tree rs [ ".config"; "workspace" ]
>>= function
| Some t -> Lwt.return t
| None -> Lwt.return (Store.S.Tree.empty ())
in
setup_storeview ~storeview:rootstore ~container ~textbox;
Lwt.return
(Lwt.async (fun () ->
setup_workspace ~container workspace_store)))