dsh-bili-scroll
c1overzz
DSH 插件:每天替你刷一轮 B站,读字幕挑出值得的、写一份日报,值得的 @ 你
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:PaoMoXML/dsh-thinking-phrase
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
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.
{duration} is replaced with the live elapsed time, for example
深度求索中,用时 {duration} renders as 深度求索中,用时 3 秒.{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._ cursor, _ → 你_ → 你好_ → 你好啊),
解码 (decode: every glyph waits its turn in a scattered order, so the line
never resolves as a prefix).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.{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.$DSH_HOME/thinking-phrase/settings.json; localStorage is a fallback when
the host route is unavailable.| 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 |
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,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。