Preface¶
When reading long conversations in DSH Harness, the type size ladder, paragraph margins, and message gaps often come from multiple unrelated rule sets: line breaks within the same paragraph, between paragraphs, and between two messages all look like three distinct “step sizes.” The Appearance page lets you tweak the font size and font families in the theme, but it is hard to consolidate the vertical rhythm into a single grid, and you cannot individually narrow the conversation column’s whitespace relative to the window sides. Below we introduce the community client plugin dsh-chat-typography (maintainer: zheshiyigehenchang), which adds a “Conversation Flow Typography” page to Harness settings. It provides a small set of controls for font size, three role fonts, line-height multiplier, and left/right gutter, along with several fixed compactness styles.
What This Is¶
dsh-chat-typography (npm package @zheshiyigehenchang/dsh-chat-typography, current version 1.1.4, MIT license) is a typography plugin for the DSH Harness Web client, categorized as a client-side plugin. Once installed, Conversation Flow Typography appears in the Settings navigation. Changes take effect browser-side; just refresh the page—no need to restart the Harness.
The plugin does not run on the server side: it injects styles and the settings page as part of the client bundle loaded by the current DSH process. Before installing, you’re advised to review the source code and license in the GitHub repository and understand its reliance on the host’s internal selectors and CSS variables (major version upgrades may break some layers).
Core Features¶
Font Size: One Value for All Text¶
The host conversation flow has fixed type size ladders for headings, body text, secondary text, inline code, code blocks, and more. Within [data-chat-flow] (excluding textarea, input, and svg), this plugin unifies all visible text to a single font size, range 10–22px, default 14px (same as the host default). Font weight and family remain unchanged: headings stay bold, code stays monospaced.
This value is written to the Harness theme settings and shares the same data as the Appearance page—changes on either side sync to the other.
Fonts: Text / Code / Terminal¶
Three text boxes set the font family for text, code, and terminal respectively; leave blank to use system defaults. No manual quoting is required; the theme service sanitizes input. This also bidirectionally syncs with the Appearance page. If the theme service does not expose setFontFamily, the font groups will automatically hide, while other features remain available.
Line Height and Spacing: A Single Vertical Grid¶
The plugin consolidates three host vertical spacing mechanisms (line box line-height, markdown block margins, and --dsh-chat-flow-gap) into one unified rule:
- Line boxes scale with the font size and multiplier, and are guaranteed not to fall below the current font size.
- External margins on markdown text blocks (paragraphs, lists, quotes, headings, etc.) are reset to zero, making intra-paragraph and inter-paragraph line breaks consistent in step size.
--dsh-chat-flow-gapis set to zero; messages and body-to-tool rows are separated by only one line box.- Code blocks, tables, and horizontal rules retain 16px × multiplier top/bottom margins to avoid borders or backgrounds clinging to body text.
The multiplier range is 0.80–2.00, step 0.05, default 1.00; stored under localStorage key dsh-chat-typography.lineHeight. Even at 1.00, the unified grid applies—it will not revert to the host’s previously uneven spacing.
Left/Right Gutter¶
A numeric input sets the distance from conversation text to the window’s left and right edges (0–600px); leave blank to use the host’s default column width logic (originally about clamp(680px, viewport width × 0.64, 920px)). Implementation overrides --dsh-chat-content-width to narrow and align the conversation column, the input box card, user bubbles, and wide tables. Once you enter a value, the host “drag-to-widen” handle no longer applies; entering 0 still respects the reserved gap on either side of the input box and will not go below roughly a 32px minimum. The value is stored in localStorage key dsh-chat-typography.gutter.
Fixed Tightening (No Toggles)¶
Compactness independent of the multiplier and not separately toggleable includes: halving the top/bottom whitespace in the conversation header when there’s no tab row; reducing code block <pre> padding from 16px to 8px; tightening table cell padding and restoring host alignment for first/last columns; removing inline code’s pill-shaped background and border to avoid inconsistency between ordinary code and file-mention styling. Multi-tab session headers still keep the host’s 76px minimum when a tab row exists, to prevent overlap.
Restore Defaults¶
One click restores font size to the default combo (14 / 11 / 13), clears all three font families, resets line height to 1.00, and clears the gutter.
Settings Overview¶
| Setting | Control | Range & Default | Stored In |
|---|---|---|---|
| Font size | Number input | 10–22px, default 14 | Harness theme settings (shared with Appearance) |
| Font · Text / Code / Terminal | Text input | Blank = system default | Same as above |
| Line height | Number input | 0.80–2.00, step 0.05, default 1.00 | localStorage dsh-chat-typography.lineHeight |
| Left/right gutter | Number input | 0–600px, blank = host default | localStorage dsh-chat-typography.gutter |
Number inputs commit on Enter or blur; invalid input reverts to the previous value.
Installation and Activation¶
Install via the Harness Plugin Manager, passing the package name to target:
@zheshiyigehenchang/dsh-chat-typography
After installation, refresh the page. Open settings; you should see “Conversation Flow Typography” in the navigation. The README also explains how to link from a local source directory with link: for development—edit client.js and refresh to verify; for everyday use, install by package name via the manager.
Plugin metadata is discoverable through the community catalog entry on SkillHub; that site is a community plugin directory and has no official affiliation with DeepSeek / 幻方.
Typical Usage¶
- After installing and refreshing, go to Settings → Conversation Flow Typography.
- If long conversations feel cramped or loose, adjust font size first (e.g., 15–16px), then the line-height multiplier (e.g., 1.05–1.15), and observe whether intra-paragraph and inter-message steps look consistent.
- On wide screens with excessive side whitespace, enter a target pixel value under Left/right gutter to narrow the reading column; leave blank to restore the host’s default width behavior.
- To stay consistent with the Appearance page, change font size or fonts on either side; the other side will sync.
- After experimenting, click Restore defaults to return to the plugin- and theme-agreed initial configuration.
Use Cases and Notes¶
Who it’s for: Developers and users who often read or proof long conversations in Harness, want a consistent vertical rhythm, or wish to narrow the conversation column.
Permissions & trust: The plugin injects CSS and a settings UI client-side only, does not make network requests on its own; your current DSH installation and profile remain the trust boundary—please read the repository source before installing.
Compatibility: Strongly depends on [data-chat-flow], --dsh-chat-flow-gap, --dsh-chat-content-width, and markdown-related CSS Modules class name fragments; major version changes in dsh-client-ui-chat and dsh-client-ui-primitives may break some layers. Header tightening relies on :has() (Chromium 105+ / Safari 15.4+). Single-line tool rows and expanded step titles do not scale with line-height. After removing inline code’s background color, inline code is differentiated from body text solely by glyph shape.
Closing Remarks¶
dsh-chat-typography consolidates the conversation flow’s font size, fonts, vertical grid, and side gutter into a single settings page, sharing font size and font data with the Harness appearance theme. For further implementation details or to file issues, visit GitHub: zheshiyigehenchang/dsh-chat-typography; to find this plugin in the ecosystem, open the SkillHub catalog page.