Skip to content
dsh.fish
Bundle

dsh-chat-tune

Tune the conversation area: font, width, line height, and paragraph spacing. 对话区界面设置:字号 / 字体 / 行距 / 段距 / 宽度。

Source
xingyingyuzhui
License
MIT
Updated
Updated 7 days ago

Readme

# dsh-chat-tune · 对话区界面设置

DeepSeek Harness Web 插件:在 **设置 → 通用设置** 里、「外观」正下方增加「对话区界面设置」,调节会话区的**字号 / 字体 / 行距 / 段距 / 显示宽度**。不改官方组件——通过覆盖官方 CSS 变量 seam 生效。

![设置 → 通用设置 → 对话区界面设置](docs/settings.jpg)

## 安装

前置:本机已能运行 `dsh web`。

```sh
dsh plugin --profile web add github:xingyingyuzhui/dsh-chat-tune
```

装完重启 `dsh web`。打开 **设置 → 通用设置**,在「外观」下面就是本插件的控件。

本地开发:

```sh
dsh plugin --profile web add link:/abs/path/to/dsh-chat-tune
```

## 能力

| 项 | 说明 |
|---|---|
| 字号 | 小 13 / 偏小 14 / 标准 16 / 大 18 / 特大 20 / 自定义(8–48px) |
| 字体 | 系统默认 / 无衬线 / 衬线 / 等宽 / 苹方 / 思源黑体 |
| 行间距 | 紧凑 1.4 / 适中 1.6 / 标准 1.75 / 宽松 2.0 / 很松 2.4 / 自定义(1.0–3.0) |
| 段落间距 | 紧凑 8 / 偏紧 12 / 标准 16 / 宽松 24 / 很松 32 / 自定义(0–80px) |
| 显示宽度 | 窄 640 / 标准 748 / 宽 900 / 超宽 1100 / 自定义(480–2000px) |
| 代码块跟随 | 打开时代码块改用所选字体(默认保持等宽) |
| 输入框跟随 | 打开时底部输入框宽度同步内容宽度(默认开启) |

## 原理

- 正文字号/字族/行距覆盖官方 seam:`--dsw-font-markdown-base` / `-h1..h4`(完整 `font` 简写)
- 段落间距改消息列里 `p` / 列表 / 标题的 `margin-block`
- 内容宽度:`composerFollow` 开启时写在会话根 `[data-phase]` 上的 `--dsh-chat-content-width` 与 `--dsh-composer-card-max-width`;关闭时只改消息列
- 代码字体:`--ds-font-family-code`
- 选择器挂在 `body[data-dsh-chat-tune]` 下
- 偏好存 `localStorage`(`dsh-chat-tune:prefs`)

## 卸载

```sh
dsh plugin --profile web remove dsh-chat-tune
```

## 开发

```sh
npm run build   # 生成 client.js(改 chat-tune-*.mjs 后)
npm test        # build:check + node --test
```

## License

MIT

Install

dsh plugin --profile web add github:xingyingyuzhui/dsh-chat-tune

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source