dsh-archive-favorites-forge: Extending favorites, copying, and bulk archiving on top of the official archive

Introduction

DeepSeek Harness (DSH) includes built-in session archiving: the Workspace registry maintains a global archivedSessionIds, and the client sidebar and “Filter Sessions” view options use this to display archived conversations. The official functionality deliberately excludes favorites, permanent deletion of single entries, copying session IDs and transcript paths, nor does it support batch archiving based on idle duration; archived conversations cannot be opened directly and must be unarchived first.

When the sidebar accumulates many conversations, tasks such as marking frequently viewed sessions, cleaning up long-unused records, or passing IDs and file paths to scripts often require switching back and forth between the file system and the UI. dsh-archive-favorites-forge hooks into the existing archiving UI via documented client slots. It does not modify official source code but adds capabilities such as favoriting, copying, deleting, idle-timeout batch archiving, and favorite filtering for conversations.

What is this

dsh-archive-favorites-forge is a client-side DSH plugin (npm package name dsh-archive-favorites-forge, current version 0.24.4, MIT License) released by the maintainer loyalchiiina. It implements additive slot extensions on top of the officially implemented archiving capabilities: the host half (lib/index.js) handles favorite persistence, path resolution, JSON routing, and guarded deletion/archiving; the client half (lib/client.js) registers menu items, settings pages, and inline actions to official slots. The plugin does not write to any official files.

Core Features

The following summarizes the capabilities described in the README, organized by UI location.

  1. Favorite Conversations: Both archived and unarchived conversations can be favorited; the “…” menu item and the inline hover ☆ allow for optimistic updates of the star mark.
  2. Copy ID + Path: One-click copying of the conversation ID and the absolute path of the transcript file (two lines of text) via the menu.
  3. Permanent Single Deletion: Non-favorite conversations can be permanently deleted with a secondary confirmation; upon success, the sidebar row is removed immediately (the host emits api-session/removed).

The favorite collection is written to a host-side file, rather than the renderer’s localStorage (which would store a copy per origin). The path is:

~/.dsh/data/dsh-archive-favorites-forge/favorites.json

View Options → Filter Sessions

Adds two rows to the official “Filter Sessions” group: Show favorites only (archived) and Show favorites only (unarchived). Since there is no official slot for this menu, the plugin locates the official filter items via role / aria / data-row-key and clones a row, without relying on CSS module hashes.

Settings → Archive Favorites

  1. Timeout Batch Archiving: Archives unarchived conversations that have been idle for more than N hours in one go; this action can be undone.
  2. Export List: A tab-separated txt file containing fields such as conversation name, conversation ID, workspace, idle duration, and last activity time; users can copy the path or open the containing folder in the file manager.
  3. Favorite List: Displays favorites and their archiving status.
  4. Batch Delete: Permanently deletes conversations that are “archived and not favorited.”

Deletion Guardrails (Host Side)

The current generation of Harness has no official session-delete RPC; deletion involves removing the corresponding artifact directory under ~/.dsh/sessions/, which is irrecoverable. The host performs checks before deletion:

  • Already favorited IDs are rejected directly;
  • Resolved paths exceeding the sessions root directory are rejected;
  • Symbolic links are rejected;
  • The sessions root directory itself is rejected;
  • Single requests are constrained by the maxDeletePerCall limit.

Each ID is reported individually; a single failure does not interrupt the entire batch.

Other notes (from README Notes): The conversation ID format is session-<uuid>, while older directories may be <uuid> or session-<uuid>; the plugin is compatible via normalizers and resolvers. Empty provisional sessions do not participate in the idle pool or batch deletion. The candidate list is the intersection with the actual sidebar display; archived sessions without a cwd are not counted.

Installation and Activation

Installation command (from README):

dsh plugin --profile <profile> add dsh-archive-favorites-forge

Replace <profile> with your DSH profile name. After installation, fully exit and reopen DSH; the current generation of the host half has no watcher, and the client bundle is snapshotted at startup, so simply refreshing the page will not load the new version.

Optional configuration (written to plugin config):

Key Default Value Description
enabled true Master switch for host routing
maxDeletePerCall 500 Hard limit for single delete requests

Example:

- id: dsh-archive-favorites-forge
  config:
    maxDeletePerCall: 200

Peer dependencies indicate the plugin targets @deepseek-ai/dsh in the range >=0.1.7-rc.1 <0.2.0-0 || >=0.2.0-rc.1; the README badge indicates DSH ≥ 0.2.0-rc.2.

Typical Usage

  1. Mark frequently viewed conversations: Hover over a sidebar row and click ☆, or open “…” and select Favorite. When you need to read an archived favorite carefully, use “View Options → Filter Sessions → Show favorites only (archived)” to narrow the list, then unarchive and open it as needed (archived conversations cannot be opened directly, which is official behavior).
  2. Interface with scripts or debugging: Select “Copy ID + Path” in “…” to paste the session ID and transcript absolute path into a terminal or script.
  3. Clean up idle sessions: Open Settings → Archive Favorites, configure the idle hours, and execute timeout batch archiving; after confirming correctness, you can export a txt list for archiving, or use batch delete for “archived and not favorited” items; for single cleanup, use “Permanent Delete” in “…” (favorited items will be rejected by the host).
  4. Control deletion scale: If the cleanup volume is large, lower maxDeletePerCall in the config and perform batch deletions in multiple runs.

Use Cases and Notes

Who it is for: Developers who accumulate a large number of Workspace conversations in DSH over the long term and need favorite marking, path export, idle archiving, and controllable deletion; users who wish to extend official archiving without forking the client UI.

Permissions and Security: The plugin runs with the permissions of the current DSH process. Deletion operations act directly on directories under ~/.dsh/sessions/ and do not involve the project workspace, but transcripts and session data will be permanently lost. Please read the GitHub repository source code and MIT license before installation to confirm the behavior meets expectations.

Ecosystem Note: The DSH community plugin directory is hosted on an independent site (such as SkillHub) and has no official affiliation with DeepSeek / High-Flyer. The capabilities described in this article are derived from the plugin README and package metadata; please refer to the latest documentation in the repository before use.

Links

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

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

Xiaoye