1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! An editor shell with the full set of opt-ins: FS sandbox, native dialogs,
//! a PTY for CLI agents, and an ACP client.
//!
//! Build your web frontend into `./dist/`, then:
//!
//! ```sh
//! cargo run --example editor
//! ```
//!
//! From the frontend you can call e.g.
//!
//! ```js
//! await window.__shell_ipc("dialog_open", { directory: true });
//! await window.__shell_ipc("allow_dir", { path });
//! await window.__shell_ipc("acp_initialize");
//! await window.__shell_ipc("acp_new_session", { cwd: path });
//! await window.__shell_ipc("acp_prompt", { sessionId, prompt: "hello" });
//! ```
use ;