DeepSeek Harness Workspace Pin-to-Top Plugin

Introduction

DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture, where plugins extend functionality by mounting onto DSH rows or injecting dependencies. While DSH’s shipped session supports pinning, the workspace list does not yet provide a pinning entry point. This plugin adds pin/unpin options to the workspace menu, allowing workspaces to be pinned and displayed at the top of the list.

Plugin Overview

iynew/dsh-workspace-pin is a DeepSeek Harness client plugin maintained by IyNew. It adds “Pin Workspace” and “Unpin Workspace” options to the workspace menu. Pinned workspaces appear at the top of the list and follow a “most recently pinned first” ordering. Pin records are stored in DSH’s persistent storage, survive process restarts, and are shared across browser tabs.

Core Features

  • Workspace menu pinning: Right-click the workspace header or click the “⋯” button on an expanded row to open the menu. Select “Pin Workspace” to pin it. The menu item displays a pin icon.
  • Unpinning: The menu of a pinned workspace provides an “Unpin Workspace” option. Clicking it restores the workspace to its previous adjacent position (or to the end if no adjacent position exists, being pushed to the corresponding position by other pinned workspaces).
  • Sorting logic: Pinned workspaces appear at the top of the list, ordered by most recently pinned first. Dragging a pinned workspace into the unpinned area will restore the pinned-first ordering on the next pin/unpin action or DSH restart.
  • Persistence & sharing: Pin records are stored under the host domain workspace_pin, at the file path ~/.dsh/storages/workspace_pin.json. They are read and cleaned of deleted workspaces on DSH startup, and the pin order is restored after restart.
  • Button visibility: The pin/unpin options are hidden if the current peer lacks permission to reorder workspaces or cannot read the pin state.
  • Feedback & errors: A brief notification is shown on successful operations; an honest notification is displayed if reordering fails due to permission or state issues.

System Requirements

  • DeepSeek Harness 0.2.2-rc.2 (Web or Desktop profile, with the plugin manager available).
  • After installing the plugin, restart DSH for composition changes to take effect; refresh the browser page to load updates.

Installation & Activation

Install from GitHub:

# Replace `desktop` with your DSH profile name
dsh plugin --profile desktop add github:IyNew/dsh-workspace-pin

Or use the repository URL:

dsh plugin --profile desktop add https://github.com/IyNew/dsh-workspace-pin.git

After installation, restart DeepSeek Harness once, then refresh the page to use it.

Install from a release tarball:

dsh plugin --profile desktop add \
  https://github.com/IyNew/dsh-workspace-pin/releases/download/v0.1.0/dsh-workspace-pin-0.1.0.tgz

Install from a local checkout:

git clone https://github.com/IyNew/dsh-workspace-pin.git
cd dsh-workspace-pin
pnpm install
pnpm build
dsh plugin --profile desktop add "$PWD"

Remove the plugin:

dsh plugin --profile desktop remove dsh-workspace-pin

Typical Usage

  1. Expand a workspace in the sidebar.
  2. Right-click the workspace header or click the “⋯” button on the expanded row to open the menu.
  3. Select “Pin Workspace.” The workspace moves to the top of the list, and a brief notification is displayed.
  4. Select “Unpin Workspace” to restore it to its original adjacent position.

In the “Workspace Tree” group, pinned sub-workspaces retain their registered parent node; only the sibling ordering changes, and collapsed parents will hide them. In both flat view and grouped view, pinned workspaces appear at the very top of the list.

How It Works

  • Host half: Records each workspace’s pin order and adjacent unpinned workspace IDs via the workspace_pin storage domain, and writes the visible order using ctx.workspaceRegistry.insertBefore. On startup, it reads the records, cleans up deleted workspaces, and resets the pinned-first ordering. It communicates with the browser half through the /workspace-pin RPC channel (list, pin, unpin); all mutations are restricted to the owner peer.
  • Client half: Adds menu items for the workspace target via ctx.contextMenus (order 150), using two contextMenu.icon icons to represent pin and unpin states. A snapshot store reads the pin state from the RPC channel, refreshing on window focus and menu open, and hides options when the peer lacks permission or the state is unreadable.

Notes & Use Cases

  • This plugin runs with the current DSH process permissions. It is recommended to review the source code and license (MIT) before installation.
  • Requires DeepSeek Harness 0.2.2-rc.2; higher versions may alter workspace UI slots, connection row IDs, or their injection lists. Check cordis.patch.yml and the workspace menu source before upgrading.
  • After installing the plugin, a DSH restart is required for composition changes to take effect on the next startup; the browser side requires a page refresh.

Summary

This plugin provides pin/unpin capabilities in the workspace menu, enabling pinned sorting in the workspace list while remaining consistent with DSH’s persistent storage and sorting mechanisms. It is well-suited for developers who need to keep frequently used workspaces fixed and reduce navigation paths.

  • Directory page: https://www.skillhub.cn/plugins/IyNew/dsh-workspace-pin
  • GitHub: https://github.com/IyNew/dsh-workspace-pin
羽毛球分组比赛记分
小程序二维码

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

Xiaoye