dsh-history-autoload: Automatically Sync Full History Upon Session Entry

Introduction

When opening an existing session in DeepSeek Harness (DSH), the official default loads only the last page of history (approximately 50 items). To view earlier rounds, one must repeatedly scroll up in the chat area and wait for pagination to continue loading. For developers who need to compare long contexts, backtrack multiple rounds of tool calls, or troubleshoot the round process, this step wastes time and makes it easy to miss intermediate pages.

The community plugin dsh-history-autoload (maintainer imcaibaicai, categorized under “Memory”) performs pure browser-side behavior: after entering a session, it automatically pulls back page by page until the session reports that there is no more history. Installation and uninstallation do not modify any official files; turning off the switch restores consistency with the official behavior.

What is This

dsh-history-autoload is a browser-side plugin under the DSH Web Profile (version 0.1.0, MIT). In short: automatically load all earlier history when opening a session.

It hooks into the official session-level slot, relies solely on the official session service API (loadOlder / hasMore / openState), and does not interfere with DOM selectors. After uninstalling, a hard refresh of the page restores the default behavior.

Core Features

Automatic Pagination to Load History

After entering a session, the plugin loops through ctx.sessions.binding(sessionId).session.loadOlder() to load older history until hasMore is false (the session reports “no more history”). The implementation sets a limit of 200 pages; if openState !== "open", it waits up to 150 times × 200ms before continuing.

Side Effect Fix for Round Process Folding

In the official round process area’s folding logic, the prerequisite includes !historyIncomplete. This flag is related to the pagination’s hasMore: when history is not fully loaded, the folding entry might not appear at all (short sessions can collapse, long sessions cannot). Once all history is loaded and hasMore becomes false, the folding behavior restores consistently with the official design. The README explains this as a side effect of using the plugin, not a separate feature toggle.

Settings Toggle

Path: Settings → General → “Auto-load All History”, enabled by default. After turning it off, behavior is consistent with the official behavior without the plugin installed.

Installation and Activation

In an environment where the DSH Web Profile is already configured, you can install using the official plugin command (commands below are taken from the project README):

dsh plugin --profile web add -w dsh-history-autoload

If a manual equivalent is needed: place the package in <DSH_HOME>/profiles/node_modules/dsh-history-autoload/, and add an insert entry in cordis.patch.yml:

- insert:
    - id: history-autoload
      name: 'dsh-history-autoload'

The plugin runs with the current DSH process and the browser-loaded code as boundaries; before installing, you should check the GitHub repository source code and MIT license yourself.

Typical Usage

  1. After completing installation in the previous section, refresh or re-enter the DSH Web interface.
  2. Confirm that “Auto-load All History” in Settings → General is enabled (it is enabled by default).
  3. Open a session with a long history from the list; no need to manually scroll repeatedly; wait for the automatic pagination to finish, then you can browse the complete history in a single-page context and use round process folding normally (for long session history that is complete).

Pure browser-side plugin: host-side rows assemble with restart; behavior aligns with patch configuration after a hard refresh.

Uninstallation

Simply remove the corresponding insert entry from cordis.patch.yml; the settings option and plugin behavior will disappear together. Takes effect after a hard refresh.

Implementation Highlights (for Integration and Troubleshooting)

  • Zero visible UI components, registered on conversation.session.header.utilities (rendered once per session).
  • No loadOlder in session-level slot props, pagination must go through the session service layer mentioned above.
  • Logic is centralized in useEffect and wrapped in a global try/catch to avoid throwing errors during rendering that trigger the chat area’s ErrorBoundary and cause a full block breakdown.
  • Client-side only requires react / react/jsx-runtime (consistent with platform baseline).

Applicable Scenarios and Notes

Who is it for: Developers who frequently open long sessions in DSH and need to see a complete multi-round dialogue and tool call traces at once; users who want to reduce manual pagination and rely on round process folding to browse the process.

Compatibility (as documented): DeepSeek Harness 0.1.5-rc.1, Web Profile, browser-side. Other versions are not declared in the README; it is recommended to verify after upgrading DSH.

Note: Automatically pulling full history will increase request and wait time when opening a session (more pages, or when the session is not open, will wait according to the above strategy). Extremely long sessions are constrained by the 200-page limit. The plugin and SkillHub Directory are part of the community ecosystem and have no official affiliation with DeepSeek / Hypersphere; star and propagation data are subject to the display on each site at the time; this article does not cite unverified data.

Conclusion

dsh-history-autoload addresses the specific friction of “only seeing the last page of history when entering a session” by using an auto loadOlder to synchronize the context, and incidentally aligns the round process folding for long sessions. For trial or checking patch details, you can check the directory page SkillHub: imcaibaicai/dsh-history-autoload and source code GitHub: imcaibaicai/dsh-history-autoload.

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

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

Xiaoye