Skip to content
dsh.fish
Bundle

dsh-genshin-redirect

DeepSeek Harness web plugin: when a task (conversation turn) completes, open the Genshin Impact official site matching the computer's Windows display language. · DSH Web 插件:任务完成后按电脑显示语言跳转对应语言的《原神》官方站点。

Source
tianhanly
License
MIT
Updated
Updated 16 hours ago

Readme

# dsh-genshin-redirect

**DeepSeek Harness web plugin** — when a task (conversation turn) completes, open the *Genshin Impact* official site that matches the computer's **Windows display language**.

[**简体中文**](README.zh-CN.md) · [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

## Preview

![Preview](preview.jpg)

## What it does

- Fires at the end of every completed task (conversation turn).
- Detects the computer language in this order (display language first):
  1. Windows display language — first entry of the user language list (`HKCU\Control Panel\International\User Profile\Languages`), falling back to the display-language override and then `Get-UICulture`;
  2. regional format (`Get-Culture`);
  3. the harness locale preference (Settings → Language);
  4. a configurable default (`en`).
- Opens the matching official site in your default browser (a new tab; the DSH page is left untouched):

| Language (display language tag) | Site |
|---|---|
| `zh-Hans-*`, `zh-CN`, `zh-SG` | `https://www.yuanshen.com/#/` |
| `zh-Hant-*`, `zh-TW`, `zh-HK`, `zh-MO` | `https://genshin.hoyoverse.com/zh-tw` |
| `en-*` | `https://genshin.hoyoverse.com/en` |
| `ja` | `https://genshin.hoyoverse.com/ja` |
| `ko` | `https://genshin.hoyoverse.com/ko` |
| `fr` / `de` / `es` / `pt` | `https://genshin.hoyoverse.com/fr` · `/de` · `/es` · `/pt` |
| `ru` / `th` / `vi` / `id` | `https://genshin.hoyoverse.com/ru` · `/th` · `/vi` · `/id` |
| `it` / `tr` | `https://genshin.hoyoverse.com/it` · `/tr` |
| any other language | `https://genshin.hoyoverse.com/en` (fallback) |

- A 15-second cooldown merges bursts of completions (e.g. sub-tasks finishing) into one open.

## Requirements

- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) **web** profile (`dsh web`)
- Node.js `^22.19.0 || >=24.0.0`

## Install

```sh
# 1. Add the plugin to your web profile:
dsh plugin --profile web add "github:<your-username>/dsh-genshin-redirect"

# 2. Add "dsh-genshin-redirect" to `dsh.profile.bundles` in the profile
#    package.json (next to the other bundle entries).

# 3. Restart the web server:
dsh web
```

Manual alternative: add `"dsh-genshin-redirect": "github:<your-username>/dsh-genshin-redirect"`
to the profile `package.json` dependencies, add `"dsh-genshin-redirect"` to
`dsh.profile.bundles`, run the profile's package install, and restart.

Local folder: `dsh plugin --profile web add "file:C:\path\to\dsh-genshin-redirect"`.

## Configuration (optional)

Extend the row in `cordis.patch.yml`:

```yaml
- insert:
    - id: dsh-genshin-redirect
      name: dsh-genshin-redirect
      config:
        cooldownMs: 15000   # minimum gap between two browser opens (0 = always open)
        defaultLang: en     # fallback language when nothing is detected
```

## Notes

- The site opens in the system default browser; the harness page is not navigated away.
- Every completed turn triggers a check. In a multi-session deployment the plugin is
  process-global, so completions from any session can open a tab (cooldown applies).
- If the display language has no official Genshin site, the English global site is used.

## License

[MIT](LICENSE)

Install

dsh plugin --profile web add github:tianhanly/dsh-genshin-redirect

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source