condaThinker/dsh-left-sidebar-collapse
在会话选择时自动折叠/完全折叠DSH左侧边栏(独立DSH插件)
项目介绍Project Overview
这是一个 DSH 插件,在选择会话后自动折叠左侧边栏,也可彻底隐藏为 0 宽轨道并显示浮动展开按钮;设置项保存在浏览器 localStorage。适合想让对话区占满宽度的场景。注意它通过 toggle 操作布局,与其他侧边栏插件可能冲突。
This DSH plugin auto-collapses the left sidebar after you select a conversation, and can fully hide it to a zero-width track with a floating expand button; preferences persist in localStorage. Use it when you want the conversation pane at full width. Caveat: it drives layout via toggle, so other sidebar plugins may conflict.
请帮我了解并安装插件:【dsh-left-sidebar-collapse】【https://github.com/condaThinker/dsh-left-sidebar-collapse】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add git+https://github.com/condaThinker/dsh-left-sidebar-collapse
把 condaThinker/dsh-left-sidebar-collapse 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-left-sidebar-collapse
English | 中文
Auto-collapse / fully-collapse the DSH left sidebar when you select a
conversation. A standalone, installable DSH plugin (pure client, no
ui-layout framework changes).
Two independent preferences appear in Settings → General:
- Auto-collapse sidebar — after you select a conversation, the left
sidebar collapses to its 56px rail. Deterministic: a plugin-internal state
machine drives
ctx.layoutand reads the stabledata-sidebar-collapsedframe signal, holding against the layout's own feedback so it never double-toggles. - Fully collapse — when the sidebar is collapsed, tuck it completely away (the rail is removed, the grid's first track collapses to 0) and show a single floating expand button in the top-left. Clicking it restores the full sidebar. The conversation pane stays at full width — nothing else is disturbed.
The preferences are persisted in localStorage (process-local browser
preference), so the toggles are always writable and survive reloads.
Install
Requires DSH (DeepSeek Harness) dsh CLI.
dsh plugin --profile web add git+https://github.com/condaThinker/dsh-left-sidebar-collapse
Then restart the profile:
dsh --profile web
# or whatever your run command is for the profile you installed into
After install, open Settings → General and toggle Auto-collapse sidebar (and optionally Fully collapse).
Git install and the prepare build
This plugin ships a self-contained prepare build script (tsdown), per the
DSH plugin distribution convention. When installed by git, pnpm runs that
script to build lib/ in the profile, so it needs network access to resolve
the DSH peer/dev dependencies and the profile must allow the build script:
add dsh-left-sidebar-collapse to the profile's allowBuilds (see pnpm ≥10
allowBuilds/strictDepBuilds), then re-run the dsh plugin add. For a
zero-build alternative, a maintainer may instead commit a freshly built lib/
into the repo and drop prepare — but the recommended path is prepare.
Build
pnpm install
pnpm build
pnpm test
How it works
- Auto-collapse: a listener on
ctx.sessions.listnotices when the current session moves to a different real session; theAutoCollapseMachinethen collapses the sidebar viactx.layout.toggleSidebar()only while the frame renders it expanded (readingdata-sidebar-collapsed), and suppresses further flips until the frame confirms the collapse — no double-toggle, no flip-back. - Fully collapse: a
shell.overlayoccupant (FullCollapseButton) reactively watchesdata-sidebar-collapsed; when collapsed and "fully collapse" is on it injects a tinygrid-template-columns: 0 minmax(0,1fr) 0 !importantoverride (so the sidebar track → 0 and the center reclaims the width) and shows the single expand button.
The client bundle respects DSH's module-table purity: only platform modules
(ui-primitives, the documented dsh-client-runtime exemption) are
value-imported; everything else is a type-only contract pull.
Model Experience
None, as the plugin only moves the browser layout column and never enters the append-only Session log, the model context, or telemetry.
KV Cache effect
None; the collapse gesture does not touch the history tail.
Known Limitations and Deferred Work
dsh-better-sidebarcoexistence — both plugins manage sidebar state independently; if the toggle looks like it fires without the flag on, check whether another sidebar plugin (e.g.dsh-better-sidebar) is also collapsing. This plugin is strictly off when its toggle is off.- The collapse gesture is a toggle, not a store write — because
ctx.layoutexposes onlytoggleSidebar(), the plugin keeps the state machine above to avoid double-toggling, but it cannot move the layout store directly.
nexu-io/open-design
freestylefly/awesome-gpt-image-2
anywhere-labs/dsh-desktop
walkinglabs/learn-harness-engineering
awesome-dsh-plugin/awesome-dsh-plugin
MemTensor/MemOS