dsh-weather
界面增强 活跃维护

dsh-weather

XCKjacksparrow/dsh-weather

提供可自由拖拽定位的悬浮天气卡片,同时开放可被大模型直接调用的天气查询接口,部署后即可快速获取对应地区的实时天气数据,适配Web端界面使用。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
43 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:XCKjacksparrow/dsh-weather
git clone https://github.com/XCKjacksparrow/dsh-weather.git
git clone git@github.com:XCKjacksparrow/dsh-weather.git
README.md master

dsh-weather

Weather forecast for the DeepSeek Harness web GUI. A draggable floating weather card in the bottom-right corner, plus a model-callable weather tool — with playful easter eggs. Weather data comes from Open-Meteo (free, no API key).

Features

  • Floating weather card — a ☀️ button in the bottom-right opens a draggable card showing current conditions and a 3-day forecast.
  • Auto-locate by IP — on first open, the card locates your city from your IP and resolves a Chinese name (e.g. 南京); it falls back to 北京 if that fails.
  • Search any city — Chinese or English names, e.g. 北京 / 上海 / New York / Tokyo.
  • Model tool — the agent answers "北京明天天气" / "上海要带伞吗" by calling the weather tool directly.
  • Easter eggs 🍬 — weather one-liners (sunny = "宜摸鱼忌加班", ≥35° = "出门五分钟流汗两小时") and city-specific jokes (南极 = "企鹅比人多,出门记得带鱼").
  • Theme-aware — uses Harness design tokens, so it follows light/dark mode.

Install

dsh plugin --profile web add https://github.com/XCKjacksparrow/dsh-weather/archive/refs/tags/v0.1.0.tar.gz

Then restart dsh web so the Host and the browser client load the plugin.

Install from a local build

npm run build
npm pack
dsh plugin --profile web add ./dsh-weather-0.1.0.tgz

Usage

  • Click the ☀️ button in the bottom-right, type a city, and press Enter or 查询.
  • Ask the agent anything weather-related, e.g. "上海明天要带伞吗?"

Development

npm install
npm run build   # build host + client bundles into lib/
npm test        # run the unit tests (node --test)

Built files under lib/ are committed, so installing the plugin does not require a build step.

Data sources

  • Weather: Open-Meteo — free, no API key.
  • IP geolocation: api.ipapi.is (primary), then get.geojs.io and ipwho.is (fallbacks).
  • Chinese reverse geocoding: BigDataCloud.

Privacy: the widget sends your IP to a third-party geolocation service once, on first open, to infer an approximate city. Nothing is stored.

Configuration

No configuration required.

License

MIT