Skip to main content
1

dsh-floating-ball

180lisilence/dsh-floating-ball

A draggable quick-action floating ball above the DSH harness shell, with shortcuts for new session, sidebar toggle, theme switch, and back-to-chat.

Install

dsh plugin --profile web add github:180lisilence/dsh-floating-ball

README

悬浮球 · Floating ball

一个 DeepSeek Harness(DSH)插件:在界面最上层浮一颗可拖拽的快捷球,随手新建会话、切换侧栏、切主题、回到对话。

功能

  • 挂在 shell.overlay(整帧浮层),悬在所有列之上,不受滚动容器裁剪,点击穿透不挡下方界面
  • 按住可拖到任意位置,松手自动吸附最近的左右边缘;位置写入 localStorage(键 dsh-floating-ball:position),下次进入仍在原处
  • 单击(或键盘 Enter / Space)展开快捷菜单,再点一次、按 Esc、点空白处关闭
  • 菜单四项:
    • 新建会话 —— uiWorkspace.startSession()
    • 切换侧栏 —— layout.toggleSidebar()
    • 深色 / 浅色模式 —— theme.setTheme()(按当前实际配色显示目标项)
    • 回到对话 —— layout.selectPanel(null)
  • 样式只用 --dsw-alias-* 主题令牌,跟随明暗主题;prefers-reduced-motion 下关闭动效
  • 文案走 Client locale 服务(中 / 英),服务缺失时回退内置字典
  • 自带原创 SVG 图标与 meta.title / meta.description

安装

插件以本地目录形式安装,需要一个 DSH profile:

  1. 在 DSH 会话里让 Agent 调用 plugin_manager,action: install_bundle,target 填本目录的绝对路径;
  2. 安装结果里 application 为 applied 即已生效(Slot 会即时注册);
  3. 之后更新本目录的代码,重新 install_bundle 并重启 Harness 才会加载新的客户端 JS 代。

目录结构

package.json         # dsh.bundle.patch + dsh.client(platform: web)
cordis.patch.yml     # 插入 id: floating-ball 一行
index.js             # Host 半:仅导出 apply(),让 Client 半被挂载
client.js            # Client 半:注册 shell.overlay 占位 + 悬浮球组件
locale/zh.json       # 显示元数据(中文)
locale/en.json       # 显示元数据(英文)
icon.svg             # 插件图标

自定义

  • 菜单项:client.js 里的 actions 数组,每项一个 run() 调 Client 服务
  • 球体尺寸 / 边距:BALL、EDGE 常量
  • 吸附与卡片宽度:MENU_W、MENU_GAP

兼容性

在 DSH Desktop 0.2.2-rc.1 验证:Client Slot 注册成功、显示元数据与图标随包落地。未声明版本范围。

License

未随包提供许可证文件,按需选择。

Related plugins