DeepSeek Harness 插件

AvigatorC/dsh-conversation-width

Star 数 ★ 0 分类 UI 增强 收录于 2026-10-31

把 dsh 界面的对话框固定为像素宽度或列宽百分比,设置项在「通用」设置页;锁定后隐藏内置拖动手柄,宽度不再被误拖。

安装

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:AvigatorC/dsh-conversation-width

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

把 DSH(DeepSeek Harness)Web 界面的「对话框」内容列宽度固定下来:可以锁定为像素值,也可以按窗口比例随缩放变化。设置项位于 设置 → 通用,紧跟在「字号大小」之后。

仓库:https://github.com/AvigatorC/dsh-conversation-width · 版本:v1.0.0 · 许可:MIT

DSH Web UI 的对话内容列默认带左右拖动手柄,宽度记在 localStorage。装了本插件后可三选一:

模式 行为
默认可调 完全不干预,保留原生左右拖动
固定像素 锁死为 420–2400px,拖动手柄隐藏
窗口比例 40–100%,随窗口缩放自动跟随

数值框支持直接键入(Enter / 失焦提交),悬停或聚焦时出现上下箭头微调(像素 ±10,比例 ±1)。

兼容性

在 dsh 0.2.1-rc.3 上开发与验证。插件不声明 engines,因此版本号不会拦截安装;若某个 dsh 版本的会话体没有 data-conversation-content 属性,宽度的 CSS 覆盖会静默失效(不报错、不影响界面,只是不生效)。

安装

从插件市场安装

本插件已投递到 awesome-dsh-plugin(dsh 插件市场目录)。收录后即可在 DSH 的插件市场(如 dsh-market)里搜索 dsh-conversation-width 一键安装;市场按本仓库源码安装,不需要 npm 包。

尚未收录、或市场里还搜不到时,用下面的方式安装,功能完全一样。

从仓库安装

git clone https://github.com/AvigatorC/dsh-conversation-width.git

把克隆下来的目录作为本地插件装进当前 DSH profile(plugin_manager 的 install_bundle 接受目录路径),例如让会话里的 Agent 执行:

把 D:\Code\dsh-conversation-width 装成插件

装好后打开 设置 → 通用,在「字号大小」下方选择模式即可。升级:git pull 后刷新窗口(DSH 会热替换插件模块);移除:同一个 plugin_manager 的 remove_bundle。

实现要点

  • 宽度覆盖作用在会话体已经发布的 CSS 变量 --dsh-chat-content-width 上(!important),正文列与输入框卡片的 max-width 都读它,因此不改动 DSH 组件本身、也不与拖拽逻辑冲突。
  • 比例模式读取 DSH 自己写出的 --dsh-conversation-column-width,所以是「对话列宽 × N%」,侧栏开合时会跟着自适应。
  • 锚点是会话体上的 data-conversation-content 属性。若将来 DSH 改名,覆盖会静默失效,只需改 client.js 里 widthCss() 的选择器。
  • 设置行复用官方 @deepseek-ai/dsh-client-ui-primitives 的 Menu 与箭头图标(与「工作步骤展示」等原生行同款);该模块不可用时自动退回原生 select,不会让行崩掉。

存储

localStorage["dsh.conversationWidth"],形如:

{ "mode": "percent", "px": 820, "percent": 72 }

想恢复默认,把模式切回「默认可调」即可;清掉这个键等于恢复出厂。

License

MIT


English

Pins the conversation column of the DeepSeek Harness Web UI to a pixel width, or to a share of the conversation column that follows the window. The setting is a row on Settings → General, right after the font-size row.

Developed and verified against dsh 0.2.1-rc.3. No engines requirement is declared, so no version gate blocks installation.

  • Default (draggable) leaves the shipped drag handles untouched.
  • Fixed pixels locks 420–2400px and hides the handles.
  • Share of window uses 40–100% of the conversation column, so it scales with the window.

Type a value directly (Enter or blur commits) or use the hover arrows (step 10px / 1%).

Install

From a plugin market — once the plugin is listed in awesome-dsh-plugin, search dsh-conversation-width in a DSH market (e.g. dsh-market); markets install straight from this repository, so no npm package is needed.

From source — clone the repository and install that directory as a local bundle through plugin_manager (install_bundle accepts a directory path). Pull and refresh to upgrade.

Repository: https://github.com/AvigatorC/dsh-conversation-width. MIT licensed.

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。