在 DeepSeek Harness(DSH)Web 环境中,获取外部代码仓库通常需要在浏览器、终端和对话框之间切换。dsh-github-search 将这个流程收敛到一个侧边栏面板中,实现搜索、浏览、判断、克隆和集成的一站式闭环。

功能

该插件为 DSH Web 侧边栏提供 GitHub 操作台,核心能力包括:

  • 搜索与浏览:支持仓库和代码搜索;在卡片内渲染沙箱化的 README,并获取 stars、forks、语言等元数据。
  • 一键克隆:支持选择盘符、工作区和子目录克隆;git 失败时自动降级为 zip 下载。
  • Agent 集成:克隆后可直接喂给 Agent,支持分析、运行、总结、集成或自定义指令。
  • Agent 判断:结合当前工作区和仓库 README,由宿主端模型进行中肯判断,结果直接显示在卡片里。
  • 历史与社交:持久化记录浏览、下载和判断历史;支持 Star、Fork 和查看“我 Star 过”的列表。
  • 发现页:提供本周新星和近期热门仓库的发现入口。
  • Token 配置:支持配置 Personal Access Token,提升速率上限并解锁代码搜索与 Star 功能。

安装

通过 DSH CLI 将插件目录添加到 Web 配置文件中:

dsh plugin --profile web add <本目录路径>

重启 Web 后生效。

使用

  1. 打开 DSH Web,在左侧边栏点击 GitHub 搜索(或 GH)。
  2. 输入关键词回车;切换类型可搜代码(需先配置 token)。
  3. 点击“浏览”查看 README;点击“下载”选择盘符和子目录进行克隆。
  4. 点击“让 agent 判断”查看结果;如果合适,点击“一键 clone”并选择全局或独立范围及路径。
  5. 顶部导航包含发现页、历史记录、我 Star 过和设置。

说明

  • 速率限制:未配置 token 时 GitHub 搜索限速约 10 次/分钟;配置 token 后提升至 30 次/分钟。
  • 数据持久化:判断结果、浏览记录和克隆记录均保存在 localStorage 中。
  • 架构:插件分为宿主端(lib/index.js)和浏览器端(lib/client.js)。宿主端负责命令执行和模型调用,浏览器端负责 UI 注入和交互。

In the DeepSeek Harness (DSH) Web environment, obtaining external code repositories usually requires switching between the browser, terminal, and chat box. dsh-github-search consolidates this workflow into a single sidebar panel, providing an end-to-end loop for searching, browsing, evaluating, cloning, and integrating.

Features

The plugin provides a GitHub console for the DSH Web sidebar. Core capabilities include:

  • Search & Browse: Supports repository and code search; renders sandboxed README files inside cards, and fetches metadata such as stars, forks, and language.
  • One-Click Clone: Supports cloning by selecting a drive letter, workspace, and subdirectory; automatically falls back to zip download if git fails.
  • Agent Integration: After cloning, the content can be directly fed to the Agent, supporting analysis, execution, summarization, integration, or custom instructions.
  • Agent Evaluation: Combines the current workspace and repository README, with the host-side model performing a balanced judgment; the result is displayed directly in the card.
  • History & Social: Persistently records browsing, download, and evaluation histories; supports Star, Fork, and viewing the “Starred” list.
  • Discovery Page: Provides entry points for this week’s rising stars and recently popular repositories.
  • Token Configuration: Supports configuring a Personal Access Token to raise the rate limit and unlock code search and Star functionality.

Installation

Add the plugin directory to the Web configuration file via the DSH CLI:

dsh plugin --profile web add <本目录路径>

Restart Web for changes to take effect.

Usage

  1. Open DSH Web and click GitHub Search (or GH) in the left sidebar.
  2. Enter a keyword and press Enter; switch the search type to search code (a token must be configured first).
  3. Click “Browse” to view the README; click “Download” to select a drive letter and subdirectory for cloning.
  4. Click “Let Agent Evaluate” to view the result; if appropriate, click “One-Click Clone” and select the global or standalone scope and path.
  5. The top navigation includes Discovery, History, Starred, and Settings.

Notes

  • Rate Limits: Without a token, GitHub search is limited to about 10 requests per minute; with a token, it increases to 30 requests per minute.
  • Data Persistence: Evaluation results, browsing records, and cloning records are all stored in localStorage.
  • Architecture: The plugin consists of a host-side component (lib/index.js) and a browser-side component (lib/client.js). The host side handles command execution and model invocation, while the browser side handles UI injection and interaction.