前言¶
DeepSeek Harness (DSH) 在連接重建(Host generation reset)時,投影值(如會話標題)會短暫丟失,變成「未命名」。本插件是 DSH 插件,不修改 DSH 安裝目錄,通過替換 ProjectionValueStore.prototype.clear 實現標題保留,並修復列表重建頻率與轉圈動畫問題。
核心功能¶
本插件包含三個獨立的修復項:
-
會話標題持久化
會話標題在一次連接重建中不再掉成「未命名」。 -
會話列表重建優化
會話列表重建合幀到rAF,實測約 6.3× 降幅。 -
轉圈動畫修復
運行中的轉圈動畫恢復旋轉(修復 WebView2reduced-motion問題)。
安裝與啓用¶
從 GitHub 安裝插件:
dsh plugin --profile <你的 profile> add github:iuuuuuuuu/dsh-projection-persist
安裝後,需在 profile 的 package.json 中將插件名添加到 dsh.profile.bundles:
{
"dsh": {
"profile": {
"bundles": [
"dsh-projection-persist"
]
}
}
}
修改 dsh.profile.bundles 會觸發熱重載,通常不需要重啓。
驗證與調試¶
安裝生效後,可通過診斷端點驗證:
curl http://127.0.0.1:3080/dsh-projection-persist
若需單獨關閉轉圈修復,可在瀏覽器控制台執行:
localStorage["dsh-projection-persist.spinner"] = "off"
注意事項¶
- 僅依賴
sessions服務,不聲明任何peerDependencies。 - 已驗證兼容版本:
@deepseek-ai/dsh-api-session-controller 0.2.0-rc.2。 - 隻影響管理器持有的投影 store,會話自身持有的 store 不在此列。
- 重連邏輯(心跳/連接重建)不在本插件範圍內。
結語¶
本插件通過替換 clear 方法實現標題保留,並優化了列表渲染與動畫表現。詳情見 GitHub 倉庫:dsh-projection-persist。許可證爲 MIT。