dsh-projection-persist: Keep DSH session projection values alive

Preface

During host generation reset in DeepSeek Harness (DSH), projection values (such as session titles) are briefly lost and revert to “Unnamed”. This is a DSH plugin that does not modify the DSH installation directory. It preserves titles by overriding ProjectionValueStore.prototype.clear, and fixes issues related to list rebuild frequency and spinner animations.

Core Features

This plugin includes three independent fixes:

  1. Session Title Persistence
    Session titles will no longer fall back to “Unnamed” during a host generation reset.

  2. Session List Rebuild Optimization
    Session list rebuilds are coalesced into rAF frames, achieving a measured ~6.3× reduction in rebuild frequency.

  3. Spinner Animation Fix
    Running spinner animations resume rotating (fixing the WebView2 reduced-motion issue).

Installation and Activation

Install the plugin from GitHub:

dsh plugin --profile <你的 profile> add github:iuuuuuuuu/dsh-projection-persist

After installation, add the plugin name to dsh.profile.bundles in the profile’s package.json:

{
  "dsh": {
    "profile": {
      "bundles": [
        "dsh-projection-persist"
      ]
    }
  }
}

Modifying dsh.profile.bundles triggers a hot reload, so a restart is usually not required.

Verification and Debugging

Once installed and active, verify it via the diagnostic endpoint:

curl http://127.0.0.1:3080/dsh-projection-persist

To disable the spinner fix independently, execute the following in the browser console:

localStorage["dsh-projection-persist.spinner"] = "off"

Notes

  • Depends solely on the sessions service and declares no peerDependencies.
  • Verified compatible version: @deepseek-ai/dsh-api-session-controller 0.2.0-rc.2.
  • Only affects the projection store held by the manager; stores held by the sessions themselves are not affected.
  • Reconnection logic (heartbeats/host generation reset) is out of scope for this plugin.

Summary

This plugin preserves titles by overriding the clear method, and optimizes list rendering and animation performance. For details, see the GitHub repository: dsh-projection-persist. Licensed under MIT.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye