scope file ops (ws, api, tools) to per-user context
Nightly Build / build (push) Successful in 6m28s

This commit is contained in:
2026-07-20 23:04:24 +01:00
parent 79a62c0b93
commit b627db761b
7 changed files with 206 additions and 58 deletions
+6 -4
View File
@@ -149,10 +149,12 @@ pub enum ServerEvent {
FileChanged {
path: String,
},
/// Ask the frontend to open a file for the user. Behaves like
/// `window.openFile(path)`: navigates to the file viewer page for markdown /
/// text / images, or opens an HTML file in a new browser tab. Emitted by
/// the future `show_file_to_user` interface tool (not wired yet).
/// Ask the frontend to open a file for the user, via `window.openFile(path)`:
/// the file-viewer page renders every kind (markdown / text / images / SVG /
/// PDF / LaTeX compiled server-side, and HTML live in an origin-isolated
/// iframe). Emitted by the `show_file_to_user` interface tool; `path` is the
/// caller's canonical **agent path** (`~/…`, `shared/{X}/…`, `projects/…`),
/// which the viewer fetches back through `GET /api/file`.
OpenFile {
path: String,
},