mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-15 08:08:18 +00:00
`read-file` returns UTF-8 text only, so a plugin could not read a PDF, image, archive or font inside the open project, and `fs.read-bytes` needs a per-path grant. `workspace.project` gains `read-bytes(path)` with `read-file`'s rules (`project.read`, `resolve_in_root` confinement, `not-found` for missing paths, 16 MiB cap; always the file on disk). The Rust SDK exposes `Project::read_bytes` and the mock host `add_file_bytes`. Web custom editors get `document.bytes()` (at most 64 MiB, read-only). Fixes #2347 Co-authored-by: Inf1mum <8135225+Inf1mum@users.noreply.github.com>