main
md 36 lines 1.66 KB
Rendered Raw
1 # Editor Plugin DOX
2
3 ## Purpose
4
5 - Own the native Markdown and plain text editor surface for canvas and floating modal workflows.
6
7 ## Ownership
8
9 - `api/` owns editor session and WebSocket handlers.
10 - `helpers/` owns editor text session and open-file context helpers.
11 - `prompts/` owns agent-visible open-file context.
12 - `webui/` owns editor panel, preview, store, and main surface.
13 - `extensions/` owns editor hook contributions.
14
15 ## Local Contracts
16
17 - Keep editor session state synchronized across API, WebSocket, and WebUI panel behavior.
18 - Do not expose unsaved content or local paths beyond intended chat/context surfaces.
19 - Keep the floating Editor modal on the shared surface modal chrome so the header remains draggable while existing Focus mode continues to work.
20 - Keep Editor Open wired through the File Browser text picker so users can open one or more Markdown or plain text files with an obvious confirmation action.
21 - Keep Download in the Editor file-actions menu and save dirty text before downloading it.
22 - Keep Save As distinct from Rename: Save As writes the current editor text to a chosen `.md` or `.txt` path and retargets the active session without removing the original file.
23 - Keep Markdown and plain text on the same toolbar, with full-document source and preview modes plus shared Undo/Redo buttons and keyboard shortcuts.
24 - Preserve source chat context ids when opening Markdown files from tool-result canvas handoffs.
25
26 ## Work Guidance
27
28 - Coordinate editor preview and session changes with canvas surface registration.
29
30 ## Verification
31
32 - Smoke-test opening, editing, previewing, and reconnecting editor sessions after changes.
33
34 ## Child DOX Index
35
36 No child DOX files.