DeepSHPlugins
dsh-adaptive-reasoning 项目预览
GITHUB / COMMUNITY PROJECT

dsh-adaptive-reasoning

UI 增强JavaScriptMIT

炭灰余烬风格的 DSH Web 像素推理强度滑块:以近黑木炭、暗红裂纹和橙红高温核心呈现 4px 像素化 WebGL 火焰,拖动时逐档点燃;支持 0–100 无极拖动、16ms 节流写入与松手吸附。

2 Starszhuifengqug 更新时间 2026-08-23
访问 GitHub 仓库
dsh-adaptive-reasoning 项目预览

项目介绍

中文

炭灰余烬风格的 DSH Web 像素推理强度滑块:以近黑木炭、暗红裂纹和橙红高温核心呈现 4px 像素化 WebGL 火焰,拖动时逐档点燃;支持 0–100 无极拖动、16ms 节流写入与松手吸附。

English

Pixel-art reasoning-effort slider for DSH Web with continuous 0–100 dragging, 16ms throttled writes, snap-to-level commits, and a WebGL ember fire that ignites as the slider moves.

项目信息与收录信号

快照 2026-09-11
作者 / 组织
zhuifengqug
仓库
zhuifengqug/dsh-adaptive-reasoning
GitHub Stars
2
Forks
0
开发语言
JavaScript
许可证
MIT
最近推送
2026-08-23
Manifest
数据中检测到声明

公开仓库不自动等于可商用;许可证与当前兼容性以原项目文档为准。Manifest 和数据评分不构成安装安全认证。

数据评分

55/ 100
维护活跃
88
文档与实用信息
85
生态关注度
14
安装便捷信号
75
项目声明信号
100

近 19 天仍在更新;README 含完整安装与使用说明;关注度尚低(2)。

评分来自已有数据快照的五维模型,仅作浏览参考,不是实际使用评测或安全检测结论。

安装与使用

所有项目资料与许可均以对应 GitHub 仓库为准。

dsh plugin --profile web add dsh-adaptive-reasoning

复制命令不会自动执行。请先阅读仓库文档,确认环境要求与许可证。

项目截图

仓库 README

GitHub 原文

已保存的仓库文档快照;文档抓取时间未记录,可能与上方目录介绍处于不同版本。安装前请核对当前仓库说明。

dsh-adaptive-reasoning

English · 中文

A capability-aware reasoning-effort slider for the DeepSeek Harness Web GUI.

The plugin keeps DSH's official model selector and /model command intact. Clicking the selector's existing Reasoning effort / 推理等级 row opens an accessible slider panel. The panel reads the selected model's exact reasoning metadata from the Host and writes selections back through the normal session.selectModel RPC.

Install (two ways)

From npm:

dsh plugin --profile web add dsh-adaptive-reasoning

From GitHub (pin to a released tag for reproducibility):

dsh plugin --profile web add github:zhuifengqug/dsh-adaptive-reasoning#v2.0.0

Restart dsh web afterwards. Details, removal, and the optional models.dev enrichment are covered below.

What It Does

  • Uses only the current model's advertised reasoning.efforts; it does not invent a global effort list.
  • Supports sparse and provider-specific levels such as off, high, max, or an adapter-defined identifier.
  • Stepless drag: continuous 0–100 dragging writes reasoningEffort live with a 16ms throttle, so requests never pile up during a drag.
  • Snap on release: releasing, blurring, or ending keyboard navigation snaps to the nearest declared level and issues one confirming write.
  • WebGL fire: a three-pass WebGL2 simulation (ignition → blur → composite) whose leading edge follows the slider; the track sits as cool ash until a level is dragged over and "ignites".
  • Per-level ember palette: each effort level burns its own colour from ash grey up to burning red.
  • Pixel-art UI: 4px-pixelated fire, jagged hard borders, segmented energy cells, and Press Start 2P / Zpix pixel fonts (with system-font fallback).
  • Falls back to static energy cells when WebGL2 is unavailable or reduced motion is preferred.
  • Uses DSH semantic design tokens and respects prefers-reduced-motion.
  • Leaves official model selection, load failures, accessibility behavior, and the /model command unchanged.

One-Click Auto-Declare

When you open the effort panel on a model that declares no reasoningEfforts, the panel shows a hint and an 自动补全 (Auto-declare) button. Clicking it asks the Host to fill in a conservative declaration for every model of the current provider that lacks one, then reloads the panel so the slider appears.

Source priority follows mode C: a confident models.dev match wins when the catalog is reachable; otherwise a per-family heuristic decides (deepseek/qwen/glm/claude/grok → off/low/high/max; gpt/gemini/minimax/step/kimi/moonshot/mimo/mistral/… → off/low/medium/high; image models are skipped). Models that already declare efforts are never touched.

The button is an explicit per-click user action, so it is not gated behind a config flag; what it writes is the same reasoningEfforts field in llm-pi-ai settings (persisted to settings.yaml) that you would type by hand. It is dispatched as the host command /adaptive-reasoning-declare <provider>, which you can also run directly to backfill a whole provider.

Optional models.dev Enrichment

Some manually configured llm-pi-ai models do not declare reasoningEfforts, so DSH correctly exposes no effort UI. This plugin can optionally enrich those missing declarations from models.dev at startup.

This behavior is disabled by default because a catalog record cannot prove that a private gateway accepts the same reasoning protocol.

When enabled, the Host half:

  • fetches https://models.dev/api.json and caches it in the system temporary directory;
  • only updates models with no existing reasoningEfforts field;
  • accepts only exact or uniquely normalized model-id matches;
  • never supplies a family-heuristic fallback for unknown or ambiguous models (that fallback exists only behind the explicit Auto-declare button above);
  • writes inferred entries to the llm-pi-ai settings section, where DSH validates them before use.

Enable it in the profile's cordis.patch.yml by overriding this entry:

- replace:
    - id: adaptive-reasoning
      name: dsh-adaptive-reasoning
      config:
        enrichFromModelsDev: true
        cacheHours: 24

cacheHours must be a positive number. An unavailable catalog only disables enrichment for that run; it does not prevent DSH from starting.

Install

The package is plain JavaScript with no prepare script, so a git install needs no pnpm build permission. Install it straight from GitHub:

dsh plugin --profile web add github:zhuifengqug/dsh-adaptive-reasoning

# Pin to a released version for reproducibility (recommended):
dsh plugin --profile web add github:zhuifengqug/dsh-adaptive-reasoning#v2.0.0

# Verify that the bundle patch participates in the Web profile.
dsh --profile web --dump-config

You can also install from a local checkout instead — run dsh plugin --profile web add ./dsh-adaptive-reasoning from the directory that contains it.

Restart the existing dsh web process after installation. A client-plugin update hot-reloads only while the DSH checkout's pnpm run dev:web watcher is already rebuilding its bundles; this standalone bundle otherwise loads at the next Web process start.

To remove it:

dsh plugin --profile web remove dsh-adaptive-reasoning

Design Notes

The Host is authoritative. The UI does not interpret an effort's wire spelling, map off to another value, or silently clamp an unsupported selection. The only values shown are those published by session.models for the exact selected route, and the Host decides whether a submitted value becomes the session's next request configuration.

The browser integration deliberately uses the official selector's effort row as its entry point rather than taking the single conversation.input.model seat. This avoids replacing DSH's official selector and preserves its model catalog, retry, locale, and error surfaces.

Troubleshooting

Custom relays reject requests with role: developer

pi-ai sends the system prompt with the OpenAI developer role whenever a model has reasoning enabled and the endpoint is judged to support that role. For unknown/custom relay URLs that auto-detection defaults to supported, and many OpenAI-compatible relays only accept system — the request then fails with something like developer is not one of ['system', 'assistant', 'user', 'tool', 'function'].

The llm-pi-ai configuration seam does not expose pi-ai's supportsDeveloperRole switch (as of 0.1.0-rc.7), so it must be patched into the installed bundle. If your deployment hits this, apply the same surgical patch to <dsh-install>/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js (back up the file first, and re-apply after any dsh upgrade), then set per route:

compat:
  supportsDeveloperRole: false

A relay that does accept the developer role can leave the flag at its default or set it to true.

Files

dsh-adaptive-reasoning/
├── index.js            # Host half and optional models.dev enrichment
├── lib/client.js       # Browser half and slider panel
├── cordis.patch.yml    # Web profile bundle patch
├── package.json
└── README.md

License

MIT

使用前核对

安装步骤、兼容版本与授权范围以原项目当前文档为准。Stars 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目