dsh-wide-conversation
Give the DSH web client a conversation column that uses the width it has.
The built-in layout sizes the transcript from
--dsh-chat-content-width: clamp(680px, 64% of the column, 920px): on a wide
window a long conversation still reads in a narrow strip with large empty
margins. This plugin pins that axis to a configurable percentage of the
conversation column — 100% means the transcript spans the whole column — and
exposes the percentage as a collapsible card under Settings > Plugins.
简介 / 快速上手(中文)
这个插件让 DSH 桌面/网页客户端的对话列按可用宽度铺开。
- 内置布局把正文宽度锁在
clamp(680px, 列的 64%, 920px)—— 宽窗口下长对话仍挤在一条窄栏里,两侧留大片空白。本插件把这条宽度轴改成对话列宽度的百分比,100%即铺满整列。 - 百分比存在 Host 设置文档里(
wide-conversation命名空间),因此 设置 > 插件 里会出现一张 Wide Conversation 卡片:默认收起,点标题行展开后可在 40–100 之间调整,改完立即生效。收起时标题行右侧直接显示当前百分比。 - 安装:
dsh plugin --profile <name> add dsh-wide-conversation,然后重启该 profile。 - 插件只影响客户端布局,不碰模型、网络或会话日志,也不写入任何自定义会话事件。
Install
Install into a profile with the dsh CLI. Its plugin subcommand forwards to
pnpm inside the profile directory, so add/remove behave as usual:
dsh plugin --profile <name> add dsh-wide-conversation
Then restart the profile (desktop: Settings → Desktop settings → Restart, or
quit and reopen). The profile's package.json gains the dependency and the
dsh.profile.bundles entry, and the bundled cordis.patch.yml inserts the
plugin into the layer stack — no manual patch editing is required.
To remove it:
dsh plugin --profile <name> remove dsh-wide-conversation
Working from a local checkout instead? Point the profile at the directory:
dsh plugin --profile <name> add link:/path/to/dsh-wide-conversation
Config
Settings card Wide Conversation (Settings > Plugins) — collapsed by default, opened by clicking its header, which also shows the current percentage while collapsed. Or edit the same namespace directly in the Host settings document. Both surfaces write the same namespace; the Host schema below is the authority the value is validated against.
| field | default | range | meaning |
|---|---|---|---|
widthPercent |
100 |
40–100 |
Width of the conversation content as a percentage of the conversation column. 100 spans the whole column. |
Values outside the range are rejected by both the card and the schema, so a hand-edited settings document cannot drive the column outside it.
How it works
The conversation skeleton resolves its entire horizontal axis from
--dsh-chat-content-width, declared on its own root and overridden by a dragged
--dsh-chat-user-width. Both land as inline styles on the skeleton root, so
an ordinary stylesheet rule loses to the style attribute — the override carries
!important.
lib/client.jsinjects one stylesheet that pins both custom properties tocalc(var(--dsh-wide-percent, 100) * 1%), reclaims the clearance the read column reserved for the old centred 920px measure, and hides the drag handles the percentage now supersedes.- The live percentage is published once onto
document.documentElementas--dsh-wide-percent, so a change repaints on the next style recalculation instead of re-creating the stylesheet or re-rendering React. lib/index.jsregisters thewide-conversationsettings namespace on the Host. That namespace is what makes the card appear: the configurable tab dispatches its cards by settings namespace, so a namespace the Host serves and a card claiming it are the two halves of one entry. This is also why the preference lives in the settings document rather than in localStorage.- The card itself is a disclosure, matching the built-in plugin cards: a collapsed row using their tokens and radii, opening to the single width field. A contributed card inherits no styling from the settings section, so it restates what they use.
The composer card is derived as content + 32px, so it follows the axis
automatically.
No build step
The browser half is a hand-written window.__ModuleLoader__.load closure
factory — the only shape the client module system accepts — so the package ships
no bundler, no build script, and no client dependencies of its own. react
arrives through the injected require table; @deepseek-ai/schemastery
resolves through the profile's own node_modules, the same way the shipped
client plugins reach it.
Compatibility
- Client platform: web (
dsh.client.platform, i.e. the desktop and browser GUI). There is no terminal-face behavior. - Writes no session events, so it cannot affect session-log loading.
- The stylesheet rescapes nothing outside the conversation area, but it does
target the skeleton by attribute (
[data-phase]+[data-conversation-scroll]) rather than by hashed CSS-module class name, so it keeps working when class names change. If a future build renames those attributes, the plugin degrades to a no-op rather than breaking the layout.
License
MIT
No comments yet. Be the first to write one.