In DSH, the description parameter for tool calls is required and is displayed verbatim on the invocation card in the UI. Because the descriptions and examples in the tool schema are all in English, the model defaults to always outputting English descriptions, so when the UI language is Chinese, users see every step in English. This plugin registers a global dynamic runtime context that instructs the model to output descriptions in the current UI language or a forced language, without modifying any preset, persona, or tool schema.

Positioning and Features

dsh-agent-lang is an Agent language control plugin maintained by KannaKuron. It is injected globally via systemPrompt.context and controls the language of three channels: the model’s tool call descriptions, thinking process, and reply output. It supports three modes: follow the UI language, force a specified language, or disable the feature.

Installation and Activation

Install it using the npm package:

dsh plugin --profile web add dsh-agent-lang

After installation, restart DSH. After the first launch or an update, it is recommended to hard-refresh the browser page (⌘/Ctrl+Shift+R) to ensure the settings card loads correctly.

Usage

After installation and restart, verify or configure it through the following steps:

  1. Check the configuration file ~/.dsh/settings.yaml and confirm whether an agent-lang section appears.
  2. Switch the language in the Web GUI and observe changes in tool call descriptions.
  3. Go to the “Settings → Plugins” page and find the “Tool Description Language” card.
    • Select “Follow UI Language”.
    • Select “Force Specified Language”, choose the target language from the dropdown menu (for example, ja), or manually enter a BCP 47 tag.
    • Select “Disable” to restore default behavior.

Scope and Limitations

This plugin supports multiple DSH modes and presets, including standard (Standard mode), ptc (PTC mode), cordis (Creative mode), user-created presets, and agents/subagents. For minimal (Minimal mode), the plugin is not supported because its prompts are closed to runtime context.

  • Dependency Requirement: Requires @deepseek-ai/dsh >= 0.1.6-alpha.2.
  • Environment Limitations: Environments without a browser page (such as pure CLI deployments) support only the “Explicit Selection” mode; when using multiple browsers or remote pages, the UI language is a global single value.
  • Mechanism Note: Injected via systemPrompt.context, it is refreshed in the same cycle as sandbox/approval policies and can effectively override the English guidance in tool schemas.

Summary

dsh-agent-lang solves the inconsistency between tool descriptions and UI language in DSH. Through lightweight runtime injection, it controls the language of tool calls without modifying deployment assets (preset/schema). If you want to use it, ensure the host environment meets the version dependency and perform a hard refresh after installation for the changes to take effect.