DSH Plugins Marketplace

DSH Plugins

Plugins

/

UI & Experience

/

dsh-chat-collapse

c

dsh-chat-collapse

Manifest valid

DSH Web GUI plugin — One-click collapse for the chat composer, with a floating restore ball. One-click collapse for chat components: Pure browser-side, zero DSH source code changes.

UI (client)hasBundlePatch

dsh-chat-collapse

给 DSH Web GUI 的聊天组件加一枚「一键收缩」
点一下把组件藏起来,角落浮出恢复球;点球即还原,球自己消失。

English | 中文

awesome dsh plugin dsh version platform web license MIT no network

纯浏览器侧插件,零 DSH 源码改动。不 patch 本体、不注入 bundle、不起宿主服务。

它解决什么

小屏上输入框和工具条常驻,能看的对话就少了那么一截。 本插件在输入框工具行最右侧放一枚 ⌄ 按钮:点一下整条组件收起,纵向空间全给对话; 角落留一颗恢复球,随时点回来。

收起是 CSS 隐藏,DOM 不卸载 —— 草稿、贴的图、光标位置全都留着,展开回来接着写。

交互

动作结果
点输入框工具行最右侧的 ⌄ 按钮目标组件收起(草稿 / 图片 / 光标位置全部保留)
收起后视口角落浮出 恢复球(对话气泡图标)
点恢复球组件放回来,球自己消失
右键恢复球在「输入框 / 整个对话区」之间切换收缩目标,并弹一条轻提示
Alt+H键盘切换收起 / 展开

状态(是否收起、收缩目标、悬浮球位置)写 localStorage['dsh.chatCollapse.v1'],刷新后保持。

收缩目标

target藏什么靠什么定位
composer(默认)只藏输入框那一条座位[data-composer-seat]
chat藏整个对话区(消息 + 输入框 + 会话头)[data-conversation-scroll] 的父节点

显隐由 <html> 上的 data-dsh-cc / data-dsh-cc-target 两个属性 + CSS 选择器驱动 —— 不给官方节点加类名,React 重渲染抹不掉。

安装

dsh plugin --profile web add github:cx2002302-lang/dsh-chat-collapse

装完重启一次 dsh web(新 bundle 要进客户端启动图),再刷新页面:

# 服务名按你自己的部署改;下面是 systemd 用户服务的写法
systemctl --user restart dsh-web.service

刷新后:输入框工具行最右侧即出现 ⌄ 按钮。

本地开发时也可以直接指向目录:

dsh plugin --profile web add /path/to/dsh-chat-collapse

卸载

dsh plugin --profile web remove dsh-chat-collapse

卸载时 ctx.effect 的回收函数会摘掉自己注入的 <style>、按钮、恢复球与 <html> 属性, 不留残留(tests/unit-check.mjs 里有对应断言)。

依赖的官方钩子

钩子出处
[data-composer-card]ui-conversation/skeleton/InputBar.tsx
[data-composer-seat]ui-conversation/skeleton/ConversationRoot.tsx
[data-conversation-scroll]同上

三个都是源码里的字面量属性,不是 CSS-module 哈希类名,版本内稳定。 在 dsh 0.1.2-rc.1 上实测存在。

隐私

  • 无网络请求、无遥测、无宿主侧服务。
  • 唯一落盘的是 localStorage['dsh.chatCollapse.v1'](三个布尔 / 枚举值)。
  • 宿主半侧 lib/index.js 是空 apply(),不注册任何服务、不读任何文件。
  • 插件不接触会话内容,不读取草稿文本。

目录

lib/index.js          宿主半侧:空 apply(只为把 dsh.client 声明登记进 web 名册)
lib/client.js         浏览器半侧:全部功能(__ModuleLoader__ bundle,无 JSX、无构建)
cordis.patch.yml      把本插件 insert 进 web profile 的插件名册
tests/unit-check.mjs  纯 Node 检查:断言真正生成的那张样式表(无需浏览器,17 条)
tests/smoke.html      浏览器功能自测:点击 / 还原 / 目标切换 / 快捷键 / 卸载(24 条)
tests/visual.html     展开 / 收起两态的样子(加 ?state=collapsed 看收起态)

自测

# 1) 纯 Node,无浏览器依赖
node tests/unit-check.mjs

# 2) 浏览器功能自测(headless Chrome)
google-chrome --headless=new --no-sandbox --virtual-time-budget=6000 \
  --dump-dom "file://$PWD/tests/smoke.html" | grep -E 'PASS|FAIL|passed'

改配置

默认值都在 lib/client.js 顶部的 DEFAULTS:collapsed / target / anchor / ball。

  • anchor: 'toolRow'(默认)按钮进工具行;改成 'corner' 则贴输入框卡片右上角。
  • ball: 'br' | 'bl' | 'tr' | 'tl' 恢复球落点,默认右下。 底边两档的 bottom = BALL_INSET(20) + BALL_SIZE(44)/2 = 42px —— 比基准抬高半个球高, 避开收起后右下角本来就有的常驻控件;要再挪改这两个常量即可。

License

MIT

Comments

Loading…

From the same category

dsh-desktop

by anywhere-labs

为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。

UI & ExperienceManifest valid

★ 30.4k

↓ 108/wk

MIT

TypeScript

Oct 10, 2026

dsh plugin --profile web add dsh-plugin-desktop

by zhu1090093659

DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop

UI & ExperienceManifest valid

★ 8.6k

↓ 125/wk

Apache-2.0

TypeScript

Oct 10, 2026

dsh plugin --profile web add dsh-web

A collection of independent Web UI plugins and skins, including task boards, Git graphs, mobile access, and live token stats.

UI & ExperienceManifest valid

★ 7.6k

↓ 119/wk

Apache-2.0

TypeScript

dsh plugin --profile web add dsh-web

by omdsh-dev

开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git,

UI & ExperienceManifest valid

★ 4.1k

↓ 38.1k/wk

MIT

TypeScript

Oct 9, 2026

dsh plugin --profile web add dsh-better-sidebar

by bowenliang123

The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,

Tools & CapabilitiesTerminal & ClientsUI & ExperienceManifest valid

★ 2k

↓ 34.4k/wk

Apache-2.0

TypeScript

Oct 11, 2026

dsh plugin --profile web add dsh-context

by shaobeichen

把 DeepSeek Harness 装进你的口袋:电脑上跑 dsh web,手机扫码即同步访问(局域网 + 公网,实时同屏)Put DeepSeek Harness in your pocket: run dsh web on your computer and access it synchronously by scanning a QR code on your phone (LAN +

UI & ExperienceManifest valid

★ 1.6k

↓ 3.2k/wk

GPL-2.0

JavaScript

Sep 16, 2026

dsh plugin --profile web add dsh-pocket