feat(editor): a computer's files to and from the person's own files (F8.1)

Beside the dashboard only: Java's import window gets "Aus meinen Dateien"
(D4) — the dashboard is asked over the bridge for a file of at most Java's
150 000 bytes and hands its bytes over — and a file's menu gets "In meine
Dateien speichern" (D5), its bytes handed to the dashboard to save.

- Bridge: chooseFile/chosenFile and saveFile/savedFile, each question with
  its number; an answer from elsewhere, of another version, for no question
  or of the other kind is no answer.
- Whoever reads or finds the project frozen may save, not bring in.
- doc fileBytes: a text as UTF-8, a picture as it is, and "missing" while
  a blob's bytes have not come (read so, the file would be empty).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 16:02:43 +00:00
co-authored by Claude Opus 5.5
parent cc5e07f1a6
commit 8efbc442f1
12 changed files with 430 additions and 19 deletions
@@ -74,6 +74,11 @@ export function isDirectoryContent(content: VirtualFileContent): boolean {
const encoder = new TextEncoder();
/** A text's bytes as UTF-8 — how a text file goes out of a computer (F8) and how the import reads one. */
export function textBytes(text: string): Uint8Array {
return encoder.encode(text);
}
export function contentByteCount(content: VirtualFileContent): number {
switch (content.kind) {
case 'directory':