Skip to main content

deepseek-harness-desktop/packages/skins/trading

156Stars5Forks6Issues0Watchers

Transforms the DSH Web interface into a stock trading terminal with a red-for-up/green-for-down title bar, scrolling tickers for A-shares, HK, US, crypto, and forex markets, and a market hours status bar. Integrates with dsh-fun-ticker for watchlist management and dsh-longbridge for HK/US stock quotes.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki

ⓘ This plugin is a sub-package of the ningbainb/deepseek-harness-desktop monorepo — stars and activity count the whole repository.

Language
TypeScript
License
BSD-3-Clause
Branch
main
ai-agentai-coding-assistantcodexdeepseekdeepseek-harnessdesktop-appdshdsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add --allow-build=@linxin666/dsh-client-ui-skin-trading github:ningbainb/deepseek-harness-desktop#path:packages/skins/trading

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin ningbainb/deepseek-harness-desktop/packages/skins/trading for me: review the repository at https://github.com/ningbainb/deepseek-harness-desktop first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Transforms the DSH Web GUI into a trading terminal skin: adds a title bar with K-line chart icon and real-time quote tiles at the top, runs a scrolling ticker for A-shares/Hong Kong stocks/US stocks/indices/crypto/forex in the middle, and displays market hours, Longbridge indices, workspace count, and connection status at the bottom. It only manipulates browser DOM and CSS, does not participate in model requests, suitable for regular users who want a trading desk look and want to monitor market movements.

Core Features

  • Inserts a title bar with white candlestick SVG icon at the top, pinned title "交易终端 · DeepSeek 在线", with three desktop controls –/□/× and 3 real-time quote tiles (red for up, green for down color scheme)
  • Renders a scrolling ticker in the middle: real-time quotes for A-shares/Hong Kong stocks/US stocks/indices/crypto/forex, two identical copies for seamless looping, scroll speed adapts to item count
  • Inserts a market hours status bar at the bottom: "盘中/午休/盘前/休市" (open/break/pre-market/closed) status for A-shares/Hong Kong stocks/US stocks, shows Hong Kong and US stock index snapshots when dsh-longbridge is installed (label "长桥"), falls back to public indices when not installed (label "指数")
  • Displays workspace count cell at the end of status bar (aggregates workspace.list every 30 seconds) and "就绪/已连接/在线" (ready/connected/online) connection status cell
  • Adjusts light and dark trading terminal color schemes via stylesheet fixing data-dsh-trading body attribute, and injects brand red K-line favicon
  • Client lifecycle cleaner removes all writes on uninstall: body attribute, three chrome bars, favicon, and restores document title when not externally overridden

Technical Implementation

  • Language: TypeScript + CSS Modules (lightningcss compiled into bundle)
  • Key Dependencies: @deepseek-ai/cordis (ctx.effect lifecycle), @deepseek-ai/dsh-client-connection (workspace.list on client RPC handle), @deepseek-ai/cordis, lightningcss (style compilation), tsdown (bundle generation), vitest (mount/cleanup verification)
  • Architecture Pattern: Inserts ui-skin-trading into Web plugin manifest via DSH bundle patch (cordis.patch.yml); host-side apply() is empty placeholder (runs in host process, skin doesn't participate in host logic), browser-side apply(ctx) mounts DOM/CSS within cordis fiber lifecycle and registers disposer; stylesheet auto-injected with bundle's CSS Modules, removed by loader with entry
  • Entry Files: packages/skins/trading/src/index.ts (host empty entry, 4 lines); packages/skins/trading/src/client/index.ts (browser-side core entry, 370 lines); packages/skins/trading/src/client/quotes.ts (505 lines three-tier data source and parser); packages/skins/trading/src/client/session.ts (91 lines market hours pure functions); packages/skins/trading/src/client/refresh-scheduler.ts (66 lines single timer multi-pace scheduler); packages/skins/trading/src/client/trading.module.css (692 lines theme styles)

Use Cases

Regular users interested in trading atmosphere who want to monitor markets while coding: after switching to "交易终端" (Trading Terminal) skin in DSH Web interface, the title bar and ticker continuously display real-time quotes and red/green price changes for A-shares, Hong Kong stocks, US stocks, crypto and forex; the status bar shows open status for three markets, current workspace count and connection status. The skin doesn't touch the model call chain at all, suitable for users who just want to change their workspace to trading terminal look without changing the conversation experience; it's also the visual carrier for two data plugins dsh-fun-ticker and dsh-longbridge - after installation, the ticker will be replaced with user's watchlist and real Hong Kong/US stock indices.

Prerequisites & Compatibility

DependencyMin VersionDescription
DSHNot declaredNo DSH version or dsh.compatibility declared in package; accesses client mechanism via bundle patch (cordis.patch.yml)
Node.js`^22.19.0
PlatformCross-platformpackage.json marks client as platform: "web", no os or cpu restrictions declared; interface data fetched on browser side, no platform branches
Native ModulesNoneNo runtime native module dependencies; DOM changes, quote parsing, and hours calculation all done in browser TypeScript

Installation

dsh plugin --profile web add github:ningbainb/deepseek-harness-desktop/packages/skins/trading

Configuration

No additional configuration required. No user configuration reading logic or Schema fields found in source code; skin enablement is handled by skin management process (dsh-skin use trading), after enabling, client lifecycle automatically manages DOM/CSS mount and cleanup.

FAQ

Q: Does this skin affect model requests or conversations?

A: No. The package explicitly states it only changes browser DOM and CSS, doesn't assemble or send any provider requests, doesn't subscribe to any model events; the skin has zero intrusion into the model call chain.

Q: Where does the ticker's quote data come from? Is fun-ticker required?

A: Not required. The skin has a three-tier data source: when dsh-fun-ticker is installed, the ticker directly follows the watchlist (via same-origin proxy /plugins/dsh-ticker/api, host side proxies Binance/Frankfurter/eastmoney/Sina sources); when dsh-longbridge is installed, the status bar index cell uses broker snapshots (loopback RPC /longbridge panel/snapshot); when neither is installed, falls back to public endpoints, browser directly pulls from Tencent qt.gtimg.cn (A/HK/US stocks script-tag), Binance 24h ticker, Frankfurter ECB exchange rates. Any layer failure safely degrades to -- cell.

Q: No interface change after installation, what to do?

A: Installing the skin package doesn't automatically select the skin. Run dsh-skin use trading in repository root to switch; only one skin can be active at a time, mutual exclusion handled by disabled: true line in profile layer cordis.patch.yml, switching uses HMR hot reload, no restart needed.

Q: Are the status bar indices real-time quotes?

A: When dsh-longbridge is installed, they are its broker snapshots; when not installed, they are public indices refreshed every 30 seconds; when both plugins are not installed and public endpoints are unreachable, all index cells fall back to --.

Q: Is "工作区 --" normal?

A: Normal. This cell depends on workspace.list RPC on client connection handle; when connection handle is unavailable or RPC fails, safely degrades to --, doesn't affect other cells' rendering.

Q: What happens when public quote sites are network blocked?

A: Terminal chrome still displays normally, ticker/status bar/workspace cell all fall back to --. All fetch paths have 5-8 second timeout and try/catch protection, the skin won't throw errors or crash the dsh main interface.

Q: Are market hours (盘中/午休/盘前/休市) accurate?

A: Accurate to weekday and hour level: A-shares 09:30-11:30 and 13:00-15:00 (break 11:30-13:00), Hong Kong stocks 09:30-12:00 and 13:00-16:00, US stocks 04:00-09:30 pre-market + 09:30-16:00 regular. Documentation clearly states exchange holidays are still treated as open, which is expected limitation rather than bug.

Q: Will there be page traces after closing or switching skins?

A: No. The client-registered lifecycle cleaner removes body attribute, title bar, ticker, status bar and favicon; if document title still equals the string written by skin, restores original title, won't be rolled back when overridden by session title. Tests cover mount, cleanup and "don't clear session title" three scenarios.

Ease of Use

Beginner — just install the package and run dsh-skin use trading to take effect, no configuration items or command line parameters; default skin has complete functionality, the only optional advanced operation is replacing ticker with custom stocks (install dsh-fun-ticker and configure) or replacing indices with broker snapshots (install dsh-longbridge and log in).

Known Issues & Limitations

  • Loading page remains unchanged: DSH shell's startup page renders before plugin bundle, skin takes effect from finalized UI
  • Theme switching inside skin: skin pins its own palette under both data-ds-dark-theme states; switching Appearance gives light/dark terminal color scheme, not non-skin appearance
  • Market hours only modeled by weekday and hour, exchange holidays still show as open
  • US stock quotes via Tencent source are only NYSE/Nasdaq regular hours口径, crypto and forex show 24/7
  • Default watchlist (DEFAULT_TAPE) has ~13 items, ticker uses this fixed set when dsh-fun-ticker is not installed

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/ningbainb/deepseek-harness-desktop/packages/skins/trading)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory