Adds one button above the workspace that collapses the whole sidebar entry group (Task board, plugins, Skill/MCP, automation, context insights and more) and restores it on a second click, with the state kept in localStorage.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Yyhy110421/dsh-sidebar-fold
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
给 DSH 左侧栏加一个折叠按钮:把 工作区上方 的入口(Task board、插件、Skill / MCP、自动化任务、上下文洞察、MisakaNet、技能中心、MCP 连接器、更多)一次收起,再按一次全部展开。
工作区、会话列表、底部设置和侧栏整体的收起按钮都不受影响。
安装
在 DSH 里打开 设置 → 插件管理器,安装:
github:Yyhy110421/dsh-sidebar-fold,或file:<本仓库绝对路径>
装完刷新页面(或重启 DSH)。按钮会出现在“新会话”和“Task board”之间。
file:安装是实体拷贝;改源码后需要卸载再装。更新只支持 npm 注册表插件,本插件不发布 npm。
用法
- 按钮显示 收起导航 时,点击收起工作区上方的入口。
- 收起后按钮变成 展开导航,点击恢复。
- 折叠状态存在浏览器
localStorage的dsh-sidebar-fold.collapsed里,刷新后保留。 - 侧栏整体收成 56px 图标轨道时,按钮会自动隐藏;展开侧栏后恢复。
实现方式与限制
DSH 目前没有“面板列表上方”的官方插槽,所以本插件在浏览器侧找到侧栏的 nav(aria-label 为“全局面板”/“Global panels”,或 class 含 panelList),以及 nav 前、“新会话”按钮后的那组入口(包括 Task board 这类插件注入的行)。按钮插在整组入口前面,用内联 display 控制整组显隐。
这意味着:
- 只依赖当前侧栏 DOM 结构;DSH 升级后如果“新会话”按钮、
nav或 Task board 行的结构/class 命名变化,按钮可能找不到或漏收某些行,需要更新插件。 - 不修改 DSH 本体,不修改
dsh-builtin-browser,不写注册表、不启动后台进程。 - 不收集数据,没有宿主侧服务;卸载插件后按钮和样式会一起移除。
- 如果侧栏整体处于收起状态(56px),按钮不可见是预期行为。
开发
# 语法检查
node --check client.js
node --check lib/index.js
本地验证:把本目录用 file: 安装到 DSH,刷新页面,检查按钮是否出现在“新会话”下方、Task board 上方;点两次确认整组(含 Task board)收起/展开,并刷新确认状态保留。
License
MIT © 2026 Yyhy110421
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10669
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10669
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8366
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7489
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5362
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1070
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.