DeepSeek Harness plugin

dsh-client-ui-sedentary-whale

久坐提醒鲸鱼 — 悬浮在 dsh Web 页面上的久坐提醒插件(专注计时 / 休息提醒 / 余额查询)

Jump to install

Source facts

Repository
OnlyAPI/dsh-client-ui-sedentary-whale
Latest update
Aug 20, 2026
Category
Just for Fun
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/OnlyAPI/dsh-client-ui-sedentary-whale
Plugin: dsh-client-ui-sedentary-whale
Author: OnlyAPI

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

久坐提醒鲸鱼(Sedentary Whale Reminder)

一只悬浮在 DSH 页面上的鲸鱼,用于提醒你在连续专注工作后起身活动。

![界面示例](docs/screenshot.png)

行为

  • 状态机:未开始 / 专注中 / 休息中;面板里点「开始专注」才计时,选择时长不会自动开始;「重置」可随时清零进度回到未开始。
  • 专注时长:预设 5 / 10 / 25 分钟或自定义(1–180);自定义通过弹窗 −/+ 微调;专注中累计页面活动时间,满时长后提醒「该起来活动一下啦」。
  • 休息循环:提醒后点「休息一下」进入休息(休息时长 3 / 5 / 10 分钟可选或自定义 1–60,默认 5);休息倒计时结束后回到「开始专注」可开始下一轮,休息中也可随时「开始专注」提前继续。
  • 稍后提醒:气泡里可点「再专注 5 分钟」顺延,或「休息一下」进入休息。
  • 休息判定:专注中连续无操作超过 3 分钟(或切走标签页超 3 分钟)视为放弃本轮,回到「未开始」。

交互

操作效果
拖动鲸鱼移动位置(位置会记住)
左键单击鲸鱼头顶冒出文案气泡(约 2.5 秒消失)
右键单击鲸鱼打开 / 关闭「久坐提醒」面板
久坐提醒开关开/关提醒;开时功能区丝滑展开(专注/休息时长 + 按钮),关时收起隐藏
开始专注 / 暂停开始或暂停本轮专注(选择时长不会自动开始)
重置清零专注进度、回到「未开始」
专注时长胶囊5 / 10 / 25 分钟或「自定义」(✏️ 表示可编辑);已设置的自定义直接显示分钟数(如 45分)
休息时长胶囊3 / 5 / 10 分钟或「自定义」(✏️),默认 5
自定义时长弹窗−/+ 步进微调 + 数字输入,取消 / 确定,Enter 确认
余额 ↻查询 / 刷新 DeepSeek 余额(💰 DeepSeek 余额)
点击空白处关闭面板
设置 → 通用 → 悬浮鲸鱼显示 / 隐藏鲸鱼(状态记忆,实时生效)

余额查询

  • 面板里「💰 DeepSeek 余额」一行点 ↻ 即查询 / 刷新;自动使用 DSH 已配置的 DEEPSEEK_API_KEY 凭据(~/.dsh/.credentials.yaml)。
  • 通过 Host 半边调用官方接口 GET https://api.deepseek.com/user/balance;动态沙箱里没有 fetchcurl.exe/.NET 又因 Schannel 拿不到凭据,故改用 node -e "fetch(...)" 子进程(Node 自带 TLS)发请求。
  • Key 不写进代码、也不存浏览器。

实现说明

  • 这是一个静态 bundle 插件(由动态 code.client/code.host 插件改造而来):

- Host 半边 src/host.js:提供 POST /api/sedentary-whale/balance 余额查询路由。 - Client 半边 src/client.jswindow.__ModuleLoader__.load({id, factory}) 格式的客户端 bundle,注册进 shell.overlay 悬浮层 Slot;无构建步骤,源码即产物。

  • 鲸鱼采用官方 DeepSeek logo(path 取自 apps/web/public/favicon.svg),只保留鲸鱼本体、无进度环;颜色跟随主题:浅色模式下为黑色、深色模式下为白色;久坐提醒开启时,鲸鱼头顶上方的倒计时胶囊显示状态(「未开始」/「暂停 mm:ss」/ 剩余时间 mm:ss / 到点变红「休息啦」/ 休息中「休 mm:ss」),面板打开、说话气泡或提醒气泡显示时隐藏。
  • 「悬浮鲸鱼」显示 / 隐藏开关注册在 设置 → 通用settings.general.item 行),状态存 localStorage(key:dsh.sedentaryWhale.visible),通过自定义事件实时同步给鲸鱼;隐藏时悬浮层整体不渲染。
  • 深色模式兼容:跟随宿主 body[data-ds-dark-theme] 自动切换,面板、气泡、胶囊、按钮、弹窗与文字均适配深色;颜色统一走 --sw-* 语义变量(优先复用宿主 --dsw-alias-* 主题 token,缺失时用内置深浅兜底值)。
  • 面板(300px)为毛玻璃卡片 + 蓝色渐变点缀:久坐提醒标题行(⏱️ + 状态 + 开关)→ 功能区(专注/休息时长胶囊 + 重置/开始专注)→ 余额行;功能区用 class + transition 折叠动画,面板近鲸鱼端锚定(鲸鱼下方固定顶部、上方固定底部贴鲸鱼),开关切换不移位、不遮挡鲸鱼。
  • 自定义时长弹窗遮罩只覆盖面板区域,不遮全屏。
  • 依赖服务:Host 侧 webServer / credentials / shell;Client 侧 slotsshell.overlay 座位)。计时用浏览器 setInterval/setTimeout(effect 内清理)。
  • 专注时长、鲸鱼位置与久坐提醒开关通过 localStorage 记忆(key:dsh.sedentaryWhale.minutes / .pos / .enabled)。

安装

# 已发布到 npm(@yifanfff/dsh-client-ui-sedentary-whale)
dsh plugin --profile web add @yifanfff/dsh-client-ui-sedentary-whale

# 或从 GitHub 源码安装(按 tag 锁定版本,源码即运行代码,可完整审计)
dsh plugin --profile web add github:OnlyAPI/dsh-client-ui-sedentary-whale#v0.2.2

# 本地开发(源码目录以符号链接安装,改代码无需重装)
dsh plugin --profile web add link:D:/DevApps/AI-Ide/DeepSeek-harness/deepseek-plugins/sedentary-whale

# 重启 dsh web 后生效:页面右下角出现悬浮鲸鱼
  • 包清单声明了 dsh.bundle.patchcordis.patch.yml 插入插件行)与 dsh.client(web 平台、注入 runtime/layout),是官方 bundle 插件形态。
  • 移除:dsh plugin --profile web remove @yifanfff/dsh-client-ui-sedentary-whale

限制

  • 浏览器插件只能检测当前 DSH 页面获得焦点时的键鼠活动,无法全局监听系统级输入(那需要原生程序)。
  • 皮肤/主题类全局样式需自行管理:本插件通过 <style data-plugin-css> 注入自身样式,卸载时自动移除。

更新记录

v0.2.2

  • 新增「悬浮鲸鱼」设置开关(设置 → 通用):可随时显示 / 隐藏鲸鱼,状态持久化、实时生效;设置行样式与系统内置设置项一致(标题 14px/400、hairline 分割线、深浅色自适应)。
  • 倒计时胶囊移至鲸鱼头顶上方(不再遮挡身体);提醒气泡拉近鲸鱼。

v0.2.1

  • 鲸鱼改为黑色(与 dsh 黑色鲸鱼一致),深色模式下自动切换为白色。
  • 兼容深色模式:跟随宿主 body[data-ds-dark-theme] 自动切换,面板、气泡、胶囊、按钮、弹窗与文字全部适配;颜色统一走插件自管的 --sw-* 语义变量(深浅两套内置值)。
  • 修复浅色模式面板背景(颜色不再依赖宿主 token,恢复半透明白毛玻璃卡片);开关增加边框与关闭态对比度,浅色/深色下都清晰可辨。

v0.2.0

  • 全新面板:久坐提醒(⏱️ 标题 + 状态 + 开关)→ 专注/休息时长 + 自定义弹窗 → 开始专注/暂停 + 重置 → DeepSeek 余额(💰),信息层级清晰。
  • 自定义时长改为弹窗(−/+ 步进微调 + 数字输入,取消/确定,Enter 确认);自定义胶囊带 ✏️ 编辑标识,已设置后直接显示分钟数(如 45分)保持单行。
  • 功能区折叠动画:开关打开时丝滑展开、关闭时收起;面板近鲸鱼端锚定,切换不移位、不遮挡鲸鱼。
  • 新增「重置」按钮:清零专注进度回到「未开始」。
  • 状态行与标题文字对齐;提醒关闭时不显示状态文案。
  • 修复:休息自然结束回到「未开始」、闲置/切页重置等计时逻辑;清理调试日志与冗余代码。

v0.1.0

  • 初始版本:悬浮鲸鱼(DeepSeek logo)常驻页面,可拖动并记忆位置。
  • 左键点击冒出文案气泡,右键打开面板。
  • 久坐提醒:预设 5 / 10 / 25 分钟(可自定义)专注计时,满时长弹气泡提醒「该起来活动一下啦」,支持稍后提醒。
  • DeepSeek 余额查询(使用 DSH 配置的 DEEPSEEK_API_KEY,Key 不写入代码、不存浏览器)。
  • 由动态插件重构为静态 bundle 插件(Host 路由 + Client bundle,window.__ModuleLoader__.load),无构建步骤,源码即产物。