Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
界面增强 #deepseek-harness#deepseek-harness-plugin

dsh-ui-peak-rate

haoliangwu @haoliangwu ⬇ 2 ★ 0 main

安装

dsh plugin --profile web add github:haoliangwu/dsh-ui-peak-rate
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

该插件未提供要点说明,请参考仓库 README。

deepseek-harnessdeepseek-harness-plugin
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/haoliangwu/dsh-ui-peak-rate
许可证MIT
主要语言main
下载量2
GitHub 星标0
最近推送2026-08-17
收录日期2026-09-19
分类界面增强

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

dsh-ui-peak-rate

DSH web composer 🔥 2× peak-rate badge — shows when the session's model selection matches a DeepSeek peak-rate route during DeepSeek peak hours.

[图片: Peak-rate badge in the composer trailing row]

A web client plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). It paints a `🔥 2×` pill in the composer's trailing input row, just left of the model trigger, when **both** of these hold:

1. The session's current model selection matches the DeepSeek peak-rate policy (see [Match rule](#match-rule)).
2. The current UTC time is inside a DeepSeek peak window (by default `01:00–04:00 UTC` or `06:00–10:00 UTC`, configurable).

Otherwise the badge is hidden entirely — no layout cost.

## Install

```sh
dsh plugin --profile web add github:haoliangwu/dsh-ui-peak-rate
```

Built `lib/` is committed, so the git install is one line — no `prepare` script, no `allowBuilds` permission. Restart `dsh --profile web` after install (bundle layer stacks compose at boot).

## Configure

All three fields default to the DeepSeek peak-rate policy; override any of them in your profile's `cordis.patch.yml` (`~/.dsh/profiles/web/cordis.patch.yml`):

```yaml
- id: dsh-ui-peak-rate
  config:
    # Provider ids whose sessions may show the badge (default: ['deepseek-official'])
    providers:
      - deepseek-official
    # Peak windows [startHour, endHour) UTC, left-closed right-open (default: [[1,4],[6,10]])
    peakWindows:
      - [1, 4]
      - [6, 10]
    # Peak multiplier vs off-peak rate (default: 2)
    multiplier: 2
```

An empty `peakWindows: []` disables the badge entirely (always off-peak). Invalid windows (`start >= end`, `start < 0`, or `end > 24`) fail loud at load.

Disable the badge entirely:

```yaml
- id: dsh-ui-peak-rate
  disabled: true
```

The host half reads `Config` (schemastery) and exposes it to the browser half through a Connection RPC channel (`/peak-rate` endpoint `config`). No transport carries host plugin Config into the browser context automatically; the RPC channel is the explicit transport.

## Match rule

The badge shows when the session's current model selection satisfies **both** of:

- `state.current.provider ∈ Config.providers` (provider match, default `['deepseek-official']`), AND
- `state.current.model` contains `deepseek` (case-insensitive).

The model-id check narrows the provider list so a non-DeepSeek model routed through a listed provider does not trigger the badge. To match a provider whose model ids do not contain `deepseek`, neither condition holds and the badge stays hidden — extend `Config.providers` only when the route actually serves DeepSeek peak-priced models.

## How it works

- **Peak state is a pure client-side clock fact.** `isPeak(date, windows)` returns true iff the UTC hour is inside one of the configured windows (left-closed, right-open). The component re-evaluates every 60 s through a `setInterval` cleared on unmount, and re-evaluates immediately when the config arrives.
- **The peak-rate policy is fetched once from the host through a Connection RPC channel.** The host half registers `ctx.connection.rpc.handle('/peak-rate', ...)`, reads `Config` (schemastery: `providers`, `peakWindows`, `multiplier`) from the profile's `cordis.patch.yml`, and returns it on the `config` endpoint. The browser half calls `ctx.connection.rpc.call('/peak-rate', 'config', {})` once and exposes the result as a reactive source (`useSyncExternalStore`); the badge stays hidden until the fetch settles.
- **The badge and tooltip render from locale dictionaries with config values interpolated.** The badge text is `🔥 {multiplier}×`; the tooltip lists the formatted windows and multiplier (`{windows}` / `{multiplier}` placeholders, e.g. `01:00–04:00, 06:00–10:00`).
- **The component reads the session's current selection through `ctx.modelDirectories.directoryFor(sessionId).store`** (the same instance `ModelSelect` reads), subscribes via `useSyncExternalStore`, and applies the [match rule](#match-rule).
- **No model-visible output, no session events, no durable state.** The plugin reads only the clock, the existing model-directory store, and the one-shot policy fetch. The peak schedule is a published 2026 constant; a DeepSeek schedule change requires a plugin update to the default `peakWindows`.

## Build from source

```sh
pnpm install
pnpm build         # emits lib/index.js, lib/invariant.js, lib/client.js + sourcemaps
```

`lib/` is committed to the repo so git installs work without a build step. After changing source, run `pnpm build` and commit the updated `lib/`.

## License

MIT

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。