npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-plugin-deepseek-chat

v0.1.1

Published

Configurable chat panel for DSH: left main-panel and right-Sidebar entries for DeepSeek, ChatGPT, Claude, Gemini, Copilot, Kimi, or Grok. Site presets, a custom URL, and entry visibility are edited on the plugin's page in Plugins.

Readme

Chat Panel · DSH Plugin

一个 DeepSeek Harness 插件,提供左侧全屏对话面板和右侧边栏入口,并支持在 插件页面 里切换网站和控制入口显示:

  • 左侧「对话」:把主内容区切换为当前选中的对话网站,无地址栏;主面板里的外部链接在聊天界面右侧的内嵌分页栏打开,主聊天保持可见。
  • 右侧边栏「对话」:点击后在右侧边栏的 Browser 标签页中打开;地址栏和工具栏也会隐藏。
  • 插件内设置:在「插件 → 已安装插件 → 对话面板」页面里选择 DeepSeek / ChatGPT / Claude / Gemini / Copilot / Kimi / Grok,或填写自定义地址;并可分别显示/隐藏左侧和右侧入口(默认都显示)。
  • 页面状态保留:主面板的 Webview 不会在每次切换时重新加载;对话网站自己的侧栏、当前对话、滚动位置都会保留。

功能

  • 左侧入口 / 主界面:左侧边栏「自动化任务」下方新增「DeepSeek 对话」,点击后主内容区整体切换为 chat.deepseek.com,没有地址栏。
  • 页面侧栏保持打开:主面板的 Webview 常驻,切换到 Harness 会话时只隐藏、不销毁;再次进入时 DeepSeek 自己的侧边栏不会重新收起,页面也不会重新加载。
  • 记住 DeepSeek 侧栏状态:首次使用默认展开页面自己的会话侧栏;手动收起后会记住“关闭”,下次加载保持关闭;手动展开后会记住“打开”,下次加载自动展开。状态保存在 chat.deepseek.com 自己的 localStorage 中。
  • 切回工作区对话:点击工作区里的任意会话,主内容区自动切回该会话;「DeepSeek 对话」入口取消选中。
  • 右侧入口保留:右侧边栏引导页仍有「对话」卡片,点击后在 Browser 标签页中打开当前选中的网站。
  • 右侧地址栏隐藏:只对当前设置网站的 Browser 标签页隐藏地址栏和导航工具栏,页面直接铺满;其他 Browser 标签页不受影响。
  • 插件内设置:在「插件 → 已安装插件」打开本插件页面,可选择常用对话网站或填写自定义地址,并分别控制左侧/右侧入口是否显示。
  • 入口名称跟随网站:选择 ChatGPT 后,左侧入口会显示「ChatGPT 对话」,右侧卡片同理;切回 DeepSeek 后恢复「DeepSeek 对话」。
  • 保持登录与位置:同一应用运行期间复用固定 Webview 分区,登录状态、当前页面地址和页面内状态都会保留。
  • 桌面原生加载:桌面版使用 Electron <webview>。chat.deepseek.com 返回 Content-Security-Policy: frame-ancestors 'none',普通 iframe 无法嵌入,因此没有使用 iframe。
  • 链接处理:主面板里的外部 http(s) 链接会在聊天界面右侧的分栏中打开(聊天区缩短,不会覆盖),分栏内以标签页形式排列,可切换/关闭,带后退、地址和用系统浏览器打开;原生右侧栏里的 DeepSeek Browser 标签页点外部链接时,也在该右侧栏新开 Browser 标签页并保留原对话标签。没有可用右侧栏时回退系统浏览器。
  • 回退处理:Web 版没有 Electron 桥时显示说明,并给出「在系统浏览器中打开」。

效果

插件内的设置页面(切换网站、控制入口显示;左侧工作区名称已模糊):

插件设置

环境要求

  • DeepSeek Harness 桌面版(Desktop profile)。主界面的内嵌页面依赖桌面版的 Electron webview 隔离桥。
  • Web 版可以使用左侧入口,但无法内嵌 chat.deepseek.com,会显示回退说明;右侧入口在启用 Browser 的情况下可用。

安装

方式一:插件管理页

  1. 打开 Harness 左侧边栏的 插件 / Plugins。
  2. 选择 添加插件 / Add plugin,填入本目录的绝对路径,例如: E:\Works\HamenyProject\deepseekharnesschat\dsh-plugin-deepseek-chat
  3. 启用 dsh-plugin-deepseek-chat bundle。

方式二:命令行

dsh plugin --profile desktop add "file:E:\Works\HamenyProject\deepseekharnesschat\dsh-plugin-deepseek-chat"

安装后确认 C:\Users\fengy\.dsh\profiles\desktop\package.json 的 dsh.profile.bundles 包含 dsh-plugin-deepseek-chat。插件自带的 cordis.patch.yml 会插入 deepseek-chat 这一行,不需要手动修改 profile 的 patch 文件。

通过本地路径安装时,profile 的 node_modules 中是文件副本。修改本目录源码后,重新执行一次上面的 dsh plugin ... add(或直接覆盖 profile 中的副本),运行中的 Harness 会热重载客户端插件。

使用

左侧入口(主界面)

  1. 打开 DeepSeek Harness 桌面版。
  2. 点击左侧边栏的 DeepSeek 对话。
  3. 主内容区会打开 chat.deepseek.com;首次使用时在该页面登录 DeepSeek 账号。
  4. 登录后即可在主界面中对话。
  5. 想回到 Harness 会话时,直接点击左侧工作区里的任意会话:
    • 主内容区切换为该会话的对话;
    • 「DeepSeek 对话」入口取消选中;
    • DeepSeek 页面不会重新加载,下次点击入口时仍保持原来的侧边栏状态、当前对话和滚动位置。

右侧入口(保留)

展开右侧边栏,在引导页点击 对话,会在右侧边栏的 Browser 标签页中打开当前选中的网站;该标签页的地址栏和导航工具栏会被隐藏,只保留 Harness 的标签条。

插件内设置

  1. 点击左侧边栏的 插件。
  2. 在「已安装插件」里打开 对话面板 这个 bundle。
  3. 在 bundle 页面的「对话设置」里:
    • 选择常用网站:DeepSeek / ChatGPT / Claude / Gemini / Copilot / Kimi / Grok;
    • 或填写自定义地址;
    • 勾选/取消「显示左侧「对话」入口」和「显示右侧边栏入口」(默认都勾选)。
  4. 点击 保存;需要立即打开时点击 保存并打开。

设置保存在本机 Harness 客户端中,切换网站后左侧/右侧入口的名称会跟随变化(例如「ChatGPT 对话」)。

已打开的右侧 Browser 标签页需要关闭后重新打开,才会使用新地址。

DeepSeek 网页可能在嵌入环境中弹出「使用环境异常」的安全提示。这是 chat.deepseek.com 对非官方客户端的风险提示;关闭提示后可以正常登录和对话。插件不会伪造或绕过站点的安全检测。切换到其他网站时,页面侧栏状态记忆只对 chat.deepseek.com 生效。

实现

  • 通过 ctx.slots.inject('sidebar.panellist', …) 注册左侧入口;点击时 Harness 的侧边栏调用 ctx.layout.selectPanel('deepseek-chat')。入口名称和显示状态跟随插件设置动态注册。
  • 通过 ctx.slots.inject('main', …) 注册同 id 的主面板;布局的 main keyed slot 只在选中时挂载它的 placeholder。
  • 通过 ctx.slots.inject('plugins.bundle.config', …) 在插件页面的 bundle 详情里注册「对话设置」;设置(网站地址、左右入口显示)保存在客户端 localStorage,并通过订阅驱动入口/标签的动态注册。
  • 主面板的 Webview 不放在 React 树里,而是由插件单例挂在一个固定层中。切换会话时只把这一层移出屏幕并隐藏,不销毁 Webview;再次进入时按 placeholder 的位置重新对齐。因此对话网站自己的侧边栏、会话和滚动状态不会被重置。
  • 页面自己的会话侧栏由注入到 chat.deepseek.com 的一小段脚本维护:它把“打开/关闭”记录在该站点的 localStorage 中,并在页面加载后按上次状态恢复(首次使用默认展开)。
  • Webview 从桌面 preload 的 window.dshDesktop.browser 申请 guest lease,使用固定 workspace key main:deepseek-chat,同一应用运行期间复用同一个 cookie 分区;只有插件卸载时才释放 lease。
  • 右侧入口通过 ctx.sidebarRightTabs 注册 guide 卡片,点击后复用 Harness 自带的 Sidebar Browser;右侧边栏不存在时该部分自动不注册,左侧主面板仍可用。
  • 右侧 Browser 标签页打开后,插件在该标签页的 DOM 上标记 data-dsc-deepseek,并用 CSS 隐藏它的地址栏/导航工具栏;标记只添加给当前设置网站同源的 Browser 标签页,其他 Browser 标签页不受影响。
  • 点击工作区会话由 Harness 的 workspace 导航调用 ctx.layout.selectPanel(null),所以会自动切回会话,插件不需要额外监听。
  • 插件不向被访问页面注入 Node 或 Electron 能力;权限、下载、弹窗和导航策略由桌面宿主统一执行。

结构

dsh-plugin-deepseek-chat/
├─ cordis.patch.yml       # bundle patch:插入 deepseek-chat 这一行
├─ lib/index.js           # Host 半边:无操作
├─ lib/client.js          # 左侧入口 + 常驻主面板 Webview + 右侧入口
├─ locale/zh.json         # 插件管理页显示名称/描述
├─ locale/en.json
├─ icon.svg
└─ assets/                # 截图

License

MIT