Files
Jason Lee 0add508ae2 feat: add Skill page with interactive demo (#376)
## Summary

- **New `/skill` page** with full trilingual support (en / zh-CN /
zh-HK)
- **Interactive chat demo**: 4 scenarios (Live Quote, Portfolio,
Subscription, Earnings) × 5 AI clients (OpenClaw, ChatGPT, Claude,
Claude Code, Codex) with typewriter animation
- **Rich response rendering**: tables with Shadcn-style borders, mini
SVG sparkline charts, syntax-highlighted code blocks
- **Scenario cards section** below the demo describing use cases
- **Nav update**: Skill link added to all three locale nav configs

## Bug Fixes

- **Syntax highlighter**: replaced chained-regex approach with a
single-pass tokenizer. The old code ran number → keyword → string
regexes sequentially on the same string — the keyword regex matched
`class` inside generated `<span class="hl-n">` attributes, and the
string regex matched `"hl-n"` as a string literal, corrupting the HTML
structure entirely
- **v-html routing**: replaced `currentMessages[2]?.rich` template
condition with an explicit `isRichResponse` ref set in `runAnimation()`
to prevent incorrect branch selection when switching client tabs

## Test plan

- [ ] Visit `/skill`, `/zh-CN/skill`, `/zh-HK/skill` — page loads in all
locales
- [ ] Click through all 4 scenario tabs — animation plays correctly for
each
- [ ] Click through all 5 client tabs — correct message shown, Claude
Code tab shows syntax-highlighted code (not raw HTML)
- [ ] Verify sparkline charts render in the Live Quote / OpenClaw
scenario
- [ ] Verify table borders render correctly (outer border + row
dividers, no missing bottom border)
- [ ] Verify gain/loss values show green/red colors in tables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 20:03:14 +08:00

4.0 KiB

sidebar, title, description, id, layout
sidebar title description id layout
false SDK Supports multiple programming languages and provides SDK sdk home

:::warning Package Renamed The SDK package has been renamed from longport to longbridge. The old longport package is deprecated. If you were previously using longport, please uninstall it before installing the new package. :::

Longbridge OpenAPI SDK for Python

https://github.com/longbridge/openapi/tree/master/python

Install SDK

You can install the SDK via Pip, or directly visit the PyPI page to download.

$ pip install longbridge

NOTE: In macOS system, the pip command default is Python 2. You may use pip3 for use Python 3 version of PyPI.

API Documents

Examples

Longbridge OpenAPI SDK for Node.js

https://github.com/longbridge/openapi/tree/master/nodejs

Install SDK

You can install the SDK via Npm.

$ npm install longbridge --save

https://www.npmjs.com/package/longbridge

API Documents

Examples

Longbridge OpenAPI SDK for Rust

https://github.com/longbridge/openapi/tree/master/rust

Install SDK

Add the following line to your Cargo.toml file

[dependencies]
longbridge = "4.0.5"

https://crates.io/crates/longbridge

API Documents

Examples

Longbridge OpenAPI SDK for Java

https://github.com/longbridge/openapi/tree/master/java

Install SDK

Add the following line to your pom.xml file

<dependency>
  <groupId>io.github.longbridge</groupId>
  <artifactId>openapi-sdk</artifactId>
  <version>4.0.5</version>
</dependency>

https://search.maven.org/artifact/io.github.longbridge/openapi

API Documents

Examples

Longbridge OpenAPI SDK for Go

https://github.com/longbridge/openapi-go

Install SDK

  • Go version >= 1.17

In your project directory, run:

$ go get github.com/longbridge/openapi-go

https://pkg.go.dev/github.com/longbridge/openapi-go

Examples

Longbridge OpenAPI SDK for C/C++

https://github.com/longbridge/openapi/tree/master/cpp

Download

API Documents

Examples

<style scoped> h2 { border: 0; margin-top: 0; padding-top:0; } </style>