Repository navigation
dsh-2sidebar v0.1.0
dsh-2sidebar v0.1.0
首个版本:给 DSH 右侧栏用的「目录分栏」插件,左侧目录树、右侧文件内容,两栏同时可见,切换文件时目录树不动。
新增
- 右侧栏分栏页签:目录树 + 文本/图片预览,可停靠、分栏、全屏。
- 文本分页读取:每页 2,000 行,可「加载更多」,到底显示「已到文件末尾」,并显示文件大小。
- 图片预览:
png、jpg、jpeg、gif、webp、bmp、ico、avif、svg。 - 可拖动分隔条:调整左右比例;比例与目录树状态保存在 localStorage。
- 中英文界面,跟随宿主主题。
安装
- npm:
dsh-2sidebar@0.1.0(实际发布的代码内容对应提交66ba273;registry 的gitHead为5e2a7bd,v0.1.0tag 指向更早的源码快照90d2255)。 dsh plugin --profile desktop add dsh-2sidebar
限制
- 仅文本与图片预览;PDF / Office / HTML 用 DSH 原生预览页签。
- 目录树以会话工作目录为根,不提供浏览工作区之外的入口。
- 读取受宿主
workspaceFiles上限约束(每页 2 MiB / 5,000 行 / 目录 2,000 项)。
完整的技术细节请见 CHANGELOG。
English
The first release: a split-pane file browser for the DSH right sidebar — directory tree on the left, file content on the right, both visible at once, and switching files never moves the tree.
Added
- Right-sidebar split tab: directory tree plus text/image preview, dockable, splittable and fullscreen.
- Paged text reads: 2,000 lines per page,
Load more,End of file, and a byte counter. - Image preview:
png,jpg,jpeg,gif,webp,bmp,ico,avif,svg. - Draggable divider: changes the pane ratio; the ratio and tree state persist in localStorage.
- English and Chinese UI, following the host theme.
Install
- npm:
dsh-2sidebar@0.1.0(the published content corresponds to commit66ba273; the registry recordsgitHead5e2a7bd, while thev0.1.0tag points at the earlier source snapshot90d2255). dsh plugin --profile desktop add dsh-2sidebar
Limitations
- Text and image previews only; use DSH's native preview tabs for PDF / Office / HTML.
- The tree is rooted at the session working directory; there is no entry to browse outside the workspace.
- Reads follow the host's
workspaceFilescaps (2 MiB per page / 5,000 lines / 2,000 directory entries).
Full technical details: CHANGELOG.