跳到主要内容

dsh-github-sidebar

已验证

dsh-github-sidebar · v0.1.0 · MIT · Web 界面

A DSH (DeepSeek Harness) client plugin that adds a GitHub info sidebar to the chat window's right details column: the top pane lists repositories under a GitHub topic (e.g. dsh-plugin) sorted by stars, the bottom pane lists a repository's discussions with

安装

dsh plugin add dsh-github-sidebar

用 dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南。

源码

标签

说明文档

dsh-github-sidebar

一个 DeepSeek Harness (DSH) 客户端 UI 插件:在 chat 窗口右侧的 details 列注入 GitHub 侧边栏,包含上下两个窗格。

  • 上窗格 — topic 仓库按 stars:列出指定 GitHub topic(默认 dsh-plugin)下的仓库,按 stars 从高到低,每页 10 条、可翻页。使用公开的 GitHub REST Search API(无需 token)。
  • 下窗格 — discussions:列出某仓库的讨论(默认 deepseek-ai/deepseek-harness),支持排序:最新(服务端按时间从近到远)、评论最多、置顶优先(客户端拉全量后排序),每页 10 条、可翻页。使用 GitHub GraphQL API(需要 token)。

特性

  • ✨ 在 DSH chat 窗口右侧显示 GitHub 侧边栏(自动展开 details 列)。
  • ⭐ topic 仓库按 stars 排序、可翻页。
  • 💬 discussions 三种排序维度 + 分页。
  • 🔑 token 在面板内输入(存于 localStorage,仅发送给 api.github.com)。

安装

安装到你的 DSH profile(同时安装 host bundle 并注册客户端插件):

dsh plugin --profile web add dsh-github-sidebar
# 或使用源码 checkout 里的 dsh:
pnpm dsh plugin --profile web add dsh-github-sidebar

或直接从本仓库安装:

dsh plugin --profile web add https://github.com/Olympianz/dsh-github-sidebar

然后重启 dsh(dsh web)并刷新页面——客户端插件集合在启动时扫描。

使用

  1. 打开一个会话。
  2. 右侧 details 列自动展开,显示 GitHub Sidebar。
  3. 上窗格:浏览 topic 仓库(按 stars 排序),用「上一页/下一页」翻页。
  4. 下窗格:切换「最新 / 评论最多 / 置顶优先」排序;粘贴 GitHub token 并点「保存」。

配置

目前默认值硬编码在面板中;host 半边暴露了 Config schema(topic、owner、repo、pageSize),可在 cordis.yml 覆盖,但浏览器半边暂未读取。token 在面板内输入(按用户保存于 localStorage)。

开发

pnpm install
pnpm run bundle     # 构建 lib/client.js(tsdown)
pnpm run watch      # 监听变更重建
pnpm run typecheck  # tsc --noEmit(尽力而为)

lib/client.js 已提交到仓库,这样从 GitHub 直接安装无需构建步骤。修改 src/client 后请重新生成。

发布

完整指南见 CONTRIBUTING.md。简要步骤:

  1. 在 GitHub 建仓库(如 dsh-github-sidebar),推送本目录,并在仓库 Topics 页添加 dsh-plugin、deepseek-harness、dsh 标签。
  2. 发布到 npm,方便用户 dsh plugin add dsh-github-sidebar:
    npm login
    npm publish
    

已知限制

  • details 列是 single-occupant 槽:GitHub 面板会替换右侧列默认的调用/轨迹详情。真正的「与轨迹详情共存(标签切换)」需要修改 DSH 的 ui-conversation 的 DetailsPanel(属 DSH 源码改动)。
  • discussions 按评论/置顶排序需要先拉取全部讨论列表(GraphQL 请求较多;大仓库注意限流)。
  • token 存于 localStorage(浏览器端可见)。服务端 host 代理可以把 token 留在服务端;尚未实现。
  • 右侧列可见性通过自动展开维持;某些布局切换(会话切换)可能短暂关闭,随后插件会重新打开。

License

MIT