# 🐋 dsh-chat-width-customizer **聊天宽度自定义 · Chat Width Customizer** — 为 DeepSeek Harness Web UI 一键加宽对话内容区的插件 [](https://github.com/magicOF2/dsh-chat-width-customizer) [](LICENSE) [](https://github.com/magicOF2/dsh-chat-width-customizer) 在会话标题栏右上角加一个「宽度 · NNNpx」按钮,点击循环切换 7 档宽度预设, 对话内容区、输入框、用户消息气泡**一起变宽**,并记住你的选择。
--- ## ✨ 特性 / Features - **一键加宽**:点击标题栏按钮循环切换宽度档位(748 → 1600 px),无需进设置页 - **整列联动**:对话消息区、底部输入框(Composer)、用户气泡同步加宽,观感统一 - **全局共享**:宽度是全局状态 —— 在 A 会话调到 1600,切到 B 会话依然 1600,按钮显示一致 - **持久记忆**:选择写入 `localStorage`,刷新页面 / 重开浏览器后自动恢复,不丢失 - **零配置**:纯浏览器端插件,无 Host 逻辑、无外部依赖、无网络请求,所有数据只存本机 - **主题友好**:按钮样式完全使用 DSH 主题 CSS 变量,浅色 / 深色模式自动适配 ## 🎯 界面位置 / Where it lives 按钮位于**每个会话标题栏的右上角**(标题、视图标签右侧的独立工具区): ``` ┌──────────────────────────────────────────────────────────┐ │ 💬 会话标题 [对话] [轨迹] [宽度 · 1024px] │ ├──────────────────────────────────────────────────────────┤ │ (对话内容区 —— 宽度随按钮档位变化) │ └──────────────────────────────────────────────────────────┘ ``` ## 📦 安装 / Installation ### 方式一:从 GitHub 安装(推荐给其他用户) ```sh dsh plugin --profile web add https://github.com/magicOF2/dsh-chat-width-customizer.git ``` ### 方式二:从 npm 安装(发布后可用) ```sh dsh plugin --profile web add dsh-chat-width-customizer ``` ### 方式三:本地开发 / 自用(链接方式) ```sh # 把仓库克隆到外部插件目录(或直接把本仓库目录放进去) git clone https://github.com/magicOF2/dsh-chat-width-customizer.git ~/.dsh/external/dsh-chat-width-customizer # 链接进你的 profile dsh plugin --profile web add link:C:/Users/<你的用户名>/.dsh/external/dsh-chat-width-customizer ``` > ⚠️ **安装后需要重启 `dsh web`**,并在浏览器里 **Ctrl+Shift+R** 强制刷新一次。 > 之后插件随 GUI 自动加载,**无需任何手动启用**。 ## 🖱️ 使用 / Usage 1. 打开任意会话,点击标题栏右侧的「宽度 · NNNpx」按钮 2. 每点一次循环到下一档:`748 → 896 → 1024 → 1152 → 1280 → 1440 → 1600 → 748 …` 3. 宽度**立即生效**,且全局共享: - 切换会话 → 宽度与按钮显示保持一致 - 刷新页面 → 自动恢复上次选择的宽度 ## ⚙️ 自定义宽度档位 / Custom presets 默认预设为 `[748, 896, 1024, 1152, 1280, 1440, 1600]`(单位 px)。 想改档位、增减档数,编辑 `lib/client.js` 顶部的 `PRESETS` 常量即可: ```js const PRESETS = [748, 1024, 1280, 1600]; // 例如只保留 4 档 ``` > 提示:`PRESETS[0]` 即默认宽度;localStorage 中只会保存预设列表里存在的值。 ## 🔧 工作原理 / How it works - **宽度控制**:产品自带样式把对话列限制在 `--dsh-chat-content-width`(默认 748px)并居中。 插件在页面级 `Review
Why we picked it
Pending human review — the facts below come from the source repository.
What it does
Pending human review — the facts below come from the source repository.
How to install
- Copy the one-line install command:
dsh plugin --profile web add github:magicOF2/dsh-chat-width-customizer - Run it in a terminal in the same environment as your DeepSeek Harness install.
- Restart DSH — the plugin loads on the next start.
Who it’s for
Users who want this capability in DSH; check the source and docs before installing.
Alternatives
- Turn Marks — DSH web UI plugin: Claude Code / Codex style turn-marks strip on the left edge of the conversation - one bar per user message, click to jump, hover for preview, active bar turns white.
- Better Sidebar — 开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, Git, and sub-agent pages.
- TUI — DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rollback, context bar + TPS. npm one-click.
Risks & caveats
- No strong risk signals; still worth a source look before installing.