XCKjacksparrow/dsh-weather ↗★ 0
dsh-weather
Weather forecast for the DeepSeek Harness web GUI: a draggable floating weather card plus a model-callable weather tool, with playful easter eggs.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:XCKjacksparrow/dsh-weather说明文档
阅读完整 README ↗dsh-weather
DeepSeek Harness 网页端天气预报插件。右下角可拖拽的悬浮天气卡片,外加一个模型可直接调用的 weather 工具——还带点小彩蛋。天气数据来自 Open-Meteo(免费、无需 API Key)。
功能
- 悬浮天气卡片 — 右下角 ☀️ 按钮,点开是可拖拽的卡片,展示实时天气和 3 天预报。
- IP 自动定位 — 首次打开时通过 IP 自动定位到你所在城市,并解析出中文名(如「南京」);失败则回退到北京。
- 任意城市搜索 — 支持中文或英文城市名,例如「北京」「上海」「New York」「Tokyo」。
- 模型工具 — 智能体能直接调用
weather工具回答「北京明天天气」「上海要带伞吗」这类问题。 - 彩蛋 🍬 — 天气段子(晴天 =「宜摸鱼忌加班」、≥35° =「出门五分钟流汗两小时」)和城市梗(
南极=「企鹅比人多,出门记得带鱼」)。 - 主题适配 — 使用 Harness 设计变量,自动跟随浅色/深色主题。
安装
dsh plugin --profile web add https://github.com/XCKjacksparrow/dsh-weather/archive/refs/tags/v0.1.0.tar.gz
安装后重启 dsh web,让 Host 和浏览器客户端加载插件。
从本地构建安装
npm run build
npm pack
dsh plugin --profile web add ./dsh-weather-0.1.0.tgz
使用
- 点右下角 ☀️ 按钮,输入城市,回车或点「查询」。
- 直接问智能体天气相关问题,例如「上海明天要带伞吗?」
开发
npm install
npm run build # 构建 Host 端和 Client 端到 lib/
npm test # 运行单元测试(node --test)
lib/ 下的构建产物已提交,因此安装插件时无需构建步骤。
数据来源
- 天气:Open-Meteo(免费、无需 API Key)。
- IP 定位:
api.ipapi.is(主),get.geojs.io和ipwho.is(备用)。 - 中文反向地理编码:BigDataCloud。
隐私说明:卡片首次打开时会把你的 IP 发送给第三方定位服务以推断大致城市,不会存储任何数据。
配置
无需任何配置。
License
MIT