返回目录
其他 插件

dsh-thinking-phrase

PaoMoXML/dsh-thinking-phrase

自定义 DSH 思考提示文字:多短语轮换、随机挑选,以及打字机、命令行、解码三种动画特效。

Stars
0
Forks
0
Issues
0
更新
7 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:PaoMoXML/dsh-thinking-phrase

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-thinking-phrase

Customize the line that DSH shows while a model is thinking:

深度求索中,用时 3 秒 ···

The plugin replaces the text of the running status without touching the rest of the Chat layout. Open Plugins in the sidebar, open this bundle's card, and edit the 思考提示 section on it.

What it offers

  • Up to 25 one-line phrases, with the field showing how many lines it currently holds against the cap; multiple phrases rotate while the model is thinking.
  • Rotation is in list order, or the next phrase is drawn at random with the 随机挑选下一条 switch; a draw never repeats the phrase just shown.
  • {duration} is replaced with the live elapsed time, for example 深度求索中,用时 {duration} renders as 深度求索中,用时 3 秒.
  • Three more placeholders: {seconds} (whole seconds counted from the running clock, so a 65 second run reads 65 and not the 1 that the host's "1 分 5 秒" text starts with), {spinner} (a braille mark turning one frame per 100 ms) and {bar} (one █ per second over eight cells, then held full). The spinner and the bar measure the whole running period, so a rotating phrase list still shows them moving.
  • Four effects: 默认 (static), 打字机 (typewriter), 命令行 (command line: the text types out behind a _ cursor, _ → 你_ → 你好_ → 你好啊), 解码 (decode: every glyph waits its turn in a scattered order, so the line never resolves as a prefix).
  • Decode has two noise styles and its own 解码速度 (10–300 ms per settled glyph, default 40). 符号块 fades a glyph through three symbol stages, coarse to fine, before it reads as itself; 十六进制 shows 0-9A-F instead, as if data were being parsed. Both styles draw only East Asian full-width glyphs: the shading blocks an earlier version used (█ ▓ ▒ ░) are "ambiguous" width and an equal-width CJK font advances them by half a cell, which made the line creep wider as each glyph settled. Tick both styles and each switch draws one at random, the way the effect pool does; a tick of one fixes it.
  • An optional 每条短语随机换效果 switch draws one of the ticked effects on every phrase switch, so one run mixes styles; a single tick just keeps that effect. Each running label seeds its own draw, so two labels do not replay the same sequence.
  • 偶发错字自动修正 (glitch) is event-driven, not clock-driven: only a glyph the typing clock just revealed (typewriter, command line) or a phrase that just switched in may come out wrong, and it reads as a typo the line then corrects -- a line that is already correct is never spoiled again, so a growing placeholder ({duration} turning 9 秒 into 10 秒) raises nothing. Each event draws against a configurable 概率 (0–100 %, default 35), and the draw belongs to that event rather than to the phrase, so one phrase does not flicker every time it comes round. A wrong glyph holds for 160 ms, the replacement keeps the code-point count, the first glyph and a command-line cursor are never spoiled, the first observation of a label only records its baseline, and a switch ends any typo the previous phrase was still showing. An effect that types spoils its first glyph on a switch; an effect that shows the whole line spoils two of them. A decode frame never raises an automatic typo -- it is already full of noise -- though the page's 试一次 button still reaches it. The configuration page's 试一次 button forces one flicker on demand, even while the switch is off. It is off by default.
  • Per-phrase dwell time and typewriter speed.
  • A live preview in the configuration section.
  • The preference document is stored at $DSH_HOME/thinking-phrase/settings.json; localStorage is a fallback when the host route is unavailable.

Files

Path Role
client.js Browser half: the configuration page on the Plugins card, runtime text replacement and animation clock
index.js Host half: registers the two loopback-only preference routes
lib/store.js JSON preference document with atomic writes
lib/route.js POST /thinking-phrase/config and POST /thinking-phrase/save
lib/loopback.js Same-origin/loopback request fence

Notes

The running label belongs to @deepseek-ai/dsh-client-ui-chat and has no plugin slot. This plugin therefore hides TextShimmer's normal text child and paints the configured line on the [data-shimmer] root, while feeding the existing shimmer sweep the same text. The React tree is untouched. The selector lives in client.js; a missing shimmer root clears the plugin's own marker and leaves the original label visible instead of breaking Chat. That check covers the root disappearing, not a change of the root's own display mode, which the shared-cell rule below relies on.

TextShimmer's root is an inline-grid sized to its content, and the layer that clips the shimmer sweep is pinned to that box. The hidden stock line and the custom line therefore share one grid cell, so the box is as wide as the longer of the two; painted out of flow, a custom line longer than the stock label (or one rendered at a larger UI font) used to stop the sweep at the stock label's end. A line wider than the container is still clipped to it.

The settings document is not session data; deleting it only restores the default 深度求索中,用时 {duration} wording.

Both the running label and the preview are driven by the frame clock, throttled to about twenty ticks a second. A hidden tab stops painting and therefore stops doing this work; because every frame is drawn from an absolute elapsed time, a label that resumes simply shows the right second instead of replaying what it missed. Each tick only writes the DOM when the frame it computed differs from the last one, so a static line costs a couple of microseconds and no writes at all.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类其他
规则置信度低

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。