Bundle
dsh-pomodoro
番茄时钟:25/5 标准番茄工作法倒计时(开始/状态/暂停重置),纯本地计时零依赖
- Source
- guozede12593312
- stars
- 1 stars
- License
- MIT
- Updated
- Updated yesterday
Readme
# dsh-pomodoro
> 为 DSH 用户在对话/编码时提供专注计时,靠 25/5 标准番茄循环倒计时(开始 / 状态 / 暂停重置)
## 为什么需要它
在 DSH 里写代码、长对话一坐就是几小时。想用番茄工作法保持节奏时,往往要切到手机或浏览器计时,打断心流。dsh-pomodoro 把计时做进对话里:一句话开始,随时问「还剩多久」,模型直接告诉你。纯本地计时、零依赖、零构建。
## 安装
```bash
dsh plugin --profile <your-profile> add https://github.com/guozede12593312/dsh-pomodoro
```
`<your-profile>` 替换为你的 profile 名(如 `demo` / `web`)。
## 工具清单
| 工具 | 功能 | 参数 |
|------|------|------|
| pomodoro_start | 开始/继续番茄钟 | focus_minutes(默认 25)、break_minutes(默认 5) |
| pomodoro_status | 查询状态与剩余时间 | 无 |
| pomodoro_control | 暂停/重置 | action(pause / reset) |
## 使用示例
- 用户:帮我开始一个 25 分钟的番茄钟 → `pomodoro_start` 返回 `{ status: "running", phase: "focus", remainingClock: "25:00" }`
- 用户:还剩多久?→ `pomodoro_status` 返回当前阶段与剩余倒计时
- 用户:暂停 / 重置 → `pomodoro_control` 冻结剩余时间或归零
## 技术设计
- 无构建纯 JS:`lib.js` 纯函数(状态机 + 时间计算)+ `index.js` 薄壳注册,GitHub 安装零构建
- 内存态计时:实例重启清零(基础版;跨会话历史留待后续版本)
- 单测:`npm install && node --test`
## 版本
- v0.1.0:首发,25/5 标准循环 + 开始 / 状态 / 暂停 / 重置
Install
dsh plugin --profile web add github:guozede12593312/dsh-pomodoro
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-pomodoro from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.