Repository navigation
Releases: ionaryu/dsh-copy-document
Releases · ionaryu/dsh-copy-document
Release list
v0.1.0 — whole-document copy in the editor header
Whole-document copy for the sidebar editor
The right sidebar's editor shows a file one screen at a time. This release adds one control to the editor header, immediately right of Save, that puts the entire document on the clipboard in one click.
- Copies the whole file, not the viewport. Files above the editor's 5 MB threshold are paged through
fs.readPageand concatenated. - Reads through
dsh-better-sidebar's own/sidebar/api/fs.readroute, so the session scope, the browser-trust fence, and the encoding detection stay owned by that plugin. - Feedback is in place: working → ✓ Copied for 1.2 s; binary documents report Not a text document; failures are logged with a readable label. Labels follow the GUI language.
- Documents the editor shows read-only have no Save control; there the button sits right of Refresh, in the same group.
Verified against DSH 0.2.1-rc.3 with dsh-better-sidebar 0.28.0 in a real dsh web session: the clipboard text is byte-identical to the file on disk (SHA-256) for a 19 KB JSON file, a 2.6 KB Markdown file, and a 6.78 MB text file read through the paging path.
Install
dsh plugin --profile web add github:ionaryu/dsh-copy-document#v0.1.0Or from the packed artifact attached below, which needs no git fetch:
dsh plugin --profile web add https://github.com/ionaryu/dsh-copy-document/releases/download/v0.1.0/dsh-copy-document-0.1.0.tgzRestart the GUI after installing. The package ships its built lib/, so no build step and no allowBuilds entry are needed.
Known limitations
- The clipboard gets the file on disk, not the editor buffer: an unsaved draft is not copied.
- Placement is DOM-anchored because the sidebar exposes tab and file-viewer registration only, with no toolbar extension point. A header restructuring in a future
dsh-better-sidebarrelease can drop the button.