DeepSeek Harness (DSH) adopts a plugin-based architecture. When developing agents for data processing or scientific computing, unit conversion is a frequent requirement and is prone to errors caused by spelling variations or differing definitions. The dsh-unitverse plugin provides a convert tool and a Web view, covering more than 80 units across 10 major categories. It supports Chinese and English unit names and is case-insensitive.
Core Features¶
The plugin includes the following capabilities:
- 80+ units across 10 major categories: Covers length, area, volume, time, angle, speed, temperature, pressure, energy/heat, and power.
- Tolerant unit naming: Supports symbols (such as
km), English full names (kilometer), and Chinese names (千米), with case-insensitivity. - Dual-mode temperature handling: Supports conversion between absolute temperature scales (°C / °F / K / °R) and temperature differences (Δ°C ↔ Δ°F).
- Zero runtime dependencies: Implemented in pure TypeScript, with no side effects.
- Interactive Web view: Organized by category; the interface language follows the Chinese/English settings in DSH.
- Pure front-end implementation: Conversion is completed in the browser and does not go through a server or model.
Installation and Enablement¶
Use the official installation command to add the plugin:
dsh plugin --profile <profile名> add dsh-unitverse
No manual configuration is required after installation. After installation, restart the DSH process (such as dsh web) for the tool to take effect. If using the Web GUI, ensure that the DSH version is >= 0.1.0-rc.6.
Usage¶
After installation, models can invoke the convert tool.
Tool Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
value |
number | Yes | The numeric value to convert |
from |
string | Yes | Source unit (supports symbols, English, and Chinese) |
to |
string | Yes | Target unit (supports symbols, English, and Chinese) |
Examples¶
convert(100, "km", "mi") -> 62.13711922 mi
convert(5, "feet", "cm") -> 152.4 cm
convert(36, "km/h", "m/s") -> 10
convert(1, "atm", "kPa") -> 101.325
convert(212, "°F", "°C") -> 100
convert(1, "Δ°C", "Δ°F") -> 1.8
The returned structure includes the original input, the parsed canonical name, the result, and a summary.
Web Conversion View¶
After installing and restarting DSH (with Web GUI), a “Unit Conversion” tab will appear in the session view tab bar.
- Category modules: The top contains 10 category tabs (such as Length Conversion and Temperature Conversion). Switching categories displays only units in that category to avoid confusion.
- Unit selection: The dropdown menu displays “symbol · unit name” and supports one-click swapping of source and target units.
- Temperature difference toggle: The temperature module additionally provides a Δ (difference) toggle. When enabled, conversion is performed as a temperature difference.
- Instant results: Results are displayed immediately after entering a numeric value, with one-click copy support.
- History records: Saved by category in the browser’s localStorage; click an item to refill the values.
- Language following: Interface text and unit names fully follow DSH’s Chinese/English settings.
Precision and Conventions¶
- Precision: Results retain approximately 10 significant digits by default (configurable from 1 to 15 digits).
- Calorie definition:
calis the thermochemical calorie (1 cal = 4.184 J). - BTU definition: Uses the International Table British Thermal Unit (1 BTU = 1055.05585262 J).
- Time definitions:
yris a Julian year (365.25 days), andmo=yr/ 12. - Angle: The Chinese “度” refers to the angle unit degree; “分/秒” in time contexts correspond to
min/s, andarcmin/arcsecare recommended for angular minutes and seconds.
Applicable Scenarios¶
This plugin is suitable for DSH agent development that requires unit conversion. Whether invoked through a command-line tool or interacted with through a Web interface, it can deliver accurate results.