dsh-fastswitch
Manifest valid★ 1Faster session switching for DeepSeek Harness: smaller first-paint window plus request de-duplication on the client.
dsh-fastswitch
Makes switching Sessions in DeepSeek Harness fast. Two things, each independently switchable.
中文:README.zh.md
What it fixes
When you switch a Session, DSH asks the Host for the opening history page. That page has a hard-coded window — at least 50 messages — which on a long conversation arrives as a 2 MB frame. That frame is the wait you feel.
Separately, while the page shells itself, several components each fetch the same read-only catalogs on mount: session/modelCatalog 6 times, credentials/describe 7 times, agentPresets/list 6 times, cotTranslation/limits 3 times. No deduplication, no cache.
dsh-fastswitch makes one change for each, in the browser:
- Configurable opening window — rewrites
turnWindow.minMessages(50 → 20 by default) on the outgoingsession/followrequest. The Host validates0 < minMessages <= maxMessages, so this is a supported request, not a patch. "Load earlier" pages (200 messages) are left untouched. - Read-only RPC dedupe + cache — wraps
window.fetch, caching read-only catalog calls for 5 minutes and collapsing concurrent ones into a single flight.
Measured
Same machine, same page, same conversation:
| default | with dsh-fastswitch | |
|---|---|---|
| Opening snapshot (one long Session) | 2,040,432 B | 1,054,070 B |
session/modelCatalog | 6 calls | 1 call |
credentials/describe | 7 calls | 1 call |
agentPresets/list | 6 calls | 1 call |
| Total requests on first paint | 52 | 33 |
These come from a single measurement; they depend on conversation length and browser cache state, and are not constants.
Install
Search fastswitch in the plugin market, or:
dsh plugin --profile web add github:guofug/dsh-fastswitch
Restart once (or let HMR reload) afterwards.
Configuration
All through localStorage — no config files:
| Key | Default | Meaning |
|---|---|---|
dsh-fastswitch | — | set to off to disable everything |
dsh-fastswitch-window | 20 | opening window size; 0 leaves it alone |
dsh-fastswitch-ttl | 300000 | cache TTL in ms; 0 disables caching |
dsh-fastswitch-merge | 800 | concurrent-flight window in ms |
localStorage.setItem('dsh-fastswitch-window', '10') // more aggressive
localStorage.setItem('dsh-fastswitch', 'off') // turn it all off
Checking that it works
window.__dshFastswitch
// { installed: true,
// ws: { rewritten: 3, untouched: 40 },
// fetch: { calls: 51, hits: 10, dedup: 8, bypass: 33 } }
ws.rewrittenshould increment once per Session switch;fetch.hits + fetch.dedupis the number of requests saved.
Scope
- Browser only. Terminals, the SDK, ACP and other clients are unaffected.
- Modifies no DeepSeek Harness file and no Host behaviour. The window is a rewritten outgoing request; the cache is a browser-side
fetchwrapper. Uninstall and everything is back to stock. - No Session parking cache. Keeping opened Sessions in memory for instant switch-back would mean operating on Session lifecycle internals, which breaks across versions. Deliberately out of scope.
- Caching covers read-only catalogs only. No writes, no streaming responses, no auth endpoints.
Compatibility
- Targets
dsh ^0.2.1-rc.2(seeengines.dsh). - Both wrappers are idempotent, so HMR reloads do not stack wrappers.
- If either wrapper cannot be installed it is skipped; the page degrades to stock behaviour instead of breaking.
License
MIT
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 20.4k
CC0-1.0
Python
Oct 23, 2026
by 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.3k
CC0-1.0
Python
Oct 16, 2026
by pax-beehive
Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub
★ 277
MIT
TypeScript
Oct 20, 2026
by xiajiajun516
DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.
★ 230
MIT
TypeScript
Oct 23, 2026
dsh plugin --profile web add dsh-config-managerby yjh051108
推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。
★ 166
TypeScript
Oct 16, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby jigjoy-ai
A CLI that turns a goal into a pull request - and a sandbox for testing concurrent AI coding agents on the Mozaik runtime.
★ 125
MIT
TypeScript
Oct 22, 2026