前言¶
用 DeepSeek Harness(DSH)做倉庫相關開發時,Issue 往往在瀏覽器裏,會話在 Harness 裏:切窗口、複製標題和鏈接、再粘貼到 Composer,上下文容易丟。社區插件 dsh-plugin-github-issues(維護者 ckanner,分類爲聯網工具)在 DSH 內提供 GitHub Issues 工作面:按組織、倉庫、milestone、負責人和狀態篩選,查看詳情(含 Markdown 正文、標籤、優先級、關聯 PR 與檢查狀態),並把某個 Issue「交給 Agent」——在新 Session 中暫存爲 Composer 卡片,發送後按模板生成任務提示詞。插件對 GitHub 只讀,不會寫回評論或改標籤。
這是什麼¶
dsh-plugin-github-issues 是發佈在 npm 上的 DSH 插件(MIT 許可證),在帶 Web GUI 的 DSH Desktop 中增加左側 GitHub 面板、右側 Issues 側欄標籤,以及 Composer 內的暫存卡片與已關聯 Issue 的 chip。GitHub API 請求由 Host 進程發起,瀏覽器側只收到視圖模型;令牌通過本機已登錄的 gh CLI 解析,留在內存中,不寫入插件配置或頁面。
核心功能¶
下面按 README 中「What you get」表格歸納已覈實能力。
GitHub 面板(左側主面板)¶
固定級聯工具欄:組織 → 倉庫 → milestone → 負責人 → 狀態;篩選偏好會在重啓後記住(存在 profile 的 UI 狀態中,而非插件 config)。列表區域可滾動,搜索框固定在上方;詳情區獨立滾動,展示經消毒的 GitHub 風格 Markdown 全文、milestone 進度、標籤、優先級、負責人、關聯/提及的 PR 與 checks。owner/repo#number 可在瀏覽器中打開 GitHub。
右側 Issues 列¶
在 Conversation 旁顯示同一套篩選後的 Issue 列表,支持拖入 Composer 完成 handoff。
Composer 與 Session 關聯¶
- 暫存卡片形如
[GitHub] owner/repo#number ×;可附加說明後發送,卡片會按 Settings → GitHub → Prompt template 轉爲 Issue 任務提示詞,並記錄 Issue ↔ Session 鏈接。 - Composer 下方 dock 顯示已關聯 chip:開/關狀態圓點 + 編號;刷新面板、輪詢、窗口聚焦或列表中出現該 Issue 時會從 GitHub 更新狀態。
- 詳情區可 進入 Session(最近一條鏈接)、爲本 Issue 新建 Session,或管理多條已鏈接 Session 的進入/取消關聯;取消關聯不會刪除 Session。同一 Issue 可在多個 Session 中並行處理。
設置¶
Settings → GitHub:gh 認證狀態與 scope、handoff 行爲、提示詞模板。模板變量包括 {{repo}}、{{number}}、{{title}}、{{url}}、{{state}}、{{milestone}}、{{priority}}、{{assignees}}、{{labels}}、{{prs}}。
限制(使用前需知)¶
- 只讀:不能發評論、不能改 label/負責人/狀態。
- 列表可見時每 60–120 秒輪詢;需即時更新時用 Refresh。
- 新 handoff 選擇 Workspace 按 README 中的啓發式優先級(當前 Session 的 Workspace → 同倉庫已鏈接 Session 的 Workspace → 目錄/標題匹配倉庫名 → Host 當前/最近 Workspace),並非固定映射。
- 開發與驗證針對 DSH Desktop
0.2.1-rc.3;Composer 發送攔截依賴該版本的 DOM,DSH 升級後需自行確認。
安裝與啓用¶
插件以當前 DSH 進程的權限運行;安裝前建議在 GitHub 倉庫閱讀源碼與 LICENSE,並確認 npm 包歸屬與維護者信息。
從 npm 安裝(推薦,包內已包含構建好的 Host 與瀏覽器 bundle):
dsh plugin --profile <name> add dsh-plugin-github-issues
需要可復現的 profile 時可固定版本(README 示例):
dsh plugin --profile <name> add dsh-plugin-github-issues@0.4.7
安裝後需重啓 Harness(profile 在啓動時組裝)。移除:
dsh plugin --profile <name> remove dsh-plugin-github-issues
環境要求(摘自 README Requirements):
- 帶 Web GUI 的 DSH Desktop(文檔寫明針對
0.2.1-rc.3開發與驗證)。 - 對本機使用的 GitHub 主機執行
gh auth login;令牌在 OS 鑰匙串中,不寫入本包配置。
Release 頁還提供可路徑安裝的打包 tarball(dsh-plugin-github-issues.tgz);本地 checkout 鏈接安裝需 npm install、npm run build 後再 dsh plugin --profile <name> add /path/to/dsh-plugin-github-issues,此處不展開。
典型用法¶
- 點擊左側欄 GitHub 圖標。
- 選擇組織與倉庫(默認會選中第一個),再選 milestone、負責人與狀態。
- 點擊列表行查看詳情;需要時在詳情裏 Hand to agent / New session for this issue,或從右側 Issues 標籤把行拖入當前 Session 的 Composer。
- 在 Composer 中補充上下文(也可不寫),發送後卡片變爲模板化的 Issue 提示詞並建立鏈接。
- 通過 dock 上的 chip 或詳情中的鏈接列表再次進入 Session,或取消關聯。
- 可從面板頭 Right column 或右側欄添加菜單(頁面類型 Issues)打開右列。
若 Issue 已有鏈接:enter Session 打開最近一條;新 handoff 的 Workspace 規則見上文「限制」一節。
隱私與持久化¶
Host 從 gh 解析令牌且僅內存持有;持久化 UI 狀態(篩選偏好、提示詞模板、Issue ↔ Session 鏈接)位於 $DSH_HOME/github-issues/state.json(模式 0600)。GitHub 請求不經由瀏覽器直連。
結尾¶
dsh-plugin-github-issues 把 Issue 瀏覽、篩選與「交給 Agent」收進 DSH 同一條工作流,適合已在 Harness 裏開 Workspace、又用 gh 管理 GitHub 的開發者。社區目錄與 DeepSeek / 幻方無官方從屬關係,安裝來源以 npm 與倉庫 Release 爲準。
- 目錄頁:https://www.skillhub.cn/plugins/ckanner/dsh-plugin-github-issues
- 倉庫:https://github.com/ckanner/dsh-plugin-github-issues