rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:NightPainters/dsh-auto-load-earlier
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
Scroll-driven history autoload for the DSH (DeepSeek Harness) web client — no more stopping to click "Load earlier" at the top of a transcript.
The chat view keeps only a tail window of the transcript resident. Scroll to the top and it stops: you have to aim at a button, click it, and wait for a page to arrive. This plugin removes that step — when it detects that you are scrolling up, it clicks the button for you. It goes through the same official path as a real click (cancel in-flight work → preserve the scroll anchor → pause tail-following), touches no data layer, and patches no official package.
| Mode | Condition | Purpose |
|---|---|---|
| Proximity | within 140px of the top, and ≥48px of accumulated upward scroll | reading back one page at a time |
| Velocity (prefetch) | upward speed ≥ 900 px/s, or one viewport within 160ms — while within 3 screens of the top | jumping back to much earlier history |
Velocity mode starts 3 screens early, so by the time you reach the top the next page is already loading. Consecutive prefetches are capped (8 pages per fling, counter reset after 2s idle) so that a single fling cannot mount thousands of rows at once.
Slow scrolling never misfires: 0 triggers measured at 4–16 wheel notches/s in Firefox line mode and 3–6 notches/s in pixel mode.
Install it as a local plugin on the profile.
dsh-home/plugins-local/ as dsh-auto-load-earlier.dsh-home/profiles/web/cordis.patch.yml:- insert:
- id: auto-load-earlier
name: ../../plugins-local/dsh-auto-load-earlier/lib/index.js
To disable: delete that block, or add disabled: true to it. Takes about a minute; no restart needed.
Do not use
dsh plugin addfor this. It re-linksnode_modules, which on Windows can crash a running process (native modules are already loaded and cannot be replaced). A path insert is safer.
Tune at runtime from the console; changes apply on the next page load, no plugin reload needed:
__DSH_AUTOLOAD_TUNING__ = {
thresholdPx: 140, // proximity zone, px from the top
minUpScrollPx: 48, // accumulated upward scroll required in proximity mode
cooldownMs: 900, // min gap between proximity triggers
fastWheelPxPerSec: 900, // velocity threshold
fastBurstScreens: 1, // or: viewports scrolled within one sample window
fastZoneScreens: 3, // prefetch starts this many screens above the viewport
fastSampleMs: 160, // velocity sampling window
fastGapMs: 150, // re-entry gap for velocity triggers
fastMaxRun: 8, // max pages per fling
fastRunResetMs: 2000, // idle time that resets the fling counter
};
__DSH_AUTOLOAD_TUNING__ = null; // restore defaults
Too eager? Raise fastWheelPxPerSec to 1500, or lower fastZoneScreens to 2.
[data-chat-flow] attribute (not CSS-module hashed class names, which change per build).button rendered inside the transcript column; the plugin matches that position plus the label 加载更早 / Load earlier.button.click() — the exact same code path as a human click.The plugin holds no data and exposes no API. When the button is gone or disabled, every trigger is a no-op.
[data-chat-flow] DOM structure and the button label. Either changing upstream breaks it.#359 (page freezes after long tasks), #7579 (chat collapse hides but does not unmount; a render-windowing patch exists), #3726 (multi-MB pages time out history fetches), #6200 (process collapse silently disabled while paging is incomplete).MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。