publieople/dsh-fullwidth0

dsh-fullwidth

Conversation full-width by default + pretext text measurement (DSH plugin)

包名
dsh-fullwidth
版本
0.0.4
许可证
BSD-3-Clause
最近更新
2026年8月30日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:publieople/dsh-fullwidth

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

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

Runtime injection via dsh-super-injector:

dev_build_plugin {dir: }
dev_inject_plugin {dir: }

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.