Introduction

In long sessions of DeepSeek Harness (DSH), especially in code iteration scenarios, code blocks generated by the model are scattered across different turns of the conversation. To go back and locate a specific piece of code or compare modified versions of a file, users usually need to manually scroll through the chat history. The dsh-code-collector plugin solves this problem by turning all the code in a session into a searchable, groupable, and copyable resource list.

Plugin Overview

dsh-code-collector is a client-side plugin maintained by bycall. It aggregates all code blocks produced by the model in the current session into a single panel, supports grouping by language or file, and provides version history, real-time search, and one-click copy/download capabilities.

Core Features

This plugin provides the following capabilities:

  • Collect button: A persistent button on the right side of the input field, displaying a real-time badge with the total number of code blocks in the current session; supports toggling the panel with the Alt+Shift+C shortcut.
  • Dual views: Provides two views: “By Language” and “By File”. The “By File” view merges iterations of files with the same name into a version history.
  • Version history: Multiple iterations of the same file are automatically aggregated. The latest version is displayed by default; expanding it allows viewing historical versions, with support for jumping to and copying code.
  • Real-time search: The panel supports real-time filtering by file name, language, or code content.
  • Code extraction: Automatically extracts code blocks and fenced code segments, and normalizes language names.
  • Batch operations: Supports copying a single item, copying all items (with file name header comments), and downloading merged Markdown.
  • Click to jump: Clicking an item or version jumps directly to the corresponding turn and highlights it.
  • Internationalization: Supports a bilingual English/Chinese interface.

Installation and Activation

Use the following command to install:

dsh plugin --profile web add dsh-code-collector

After installation, you need to add "dsh-code-collector" to the dsh.profile.bundles array in ~/.dsh/profiles/web/package.json, then restart DSH.app (or hard refresh the browser window).

Typical Usage

  1. Open a long session. A collect button with a code block count badge appears on the right side of the input field.
  2. Press Alt+Shift+C to open the code collection panel.
  3. In the panel, switch views (By Language or By File) to browse the code list, or use the search box to filter by file name, language, or code content.
  4. Click any item. The page smoothly scrolls to the first message of that turn and highlights it.
  5. Use the “Download All” feature to save the code as a Markdown file.

Notes

  • The plugin requires a Node.js environment version >= 18.
  • It is based on the MIT License.
  • It is recommended to check the source code and license before installing.

Summary

This plugin aggregates scattered code blocks and solves the problem of disorganized code management in long sessions. For more details, refer to the Plugin Directory or the GitHub Repository.