Introduction¶
DSH’s plugin system transforms chat tools into extensible platforms, but in multilingual scenarios, model output remains in Chinese. Mixing in English expressions requires extra instructions or system prompts. This switching cost accumulates over multi-turn conversations and can disrupt context. dsh-chingless performs replacements at the rendering layer—without modifying model input or consuming tokens—making it ideal for conversation scenarios that require quick toggling between Chinese and English.
What It Is¶
dsh-chingless is a DSH “fun costume” plugin maintained by jiexusheng2121. It randomly splices English words from a user-imported lexicon into the AI’s Chinese replies. It only alters the displayed content; the model context and export records remain unchanged. Zero token cost, runs locally, can be toggled off at any time—perfect for injecting English expressions into existing conversations.
Core Features¶
Zero-Token Local Replacement¶
The plugin operates at the browser rendering layer. It does not call the model, modify conversation history, or append system prompts. It ships with a built-in “Chinese word → common English word” table (approximately 65,000 entries), intersects it with the user’s imported word list, and derives replacement rules. Reply text undergoes longest-match tokenization; only Chinese words of 2–4 characters are replaced. Code, links, formulas, and thinking traces are skipped. Replacements use a deterministic hash based on “message anchor + character position,” so the same reply renders identically every time—no flickering.
Configurable Lexicon and Intensity¶
The configuration page supports three input methods:
- Word list: One English word per line, or space/comma-separated. Supports .txt/.csv/.json file import.
- Intensity: The probability that each candidate Chinese word gets replaced. Defaults to 15%. Longer sentences yield more replacements.
- Custom pairs: One “Chinese English” pair per line. Takes priority over the built-in dictionary, useful for personal terminology.
Original / Mixed Toggle¶
A floating button in the bottom-right corner (can be disabled) provides one-click switching between “Mixed / Original” to restore 100% Chinese. The keyboard shortcut Alt+R toggles the same way. Switching is instant—all displayed messages, including new messages that finish streaming afterward, follow the current mode. State is page-local only; refreshing returns to mixed mode.
Live Preview¶
The configuration page offers real-time preview. Editing the word list immediately shows replacement results, along with stats: N words imported, M of which match a Chinese entry, and which words have no match yet.
Installation & Activation¶
Method 1: Local tarball (Recommended)¶
Download dsh-chingless-0.1.1.tgz from the repository’s Release page:
dsh plugin --profile <your-profile> add ./dsh-chingless-0.1.1.tgz
For the Desktop app, use the “Plugins → Install” entry to select the tarball, or place files manually:
~/.dsh/profiles/<profile>/package.json # add dsh-chingless to dependencies, append dsh-chingless to dsh.profile.bundles
~/.dsh/profiles/<profile>/node_modules/ # dsh-chingless/ appears after pnpm install
After installation, restart DSH (or reload plugins on Desktop), then open “Settings → Plugins → Chingless Mixer → Configure.”
Method 2: Install from GitHub¶
dsh plugin --profile <profile> add github:<you>/dsh-chingless
GitHub installation pulls the source; pnpm runs the package’s prepare script (i.e., node scripts/build.mjs) to generate lib/.
Typical Usage¶
After configuration, simply type a Chinese question in chat. When the AI replies, replacements happen automatically at the rendering layer. For example, if you’ve imported “happy” and “help” into your word list, the AI’s words “开心” and “帮助” will display as “happy” and “help”:
User: Hello!
AI: Hi there! I’m so happy to see you—what can I help you with?
To switch back to pure Chinese, click the floating button in the bottom-right corner or press Alt+R.
Use Cases & Caveats¶
Ideal for quickly injecting English expressions into conversations that require mixed Chinese-English output, for example:
- Language learning: Embed English terminology within Chinese explanations.
- Interview practice: Replace Chinese expressions in answers with English words.
- Workplace communication: Naturally include English abbreviations or domain-specific vocabulary in Chinese replies.
Caveats:
- The plugin only affects completed replies in the Web / Desktop chat view; streaming output remains in Chinese.
- Code blocks, inline code, links, formulas, thinking traces, and tool-call lines are never replaced.
- Only Chinese words of 2 or more characters are targeted.
- Selecting and copying text yields the mixed text you see; the underlying conversation record remains pure Chinese.
- The plugin relies on DOM markers such as data-chat-flow-kind="assistant-step" to locate replies. If DSH undergoes a major chat DOM change, src/client/dom.mjs must be updated accordingly.
Before installing, review the source code and license (MIT), and only authorize trusted sources.
In Short¶
dsh-chingless achieves Chinese-English mixed rendering at the display layer—zero tokens, no model input modification—making it a natural way to sprinkle English expressions into existing conversations. For more fun “costume” plugins, visit the plugin catalog and GitHub repository.