dsh-thinking-highlight: Thinking line keyword counting and red-marking

Preface

When reading model chain-of-thought (thinking) lines in DSH, repeated words in long paragraphs often have to be spotted by eye. In collapsed state you only see the title, and when expanded you have to find the same concept within a screenful of text. The Thinking Highlighter introduced below targets exactly this scenario: it counts keyword occurrences on DSH thinking lines, highlights them with configurable styles, and centralizes word lists and appearance in settings. The plugin is published by community maintainer Yokira404, the npm package name is @yokira404/dsh-thinking-highlight, and it belongs to the client-side category of DSH plugins. It injects the chat UI via a Cordis patch and does not depend on any additional @deepseek-ai/* host packages.

What Is This

dsh-thinking-highlight performs full-text counting and highlighting of user-configured keywords inside DSH lines marked as “thinking” (the host DOM element is [data-variant="think"]), and displays a keyword × count chip next to each line’s title. The settings entry is independent: Thinking Highlighter in the left navigation of Ctrl + ,. Configuration is saved in the browser’s localStorage and takes effect immediately after changes. The current npm version is 1.4.1, licensed under MIT.

Core Features

Count Badges and One-Click Disable

After each thinking line’s title, a count badge appears for each keyword. When the line is collapsed, the count covers the entire chain-of-thought text; expanding or collapsing does not change the numbers.

Clicking a badge can individually disable global highlighting for that word: the word no longer gets colored, and the badge switches to a muted style; clicking again restores it, and the choice is remembered.

Highlight When Expanded

After expanding a thinking line, each occurrence of a keyword in the body text is colored according to the color configured for that word. You can set each word individually:

  • Highlight background color, text color (optionally Theme, inheriting the host theme to avoid readability issues after light/dark switching)
  • Font size 10–22 px (matching the DSH body font size range)
  • Font family (default / monospace / serif), bold, italic, underline
  • Whole word: e.g. is can match only standalone words, not inside this or ThisIs

Badges and body highlighting share the same style; badge size scales with the word’s font size.

Hide Highlights Per Line

Each line provides an “eye” control: you can hide the coloring effect on the current line only without affecting other lines; when disabled the markers remain in the text but are hidden via CSS, and can be instantly restored by toggling back.

Word List and Deduplication

In the Keywords section of the settings page, each word occupies one line. You can edit text, expand ▸ style, toggle whole-word matching, suppress, or delete. Entering an existing word will be rejected with a reason prompt.

Badge Appearance Editor

Badge settings allows editing the count badge itself: opening from within a word-level panel edits that word’s specific badge; the same-name button at the top of the keyword list edits the global default badge (words that haven’t been individually changed show “Follows the shared badge”). The editor uses the host modal, changes apply immediately, and it includes a live preview, six built-in templates, custom template saving, size scaling 0.5×–2.4× (default follows the word font size), fill/text/border colors, shape and stroke/shadow, local texture upload (max 96 px on the long edge, stored only in the current browser), and restore.

Other Settings

Item Purpose
Language Plugin UI in Chinese / English
Plugin One-click hide of all colors, badges, and highlights
Chips when collapsed Whether badges and the eye control still show on collapsed lines
Expand lifts the box Disabled by default; when enabled, expanding a thinking line temporarily removes DSH’s 400px scroll limit on the process area, making long chains easier to read
Case sensitive Disabled by default, so is will also match IS

Installation and Activation

The plugin supports both dsh web and the desktop client; after installation you must refresh the page or restart the app for the settings page to appear. You can also install it via a one-click card in the dsh-market plugin directory (pointing to the same package as the npm installation).

Install from npm under the web profile:

dsh plugin --profile web add @yokira404/dsh-thinking-highlight

If using another profile name (e.g. desktop):

dsh plugin --profile desktop add @yokira404/dsh-thinking-highlight

dsh plugin add writes the package into the profile’s dependencies and adds it to dsh.profile.bundles; the Plugins page’s “Installed” section only shows cards and toggles for packages recorded as dependencies in the profile.

Environment Requirements

  • dsh with a web profile (dsh-market itself requires dsh web 0.1.0-rc.6 or newer).
  • The plugin only imports react and react-dom/client already provided by the host; no additional packages need to be installed on the host side.
  • The thinking line UI is provided in dsh desktop 0.2.0-rc.2 and in @deepseek-ai/dsh-client-ui-chat distributed with dsh web; the evidence/host-shape.mjs file in the repository verifies that the DOM markers being depended on still exist in the current bundle.

Typical Usage

  1. Install using the command above and reload / restart, then confirm the plugin is enabled in Plugins.
  2. Open Ctrl + , → Thinking Highlighter, and add words to track under Keywords (e.g. concept names the model frequently repeats).
  3. After thinking lines appear in a conversation, check the word × n badges next to titles; click a badge to temporarily disable highlighting for that word.
  4. Expand thinking lines to read the highlighted body text; enable Expand lifts the box when you need to closely read long chains.
  5. Adjust colors, font sizes, and badge templates via ▸ style and Badge settings so that high-frequency words remain clearly readable in both dark and light themes.

Use Cases and Caveats

Suitable for: DSH users and agent developers who frequently review model thinking processes, want to quickly see which words recur in a single chain or round of reasoning, and need to distinguish multiple concepts by color.

Caveats:

  • The plugin runs in the current dsh process and current browser profile; settings and uploaded badge textures do not sync across devices. It is recommended to read the GitHub source and the MIT license before installation.
  • Thinking lines are built-in host components; the plugin decorates them via patching and DOM observation. After a major version upgrade of DSH or the chat UI, if the host removes markers like [data-variant="think"], functionality may break—pay attention to the plugin and host release notes.
  • Community plugin directories (e.g. the SkillHub plugin page) are not officially affiliated with DeepSeek or 幻方 (High-Flyer); the DSH ecosystem follows “everything is a plugin,” so when choosing third-party packages please evaluate the maintainer and update frequency yourself.

Conclusion

dsh-thinking-highlight turns keywords in thinking lines into countable badges and configurable highlights, and provides an independent settings section and a badge editor. It is suitable for long-term reading of chain-of-thought in DSH web or desktop. For more information, see the directory page SkillHub · dsh-thinking-highlight and the repository Yokira404/dsh-thinking-highlight.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye