- Inicio
- Plugins
- Mejoras de UI
- dsh-composer-predictions
dsh-composer-predictions
xuhuawork/dsh-composer-predictions
Context-aware next-step prompt chips above the composer with hover full-prompt previews, Option/Alt+1..4 shortcuts, editable-only draft fill, a 5s overwrite guard, fast-model routing, and zero prompt-cache drift.
Instalar
dsh plugin --profile web add github:xuhuawork/dsh-composer-predictionsREADME
dsh-composer-predictions · DeepSeek Harness 输入预测插件
Architected from Shen Xuhua's official Hermes Composer Predictions prompt-prediction engine — natively re-engineered for DeepSeek Harness Desktop & Web.
源自沈序桦(Shen Xuhua)研发并合入 Hermes 官方目录的 Hermes Composer Predictions 提示词预测架构,面向 DeepSeek Harness 双端微内核深度重构的原生二次开发插件。
Built as the DeepSeek Harness counterpart to Shen Xuhua's Hermes Composer Predictions (merged into the official Hermes Plugin Catalog,
PR #157436). Inherits the sameI✦visual grammar, four-intent prompt choreography (ask/refine/action/verify), and 0-byte Prompt Cache drift sidecar discipline—rebuilt cleanly on Cordis and Typert RPC.
沿用沈序桦在 Hermes 官方目录插件中确立的统一I✦视觉符号语言、四维意图提示词工程(追问 / 精修 / 执行 / 验证)与 0B 主会话缓存零损耗旁路架构,基于 DeepSeek Harness 原生 Cordis 与 Typert RPC 体系重构落地。

4 intent pill chips · Frameless native 60fps motion · Editable draft only (never auto-sends) · 5s overwrite lock · 0B prompt-cache drift · Cold+Hot sessions · Zero external runtime deps
4 枚全圆角意图胶囊 · 无框原生 60fps 流畅动效 · 仅填可编辑草稿(绝不自动发送)· 5 秒防误覆盖锁 · 0B 主会话缓存损耗 · 支持冷/热会话 · 零外部运行时依赖
Static Dark & Light theme screenshots · 暗色 / 亮色静态高清预览

Quick Install · 快速安装
git clone https://github.com/xuhuawork/dsh-composer-predictions.git
cd dsh-composer-predictions
# Optional dry-run check (touches nothing)
node scripts/install.mjs --profile desktop --dry-run
# Install into DeepSeek Harness Desktop profile (creates automatic timestamped backup)
node scripts/install.mjs --profile desktop
# Uninstall cleanly anytime
node scripts/install.mjs --profile desktop --uninstall
Also works with any custom
dshWeb profile (--profile <name>). Never modifiesDeepSeek Harness.apporapp.asar. Restart DeepSeek Harness after install/uninstall to activate.
Features · 核心特性
- Short intent chips, full-prompt hover preview (
短标签选方向,悬停看全文)
After each assistant reply settles, up to four untruncated short chips appear cleanly above the composer (conversation.input.dock), spanningask,refine,action, andverify. Hover any chip to read the full ready-to-send prompt. - Editable draft only + 5s overwrite guard (
仅填草稿不抢发 + 5 秒防误覆盖锁)
Clicking a chip callsinputActions.setDraft(...)and never callssubmit(). When the composer already holds a different unsent draft, the first click intercepts with an inline warning; a second click on the same chip within 5 seconds confirms replacement. - 0-byte Prompt Cache drift (
0B 主会话历史与缓存损耗)
The host Cordis service (ComposerPredictionsService) reads at most the latest 6 nonempty visible user/assistant messages (12,000char cap) strictly read-only, runs a single statelessctx.llm.prepareCall(...)at the model's fastest reasoning effort, and never callssession.append(...). Hidden reasoning/CoT blocks, tool calls, and system/developer prompts are never sent. - Automatic language matching & zero-flicker refresh (
语言自动跟随 & 换一组零闪烁)
Language strictly follows your latest human message (Chinese or English). Clicking ↻ New suggestions / ↻ 换一组 keeps previous chips visible while fetching and swaps cleanly (60ms/80ms, skipped underprefers-reduced-motion). Revisiting an unchanged turn reuses the validated in-memory cache with zero extra LLM calls. - Keyboard shortcuts (
纯键盘快捷键)- Empty composer (
Tab/←/→/Esc): matches Hermes Desktop's keyboard flow — pressTabor←to cycle suggestions with live full-prompt preview,→to accept into the editable draft (never auto-sends), andEscto dismiss. Never interceptsShift+Tab, IME composition, non-empty drafts, or slash/mention menus. - Direct jump (
Option/Alt + 1..4&Option/Alt + R): insert any suggestion immediately (protected by the 5s overwrite guard), or refresh suggestions hands-free.
- Empty composer (
- Dedicated fast-model routing (
独立轻量小模型路由)
When your main conversation uses a slower flagship model, optionally pin a fast sidecar route in your profilecordis.patch.yml(or DSH plugin config):- id: composer-predictions config: provider: deepseek-account model: deepseek-flash - One-click pause & instant cached resume (
I✦随时开关 · 秒回流畅动效)
Click the framelessI✦toggle on the left to pause predictions anytime (persisted inlocalStorage; zero requests while paused) and click again to cascade already-generated chips back immediately with zero extra LLM call. Cold loading renders equal-height shimmer pill skeletons to eliminate vertical layout shift.
Architecture · 架构说明
| Layer | File | Responsibility |
|---|---|---|
| Pure Core | lib/core.js | Read-only session extraction (<=6 msgs, <=12,000 chars), language detection, prompt builder, JSON parser/clipper, 5s overwrite guard |
| Host Cordis Service | lib/index.js | TypertRemoteService (composerPredictions/generate), stateless ctx.llm.prepareCall, LRU turn cache, abort & disposal cleanup |
| Typert Contracts | lib/typert.host.js, lib/typert.remote-client.js | Strict Zod RPC schemas auto-discovered by @deepseek-ai/dsh-typert-loader |
| Browser Client UI | lib/client.js | window.__ModuleLoader__.load bundle mounted into conversation.input.dock (order: 30) using native DeepSeek Harness CSS design tokens |
| Bundle Patch | cordis.patch.yml | Declarative Cordis bundle mount (maxMessages, maxInputChars, maxOutputTokens, timeoutMs) |
Local Verification · 本地测试与校验
npm run check
License
MIT.
Plugins relacionados
dsh-web (dsh-task-board)
zhu1090093659/dsh-web
dsh-web (dsh-web-all)
zhu1090093659/dsh-web
dsh-TUI
ccch1mneyyy/dsh-tui
dsh-web-ui (dsh-task-board)
zhu1090093659/dsh-web-ui