FeiZhuNiU-INFJA/dsh-stock-ticker 预览 preview

FeiZhuNiU-INFJA/dsh-stock-ticker

插件Plugin 原生Native ⭐ 3 MIT 其他Other

dsh-plugin: floating semi-transparent market ticker for DeepSeek Harness — 上证指数 / 创业板指 / 科创50 / 恒生科技

项目介绍Project Overview

dsh-stock-ticker 是 DSH 的悬浮行情插件,在页面右上角呈现一个可拖拽、可收起的半透明小窗,实时展示上证、创业板、科创 50、恒生科技等核心指数的点位与涨跌幅,背景跟随 DSH 主题色,红涨绿跌,每 5 秒自动刷新。适合盯盘时随时查看大盘走势。注意:行情数据通过腾讯免费接口(qt.gtimg.cn)抓取,依赖外网与 DSH 的 shell/curl 服务可用性,网络异常时窗口会显示获取失败。

dsh-stock-ticker is a DSH floating market widget that places a draggable, collapsible, semi-transparent panel at the top-right of the page, showing live price and change percentage for the Shanghai Composite, ChiNext, STAR 50, and Hang Seng Tech indices. The background follows the DSH theme with red-up/green-down coloring, and data refreshes every 5 seconds. Use it for at-a-glance market monitoring while working. Note: quotes are fetched from Tencent's free endpoint via DSH's shell+curl service, so availability depends on outbound network access; failures surface as a fetch error.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:FeiZhuNiU-INFJA/dsh-stock-ticker

FeiZhuNiU-INFJA/dsh-stock-ticker 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

🧩 dsh-stock-ticker

DeepSeek Harness 的一个悬浮行情插件:在页面右上角显示一个可拖拽、可收起的半透明小窗,实时展示 A 股与港股核心指数。

MIT License dsh-plugin

📸 预览

dsh-stock-ticker 悬浮行情

✨ 功能

  • 悬浮窗口,可拖拽可收起
  • 背景跟随 DeepSeek Harness 主题色(80% 透明度),红涨绿跌、锐利配色
  • 每 5 秒自动刷新
  • 每个指数只显示两项:当前点位 + 涨跌幅

显示的指数:

指数 代码
上证指数 000001
创业板指 399006
科创50 000688
恒生科技 HSTECH

🚀 安装

作为常驻 bundle 安装,随 DSH 启动自动加载、重启不消失:

dsh plugin --profile web add github:FeiZhuNiU-INFJA/dsh-stock-ticker

装完重启 DSH(或选择「立即重启」),页面右上角即出现悬浮行情窗。

结构遵循社区 dsh-plugin 约定:dsh.bundle.patch 指向 cordis.patch.yml,Host 入口 lib/index.js 注册同源路由 /dsh-stock-ticker/quotes(内部用 shell + curl 抓取腾讯行情),Client bundle lib/client.js 渲染悬浮窗并每 5 秒轮询该路由。

🗂️ 代码结构

dsh-stock-ticker/
├── lib/index.js    # Host 包入口:注册 /dsh-stock-ticker/quotes 路由
├── lib/client.js   # Client bundle:悬浮窗 UI + 5s 轮询
├── host.js         # 动态插件形式的 Host 半区(可选)
├── client.js       # 动态插件形式的 Client 半区(可选)
├── package.json    # 包清单(dsh bundle + client 声明)
├── cordis.patch.yml  # bundle patch:插入插件行
├── assets/screenshot.png  # README 预览截图
├── LICENSE
└── README.md

🔌 数据源

  • 接口:https://qt.gtimg.cn/q=sh000001,sz399006,sh000688,hkHSTECH
  • 免费、无需鉴权,返回纯文本的 ~ 分隔行
  • Host 侧通过 shell 服务执行 curl 抓取(DSH 默认部署未注册 web fetch provider,因此不走 web.fetch

🧪 动态插件(可选,临时体验)

不落盘、临时载入的动态插件方式,适合快速体验:

  1. 让 agent 用动态插件工具 cordis_define 创建插件:

    • code.hosthost.js 的整段内容
    • code.clientclient.js 的整段内容
  2. cordis_run 激活;客户端首次运行需要在审批卡片里点「允许」。

  3. 刷新页面后即出现悬浮行情窗。

两个文件里的代码就是 cordis_definecode.host / code.client 函数体,直接整段复制即可。

📄 License

MIT

上一个 Prev dsh-friendly-steps 下一个 Next dsh-chat-tools