rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:asots/dsh-longsession
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A browser-side plugin for DeepSeek Harness Desktop / Web that keeps long chat sessions from getting slower as the transcript grows.
Repository: https://github.com/asots/dsh-longsession
Current release: 0.0.1 (first version).
The host half is an inert Loader row; all behaviour lives in lib/client.js. It puts a
“Collapse history” toggle in the session header row and bounds the history already rendered by
the page.
DSH never unloads history the page has already rendered: live appends plus every “load earlier” keep accumulating DOM rows. In a 4.4 MB / 11-turn session on a clean test host:
SessionFace.resync() through the sessions
client service. This unloads the history rows the page has already rendered and reopens the
ordinary opening page (last two turns). Chat records, model context and the disk log are
not deleted.sessionStorage; restoring asks the controller for the missing pages again through
loadOlder(). The button reads “Restoring…” while that runs.conversation.session.header.actions row (next to agent team / mode). It appears once trimMinRows rows are loaded, but stays disabled until older history is
loaded (the opening page has only two turns). A status dot sits before the label: amber = older history is loaded and can be collapsed;
green = already collapsed; gray = not actionable yet (no older history, a turn is running, or
restoring). The dot uses high-contrast light/dark colors and follows the app theme. It is a
host-owned slot, not an overlay.autoTrimRows rows, it collapses once (15 s cooldown) and
marks the page collapsed, so it can still be restored.maxMessages / turnWindow.minTurns in the history
request before it is sent (WebSocket session/follow open frame and unary /api page RPC).
Default only caps maxMessages at 200; minTurns is opt-in.It never moves, removes, or re-creates transcript nodes; the header toggle is the only DOM it adds.

Illustration with demo data — not a real session.

Settings → Long session.
dsh plugin --profile <profile> add github:asots/dsh-longsession
Use the profile the host actually runs (for example web, or the profile a desktop build
uses). Reload the page after installing: the client bundle is loaded per page.
Manual install into a profile:
dsh plugin --profile <profile> add link:/absolute/path/to/dsh-longsession, or add
"dsh-longsession": "link:..." to the profile package.json and run pnpm install there.
A bare copy under node_modules/ is not enough: the desktop plugin manager quarantines
packages that are not listed as dependencies on its next install.cordis.patch.yml to that profile's cordis.patch.yml;Loader-row config does not reach the browser half in this build, so override through
localStorage["dsh-longsession.config"] (JSON) or
window.__DSH_LONGSESSION__.setConfig({...}), or use Settings → Long session.
| key | default | meaning |
|---|---|---|
enabled |
true |
master switch (disabling stops auto-collapse and wire caps) |
trimMinRows |
120 |
row count at which the header toggle appears |
autoTrimRows |
600 |
auto-collapse threshold (0 disables it) |
historyMaxMessages |
200 |
cap for history maxMessages (0 = off) |
historyMinTurns |
0 |
cap for turnWindow.minTurns (0 = off; 1 halves the opening page) |
historyCapsAllSessions |
false |
apply request caps to subagents/other sessions too |
showDock |
true |
show the header toggle |
node test/serve.mjs 17772
Open http://127.0.0.1:17772/harness.html; the page runs 43 assertions (wire clamp,
collapse/resync, restore via loadOlder(), auto-collapse, header and settings slot
registration, subscriber updates, dispose) and prints ALL PASS.
window.__TEST_RESULTS__ is machine-readable.
loadOlder(), one page at a time. The saved scroll offset is applied afterwards on a
best-effort basis; exact pixel restoration is not guaranteed.sessions service is absent, the header toggle stays inert and auto-collapse is
disabled. If the slots service is absent, no toggle renders (the request caps still work).content-visibility containment was measured neutral for this renderer and is intentionally
not used.MIT — see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。