dsh-fullwidth
开发工具 活跃维护

dsh-fullwidth

publieople/dsh-fullwidth

轻量级样式扩展插件,可自动将对应聊天窗口默认撑满中间内容列,侧边栏折叠后无多余空白边距,无需手动调整布局,开箱即用。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
BSD-3-Clause
开源协议
124 KB
仓库大小
24 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:publieople/dsh-fullwidth
git clone https://github.com/publieople/dsh-fullwidth.git
git clone git@github.com:publieople/dsh-fullwidth.git
README.md master

dsh-fullwidth

English | 简体中文

Make the DeepSeek Harness chat window span the whole center column by default (no more big empty margins beside a collapsed sidebar), and add an interactive text measurement tool powered by @chenglou/pretext.

Features

  • Full-width conversation (default on). DSH centers the transcript/composer at a reading width --dsh-chat-content-width (~748px), leaving large empty margins. This plugin re-declares that variable to 100% so the transcript and composer fill the entire center column.
  • Settings toggle. Turn it off in Settings → Full-width & Text Measurement (remembered in localStorage).
  • Pretext text measurement. Measure text height / line count / line breaks entirely in the browser, without DOM reflow (no getBoundingClientRect / offsetHeight).
  • i18n. UI copy ships in zh/en via the DSH locale runtime (ctx.locale).

How it works

The conversation root (data-phase containing [data-conversation-scroll]) declares the shared width axis --dsh-chat-content-width. The plugin re-declares it to 100% with a high-specificity rule:

[data-phase]:has([data-conversation-scroll]){--dsh-chat-content-width:100% !important;}

The selector is stable across DSH builds (it does not depend on CSS-modules hashed class names). Turning the toggle off removes the rule and returns to the default reading column.

Install

In a DSH profile:

dsh plugin --profile web add github:publieople/dsh-fullwidth#v0.0.5

Zero build (the compiled lib/ is committed) — restart the profile after install.

Runtime injection via dsh-super-injector:

dev_build_plugin {dir: <repo>}
dev_inject_plugin {dir: <repo>}

Build from source

npm install
npm run build        # host: src -> lib
npm run build:client # client: tsdown -> lib/client.js (inlines pretext)

Requirements

  • A DSH web profile with the client runtime (@deepseek-ai/dsh-client-locale, -runtime, -ui-settings, -ui-slots).
  • DSH >=0.1.1-rc.1.

License

BSD-3-Clause.