Preface¶
Starting from DSH 0.1.7, the right sidebar is taken over by the host’s ui-sidebar-right: one tab per cell, up to two cells. dsh-better-sidebar only registers tab types within it and no longer draws the entire sidebar itself; from v0.14.0 onwards, the default “file opening mode” also changed to “independent”, and v0.19.0 retired the self-drawn right sidebar. The result is: the right sidebar no longer automatically shows the old habit layout of “preview + file list” side by side, with “file changes” hanging next to it.
The earlier @linxin666/dsh-client-ui-aionui-panel once drew Explorer + Preview itself in the Web UI, but this plugin stopped being supported since npm 0.3.6; the old runtime targeted by the last usable version no longer exists in DSH 0.1.7, and installing a newer DSH won’t activate it either.
Below we introduce dsh-aionui-layout (maintainer: tenyding, category: client): it doesn’t redraw any panel; only when a session’s right sidebar layout is empty, it uses better-sidebar’s built-in editor (merge mode) and git tabs to set up two cells, restoring AionUi’s right panel form, without losing any of better-sidebar’s new features.
What Is This¶
dsh-aionui-layout is a pure layout plugin: it listens for right sidebar mounting; if the session’s persisted layout in localStorage has no tabs at all, it automatically opens two cells: “Files (preview + docked file tree)” and “File Changes”; the content comes 100% from dsh-better-sidebar, without monkey patching DSH or better-sidebar source code.
The repository has a hand-written bundle lib/client.js committed, no build step required, installable via github: and directly loadable.
Layout diagram (default width ratio approximately 0.62 / 0.38, adjustable by dragging the divider):
┌──────────┬───────────────┬────────────────────────────┬──────────────────┐
│ 会话列表 │ 对话框 │ 文件(预览 + 停靠文件树) │ 文件变动 │
│ (DSH) │ (DSH) │ better-sidebar editor │ better-sidebar git│
└──────────┴───────────────┴────────────────────────────┴──────────────────┘
Core Features¶
Auto-seeding Empty Right Sidebar¶
Every session with an “empty right sidebar layout” will, after installing the plugin and refreshing, execute in order: openTab('editor') → split() → openTab('git') in the new cell → close the start page with kind guide → focus the preview cell. Layouts with existing tabs are left untouched.
Interaction Aligned with AionUi Habits¶
In merge mode, clicking a file in the file tree swaps the preview path in place on the left, and the file tree doesn’t disappear; file links in chat or tool rows will land in the preview cell (during layout, the left cell is the active cell, and DSH openResource defaults to entering the active cell). The widths of the two cells are dragged via DSH dock; the “File Changes” cell can still be split/merged via the host’s “split column”, or drag tabs to merge.
Edge Cases and Degradation¶
| Situation | Behavior |
|---|---|
editor not registered (better-sidebar not installed/disabled) |
Skip, no error |
git disabled in tabsEnabled |
Only open one “Files” cell, no split |
split() fails due to insufficient column width |
Keep only the preview cell |
Agent not ready causing openTab to throw |
Retry up to 8 times, 250ms interval |
Adjustable Constants¶
Change the constants at the top of lib/client.js and refresh (no build required): PREVIEW_SIZE (default 0.62), FIRST_DELAY_MS (120), MAX_ATTEMPTS (8), RETRY_DELAY_MS (250). To change the content or order of the left and right cells, adjust the order of openTab / split() calls in seedLayout().
Prerequisites¶
| Requirement | Description |
|---|---|
| DSH | 0.1.7-rc.1 or above |
| dsh-better-sidebar | >= 0.19 (tested with 0.21.1 in README) |
| File opening mode | Must be “Merge”; in “Independent” mode, editor without a path only shows the file tree, no preview column |
| tab | editor and git must remain enabled in tabsEnabled |
Profile example (~/.dsh/profiles/<profile>/cordis.patch.yml):
- id: better-sidebar
name: dsh-better-sidebar
config:
editorExplorer: true
tabsEnabled:
editor: true
git: true
GUI: Settings → Side Cards → “Files” card → File opening mode → Merge.
Installation and Activation¶
First do the recommended installation when the profile is web (command from the repository README):
dsh plugin --profile web add github:tenyding/dsh-aionui-layout
After installation, refresh the page; if the profile doesn’t have patchReload: live + HMR, restart dsh web.
For development, you can link from a local directory (requires an existing copy of the repository):
dsh plugin --profile web add link:$PWD/dsh-aionui-layout
The CLI will write the package into the profile’s package.json and append the package name to dsh.profile.bundles (the package declares dsh.bundle.patch).
Security note: The plugin runs as a client bundle under the current DSH process permissions; before installation, please review the GitHub source code and the MIT license (see package.json) yourself to confirm it meets your environment policy. The community catalog skillhub.cn is an independent ecosystem site with no official affiliation with DeepSeek / High-Flyer.
Typical Usage¶
Daily Use¶
- Confirm better-sidebar is installed, in “Merge” mode, and the
editor/gittabs are enabled. - Run the above
dsh plugin --profile web add github:tenyding/dsh-aionui-layout. - Refresh the Web GUI; new sessions or sessions with an empty right sidebar will automatically get two columns.
Existing Layout in Old Sessions, Want to Switch to Two Columns Immediately¶
The plugin deliberately doesn’t modify existing layouts. To force seeding, paste the entire snippet/seed-layout.js from the repository into the DevTools console and execute it, then refresh immediately (otherwise the in-memory store will write back the old layout). Or delete localStorage['dsh.sidebar-right.v1.<sessionId>'] and refresh, letting the empty layout trigger auto-layout again.
Behavior Self-test (in Repository)¶
node test/seeding.test.mjs
Pure Node, zero dependencies, drives the real bundle to cover 8 seeding scenarios.
Troubleshooting Tips¶
| Symptom | Action |
|---|---|
| No change in right sidebar | Hard refresh; if still ineffective, restart dsh web |
| Only one “Files” cell | Check tabsEnabled.git or drag the right sidebar wider before splitting |
| “Files” only shows tree, no preview | editorExplorer not taking effect, still in “Independent” mode |
| A session never gets laid out | That session already has a layout; use snippet or clear the corresponding localStorage key |
Conclusion¶
dsh-aionui-layout, under DSH’s “everything is a plugin” premise, uses minimal layout logic to fix better-sidebar’s editor + git into an AionUi-style right sidebar, suitable for Web users who still prefer “preview and file tree in the same cell, changes beside it” and have kept up with the upstream better-sidebar capability line.
- Catalog page: https://www.skillhub.cn/plugins/tenyding/dsh-aionui-layout
- Source code and full documentation: https://github.com/tenyding/dsh-aionui-layout