During daily use of DeepSeek Harness (DSH), repetitive workflows often require frequent session switching. When the sidebar session list is long, quickly locating an active session can become difficult. The fallow5/dsh-pin-sessions plugin solves this navigation problem by pinning active sessions to the top of the sidebar and centrally managing archived sessions.

Plugin Positioning

This is a DSH web plugin that allows users to pin active sessions to the top of the sidebar and provides an archive panel to manage hidden sessions.

Core Features

  1. Pin and Unpin

    • Pin a session to the top of the sidebar and hide it from the workspace browser at the same time.
    • Unpinning restores the session to the workspace browser.
  2. Archive Panel

    • Provides a settings panel for managing archived sessions.
    • Supports bulk deletion, row-by-row restoration, grouping by workspace, and pagination with 20 items per page.
  3. Context Menu Integration

    • Extends the right-click menu through @baihejiangnan/dsh-session-context-menu, providing pin/unpin action options.
  4. Design Logic

    • Pinning means archiving: The pin action calls workspaceRegistry.archiveSession() to hide the session from the workspace browser; the unpin action calls unarchiveSession() to restore the session.

Installation and Build

Before installing, ensure Node.js (>=20) and pnpm are installed.

cd dsh-pin-sessions
pnpm install
pnpm run build

Install command:

dsh plugin --profile web add /path/to/dsh-pin-sessions

Dependencies and Architecture

Dependencies

The plugin depends on the following packages:
* Runtime dependency: @baihejiangnan/dsh-session-context-menu (for context menu).
* DSH core packages: @deepseek-ai/cordis, @deepseek-ai/dsh-storage-domain, @deepseek-ai/dsh-typert-protocol, @deepseek-ai/dsh-client-runtime, @deepseek-ai/dsh-client-ui-slots, @deepseek-ai/dsh-client-ui-sidebar, @deepseek-ai/dsh-client-locale, @deepseek-ai/dsh-client-ui-primitives, @deepseek-ai/schemastery.

Architecture Design

The plugin adopts the standard DSH plugin split structure:
* Host side: Responsible for storage management (pin_sessions domain) and TYPERT remote service definitions (PinsRuntime). It includes 8 TYPERT methods: list, pin, unpin, toggle, isPinned, deleteSessions, listArchived, and unarchiveSession.
* Client side: Responsible for UI rendering. It is loaded through the window.__ModuleLoader__.load wrapper and renders PinnedSection (pinned section) and ArchiveSection (archive section) into the sidebar.

Notes

  1. Server-side changes: After changing host-side code, restarting the DSH server is required for changes to take effect.
  2. Client-side changes: After changing client-side code, refreshing the browser page is required for changes to take effect.
  3. Prerequisite dependency: @baihejiangnan/dsh-session-context-menu must be installed to use the right-click menu integration feature.

Summary

By pinning active sessions to the top and providing a centralized archive management interface, the plugin optimizes the interactive experience of the DSH sidebar. It is suitable for users who frequently switch among multiple specific workflows.