中文EN

dsh-unitverse

tools已测通过npmMIT

单位换算:提供 convert 工具,覆盖长度/面积/体积/时间/角度/速度/温度/压力/热量/功率十大类共 82 个单位,支持中英文单位名与温差(Δ)换算,并在 DSH Web 会话视图中提供按类别分模块、跟随中英文界面语言的「单位换算」标签页。

下载量 / Downloads
1,499
依赖体积 / node_modules
27.77 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

安装

dsh plugin --profile web add dsh-unitverse

沙箱测试结果

阶段结果
1 安装✓
2 列装✓
3 挂载✓
4 启动—

四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。

README

dsh-unitverse · Unit Converter

English | [中文](README.md) · [Changelog](CHANGELOG.en.md)

The name reads unit + universe: ten categories of units in one universe.
The GUI view tab is still called 单位换算 / Unit Converter, and the
model-facing tool is still convert.

A DeepSeek Harness (DSH) unit conversion plugin exposing one convert tool

across **length, area, volume, time, angle, speed, temperature, pressure,

energy/heat and power**, with case-insensitive English and Chinese unit names,

plus both absolute-temperature and temperature-difference (Δ) modes.

Preview

English UI — one independent module per category, listing only that category's units:

The Chinese UI screenshot lives in [README.md](README.md) — each README carries
only its own language, so you never see a screenshot for the other locale.

Features

  • ✅ 10 categories, 80+ common units (metric, imperial/US customary, common Chinese units)
  • ✅ Lenient unit spelling: km / KM / kilometer / 千米 / 公里 all resolve
  • ✅ Absolute temperature (°C / °F / K / °R) and temperature difference (Δ°C ↔ Δ°F)
  • ✅ Pure TypeScript, zero runtime dependencies, side-effect free and unit-testable
  • ✅ Results rounded to ~10 significant digits by default
  • ✅ Clear errors for unknown units or cross-category requests
  • ✅ Web UI view: a "Unit Converter" tab next to Conversation / Trajectory

in the session view bar; the panel is split into ten independent category

modules (units are never mixed), and all copy — unit names included —

follows the DSH zh/en UI language (since v0.1.0, requires the DSH Web GUI,

0.1.0-rc.6 and up, verified through 0.2.1-rc.2 — the whole 0.1.1-rc.x and

0.2.x lines are covered)

Supported categories and units

Category · Base · Units (symbols)

length · m · nm, μm, mm, cm, m, km, in, ft, yd, mi, nmi, 里 (li), 尺 (chi)

area · m² · mm², cm², m², km², ha, 亩 (mu), in², ft², yd², acre, mi²

volume · m³ · mL, L, m³, cm³, in³, ft³, yd³, gal (US), gal (UK), qt (US), bbl

time · s · ms, s, min, h, d, wk, mo, yr

angle · rad · rad, ° (deg), grad, ′ (arcmin), ″ (arcsec), turn

speed · m/s · m/s, km/h, mph, kn (knot), ft/s

temperature · K · °C, °F, K, °R (Δ prefix available for differences)

pressure · Pa · Pa, kPa, MPa, hPa, bar, atm, psi, Torr, mmHg, inHg

energy · J · J, kJ, MJ, cal, kcal, Wh, kWh, BTU

power · W · W, kW, MW, GW, hp, PS

Every unit also accepts its **English full name (including plurals) and its

Chinese name** as aliases — e.g. ft, foot, feet and 英尺 are the same unit.

Installation

dsh-unitverse is published on npm, and can also be installed straight from

GitHub or by downloading it to a local directory first. **Pick any one of the

three routes below** — replace <profile-name> with your profile (e.g. web).

What dsh plugin is: a thin forwarder for pnpm —
dsh plugin --profile <profile-name> <args…> is equivalent to running
pnpm <args…> inside that profile's directory, after which DSH re-aligns
dsh.profile.bundles with what was actually loaded. So the add / up
(update) / remove / list used below are all pnpm commands.

Route 1: install straight from GitHub

dsh plugin --profile <profile-name> add github:runcat-tommy/dsh-unitverse
  • Who it suits: following the repository source without cloning it first.
  • Watch out: needs git locally; the build artifacts in lib/ are committed,

so this route needs no --allow-build approval.

  • Updating: rerun the same command.

Route 2: download from GitHub, then install locally

git clone https://github.com/runcat-tommy/dsh-unitverse
dsh plugin --profile <profile-name> add ./dsh-unitverse
  • Who it suits: testing local edits immediately, or offline / air-gapped machines.
  • Watch out: offline you can also unzip the Download ZIP, or run npm pack and

add ./dsh-unitverse-<version>.tgz. Installed as a link, the profile follows

your checkout.

  • Updating: git pull → npm run build → restart DSH.

Route 3: install from npm (recommended)

dsh plugin --profile <profile-name> add dsh-unitverse
  • Who it suits: almost everyone — the least fuss, clear version semantics, any profile.
  • Watch out: the npm package already contains the built artifacts and declares

no prepare / postinstall lifecycle scripts, so it triggers no build approval.

  • Updating: dsh plugin --profile <profile-name> up dsh-unitverse.

The three routes side by side

Route · Command · Needs · Updating · Build approval

1 GitHub direct · … add github:runcat-tommy/dsh-unitverse · git locally · rerun the same command · none (artifacts committed)

2 Download locally · … add ./dsh-unitverse (or .tgz) · nothing · git pull + npm run build + restart · none

3 npm (recommended) · … add dsh-unitverse · nothing · … up dsh-unitverse · none

In one line: use route 3 (npm) for the least fuss, route 1 to follow the source,

route 2 to hack on the code or work offline — **all three need a dsh web restart

before they take effect**.

After installing

  • No manual config edits: package.json declares dsh.bundle, so dsh plugin add

registers the plugin in the profile's bundle list and activates the plugin row

defined in cordis.patch.yml.

  • Restart DSH for it to take effect: once the GUI process (dsh web etc.)

restarts, the model can call the convert tool.

  • Web UI: the package also ships a browser half — the dsh.client declaration

plus lib/client.js behind the exports["./client"] entry. In a profile that runs

the Web GUI, a "Unit Converter" tab appears in the session view tab bar (see

Web converter view below); in CLI-only profiles the client part is simply never

loaded and the tool keeps working.

  • **Insp

…(truncated)

以上内容来自 npm 上的 README,我们只做格式化,不改内容。

版本

npm 上共发布:6,最后更新 2026-10-19

链接

GitHub · Homepage · npm

同类插件