Preface¶
The DSH plugin mechanism allows supplementing host-side commands at the session layer. For operations like “open a commonly used webpage,” handing it over to the model every time to return an action would make the chain too long, and model involvement is unnecessary.
dsh-command-douyin addresses this specific action: typing /douyin in a DSH Web session directly opens the web version of Douyin in the default browser.
What This Is¶
dsh-command-douyin is a DSH plugin, maintained by chu557, licensed under MIT.
It is positioned as a host-side command plugin: it registers the global /douyin command, which opens the following in the default browser:
https://www.douyin.com/?recommend=1
In package.json, the package name is dsh-command-douyin, version 0.1.0, and private is set to true.
Core Features¶
Command Registration¶
- Registers the command via
ctx.commands(from@deepseek-ai/dsh-commands). - The Web client’s
/menu can automatically discover this command. - Typing
/douyinand pressing Enter in any session input box, or selecting it from the/menu, executes the command directly without a model round.
Opening the Browser¶
The plugin uses runNativeCommand from @deepseek-ai/dsh-native-command to open the target address. The invocation methods vary by platform:
- Windows:
rundll32 url.dll,FileProtocolHandler <url> - macOS:
open <url> - Linux:
xdg-open <url>
The default address to open is:
https://www.douyin.com/?recommend=1
Parameter Rules¶
/douyin does not accept parameters. If parameters are provided, it returns:
Usage: /douyin (no arguments)
Installation and Enablement¶
Below are the steps for enabling the plugin in the web profile. The patch layer is composed at startup, and running instances do not hot-mount new bundles or patch lines, so you need to restart dsh web after installation or patch changes.
Real Directory Copy Method¶
- Copy the plugin package as a real directory into the shared
node_modules. Here is a PowerShell example:
Copy-Item -Recurse -Force "<this directory>" "$env:DSH_HOME\profiles\node_modules\dsh-command-douyin"
This places the package in a location discoverable as a dependency by the DSH Web profile. Note that this emphasizes using a real directory rather than a junction or symbolic link.
- Add a patch line to
$env:DSH_HOME\profiles\web\cordis.patch.yml:
- insert:
- id: command-douyin
name: 'dsh-command-douyin'
- Restart
dsh web:
dsh web
- Verify that the command appears in the configuration tree:
dsh --profile web --dump-config
The output tree should contain a line with id: command-douyin.
Alternative: Official Bundle Installation¶
If pnpm is available in your environment, you can use the official bundle installation command:
dsh plugin --profile web add link:<absolute path to this directory>
This command registers the dependency in the profile’s package.json and appends dsh-command-douyin to dsh.profile.bundles. After completion, you also need to restart dsh web.
Dependency Requirements¶
package.json declares the following peerDependencies:
{
"@deepseek-ai/cordis": "^4.0.1",
"@deepseek-ai/dsh-commands": "^0.1.0-rc.6",
"@deepseek-ai/dsh-native-command": "^0.1.0-rc.6"
}
The host environment must meet these version requirements; otherwise, dependency resolution or command registration may fail.
Typical Usage¶
- After starting a DSH Web session, type the following in the input box:
/douyin
Then press Enter.
-
Alternatively, select the corresponding command from the
/menu. -
After execution, the default browser will open the web version of Douyin.
Suitable Scenarios and Notes¶
It is suitable for developers or everyday users who frequently open the Douyin web version in DSH Web sessions and want to bypass model rounds.
Points to note before installation:
- The plugin runs with the current
dshprocess’s permissions; it is recommended to review the source code and behavior before deciding to install. - The license is
MIT. - Node ESM resolves dependencies by real path; junctions or symbolic links may cause
@deepseek-ai/dsh-native-commandto fail resolution. link:dependencies are installed as links by pnpm and may encounter the same ESM real-path resolution issue; if loading fails, switch to the real directory copy method.- The patch layer is composed at startup; running instances do not hot-mount new bundles or patch lines, so a restart of
dsh webis required.
Related Links¶
Community directory page:
https://www.skillhub.cn/plugins/chu557/douyin-plugin-dsh-plugin
GitHub address:
https://github.com/chu557/douyin-plugin-dsh-plugin