Commit Graph

793 Commits

Author SHA1 Message Date
Jason Lee e9ec8572bf docs: rewrite README for users and CONTRIBUTING for AI agents (#387)
## Summary

- **README.md**: rewrote as a user/visitor-facing introduction — covers
what you can build, all five access methods (SDK / HTTP / CLI / MCP /
Skill) in a comparison table, quick start examples, market coverage,
documentation links, and LLM-friendly URL patterns
- **CONTRIBUTING.md**: rewrote as an AI-agent-oriented guide covering
the full repository structure, three-language rule, frontmatter format,
sidebar auto-generation, API reference / openapi.yaml workflow, AI Skill
update guidance, i18n locale config, route rewriting, related
repositories (longbridge/openapi, longbridge/openapi-go,
longbridge/longbridge-terminal), and a PR checklist

## Test plan

- [ ] Verify README renders correctly on GitHub (headings, tables, code
blocks)
- [ ] Verify CONTRIBUTING renders correctly on GitHub
- [ ] Confirm all links in README point to valid URLs

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:38:40 +08:00
Jason Lee 8f2d4689dd docs: add OAuth 2.0 auth flow to skill install guide, remove API Key references (#386)
## Summary

- Add OAuth 2.0 authorization section to all three locale Skill install
pages (en / zh-CN / zh-HK), covering: trigger flow, explicit `longbridge
login`, token cache location, and revocation
- Add "Updating the Skill" section noting that `longbridge.zip` is
updated periodically
- Update FAQ entries to point to OAuth 2.0 flow instead of mentioning
API Token
- Remove Legacy API Key sections from `skills/longbridge` references:
`setup.md`, `python-sdk/overview.md`, `rust-sdk/overview.md`, `mcp.md`
(Self-Hosted Binary section removed)
- Fix Rust SDK "Creating Contexts" example to use `Config::from_oauth`
instead of `Config::from_apikey_env`

## Test plan

- [ ] Verify install pages render correctly in all three locales
- [ ] Confirm no remaining references to API Key / API Token in skill
install docs
- [ ] Confirm OAuth 2.0 flow steps are accurate and complete

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:31:19 +08:00
Jason Lee e3bbf4dec6 feat: improve longbridge skill for investment analysis (#385)
## Summary

- Expand `longbridge` skill description to trigger on investment
analysis requests (not just developer tasks like CLI/SDK usage)
- Add **Investment Analysis Workflow** section guiding Claude to use
Longbridge CLI for news, filings, and community topics before falling
back to WebSearch
- Move setup/auth/rate-limit docs to `references/setup.md` to keep
SKILL.md lean
- Move OG meta tags from static locale configs to dynamic per-page
generation in `config.mts`

## Test plan

- [ ] Verify skill triggers on natural language stock analysis queries
(e.g. "分析持仓", "ARM 昨天表现")
- [ ] Verify `longbridge news` / `news-detail` / `filing-detail`
commands are used before WebSearch in analysis workflow
- [ ] Verify OG tags render correctly per page after config.mts change

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 11:40:54 +08:00
Jason Lee b74f40145c docs: add Community content API docs (my-topics, create-topic) (#384)
## Summary

- Add `my_topics` and `create_topic` API reference pages in all 3
locales (en/zh-CN/zh-HK), using `<SDKLinks>` + `<Tabs>` pattern with
CLI, Python, Python async, Node.js, Java, Rust, C++, Go examples
- Rename Content sidebar category → **Community** across all locales
- Rename `security_topics` page title → "Get Community Topics by Symbol"
- Add Community content section to `cli.md` (all locales)
- Update `openapi.yaml`: add `x-codeSamples` for `list_my_topics` and
`create_topic`, fix `create_topic` schema (`title` not required at
schema level), move all community endpoints to `Community` tag
- Update CLI skill overview with `longbridge update` command details

## Key design notes

- `create_topic` page includes an article/post comparison table
explaining title requirement and body format differences
- SDK method signatures verified from source code
(`/Users/jason/work/openapi/`)

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:52 +08:00
Jason Lee 43b364794f docs: restructure Skill install guide with universal methods first
Reorganize the install page to lead with client-agnostic methods (ZIP
download and npx/bunx CLI) before client-specific setup guides. Adds
-g/-y flag explanations, bunx alternative, and replaces OpenClaw slash
command with a natural-language zip install instruction to prevent AI
misinterpretation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 14:54:47 +08:00
Jason Lee 920dbcf5ef docs: Update Skill install message to use .md. 2026-03-25 11:45:17 +08:00
Jason Lee 9476486b64 feat: integrate API appendix into API Reference, remove redundant docs (#383)
## Summary

- 将 HTTP API 认证/错误码文档通过 `x-pages` 扩展嵌入 `openapi.yaml`,在 `/docs/api/`
侧边栏展示为独立信息页
- 更新 `ApiReference.vue`:解析 `x-pages`、侧边栏展示、URL 状态管理、中英文切换
- 将 Socket 文档从 `api-reference/socket/` 移至独立类目 `socket/`(三语言,URL 不变)
- 删除已合并的冗余文档(12 个文件:3 语言 × 4 文件)

## Test Plan

- [ ] 访问 `/docs/api/`,侧边栏顶部显示 Authentication 和 Error Codes
- [ ] 点击 Authentication,展示合并后的 OAuth 2.0 认证内容
- [ ] 点击 Error Codes,展示错误码表格
- [ ] URL 状态:`?page=authentication` / `?page=error-codes`
正确写入,浏览器前进/后退正常
- [ ] 中文路由 `/zh-CN/docs/api` 侧边栏显示 认证 / 错误码
- [ ] Socket 页面(如 `/socket/hosts`)仍可正常访问
- [ ] 侧边栏 API 附录 类目已消失

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 22:13:20 +08:00
Jason Lee 6a4b543645 docs: Add openapi.yaml (#382)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 21:37:42 +08:00
Jason Lee d7bf3369f6 Fix AI bubble background style in dark mode. 2026-03-24 13:47:37 +08:00
Floyd Wang 35821a9ee7 fix: use --vp-button-brand-text for Skill component white text (#381)
## Summary

- 将 `.skill-btn-primary` 的 `color: #fff` 替换为
`var(--vp-button-brand-text) !important`,修复文字颜色被 VitePress 链接样式覆盖的问题
- 同步将文件内其他两处硬编码 `#fff` 和无效的 `--vp-c-white` 统一替换为
`--vp-button-brand-text`

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

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:02:55 +08:00
Jason Lee f8de020b1d fix: improve "more" indicator in Skill.vue supported AI tools (#380)
## Summary
- 移除 `skill-client-chip` 类,消除"更多"文字的按钮样式(背景/边框/内边距)
- 文案从 `更多...` 改为 `等更多` / `& more`,语义更准确(表示"以及其他更多 AI 工具")
- 样式调整:保留字体大小对齐,去掉 `!important`,添加 `align-self: center`

## Test plan
- [ ] 查看 Skill 页面 hero 区域,确认"等更多"显示为普通文本而非按钮样式
- [ ] 检查英文版显示为"& more"

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 10:47:34 +08:00
Jason Lee ea373ea17b Update skill to install cli. 2026-03-23 22:22:13 +08:00
Jason Lee c4dd3714c4 Revert skill paths. 2026-03-23 22:07:48 +08:00
Jason Lee 7a07e916c0 docs: clarify manual-only install for Claude.ai and ChatGPT (#379)
## Summary

- Add blockquote notes to the Claude.ai and ChatGPT sections explaining
that automated installation is not possible due to sandboxed execution
environments
- Claude.ai restricts outbound access to a fixed domain whitelist;
ChatGPT similarly cannot auto-install Skills during a conversation
- Users are directed to the manual download/upload flow in both cases

## Test plan

- [ ] Verify blockquote notes render correctly in all three locales (en,
zh-CN, zh-HK)

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:02:41 +08:00
Jason Lee 67e3857f58 docs: add skills.sh and GitHub links to OpenClaw install section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 21:42:04 +08:00
Jason Lee e18f7061fc docs: Fix incorrect install skill command. 2026-03-23 21:31:45 +08:00
Jason Lee ad5c458345 chore: Fix release script to update zip. 2026-03-23 21:14:55 +08:00
Jason Lee e03897ccd8 Fix breadcrumb on single page. (#378) 2026-03-23 12:55:44 +00:00
Jason Lee 5305d8cfc2 docs: fix CN region API host to use openapi.longbridge.cn (#363)
## Summary

- Update CN-specific API host from `openapi.longbridge.com` to
`openapi.longbridge.cn` across all language versions (zh-CN, zh-HK, en)
- Affected files: `getting-started.md`, `how-to-access-api.md`,
`refresh-token-api.md`
- Global (non-CN) host `openapi.longbridge.com` remains unchanged

## Test plan

- [ ] Verify CN region docs show `openapi.longbridge.cn`
- [ ] Verify global/production docs still show `openapi.longbridge.com`

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

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 20:53:36 +08:00
Jason Lee c032ae2e83 Fix skill path 404 (#377) 2026-03-23 20:53:05 +08:00
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
Sunli bf9a3544ec feat: add ContentContext to Python SDK skills and fix missing filings method
- Add ContentContext/AsyncContentContext to imports and Sync vs Async table in overview.md
- Add new content-context.md documenting news() and topics() methods with NewsItem/TopicItem fields
- Add missing filings() method to quote-context.md
2026-03-23 19:14:07 +08:00
Sunli fbf171fcb9 docs: add C++ OAuth config example to getting-started
Add C++ tab to the OAuth authorization section in getting-started
across zh-CN, en, and zh-HK.
2026-03-23 19:08:36 +08:00
Sunli 7067a8bf78 docs: add C++ examples to all getting-started scenarios
Add C++ tab for account balance, subscribe quote, submit order,
and today orders across zh-CN, en, and zh-HK.
2026-03-23 19:08:36 +08:00
Sunli 744a368119 docs: update C++ ContentContext examples to synchronous style
ContentContext::create(config) now returns synchronously in 4.0.5,
same as QuoteContext and TradeContext. Updated 6 files across
zh-CN, en, and zh-HK.
2026-03-23 19:08:36 +08:00
Sunli 5b3b3e006d docs: add Python (async) examples to getting-started scenarios 2026-03-23 19:08:36 +08:00
Sunli 5f1306f9a1 fix: remove extra blank lines in Python async code examples 2026-03-23 19:08:36 +08:00
Sunli cef44568c7 docs: add Python (async) tab to all SDK code examples
Add AsyncQuoteContext/AsyncTradeContext/AsyncContentContext examples
alongside existing sync Python examples, covering all 143 API pages
across zh-CN, en, and zh-HK.
2026-03-23 19:08:36 +08:00
Sunli 9f491a5951 fix: use absolute path for unocss configFile to resolve lookup error 2026-03-23 19:08:36 +08:00
Sunli b6cb147b28 docs: update SDK version references from 4.0.0 to 4.0.5 2026-03-23 19:08:36 +08:00
Sunli c35b055bfb docs: reindent all C++ examples to 4-space indentation 2026-03-23 19:08:36 +08:00
Sunli f3e3a88004 docs: update C++ examples for v4.0.5 synchronous context creation
Replace nested callback pattern with synchronous style:
- Old: QuoteContext::create(config, [](auto res) { res.context().method(...) })
- New: QuoteContext ctx = QuoteContext::create(config); ctx.method(...)

Extract API calls into a run() helper function following the new
SDK example convention. Updated 134 files across zh-CN, en, zh-HK.
2026-03-23 19:08:36 +08:00
Sunli 5f35581aec docs: update SDK examples for v4.0.5 context creation API changes
QuoteContext/TradeContext/ContentContext construction is now synchronous
and infallible in v4.0.5:
- Rust: try_new(config).await? -> new(config)
- Node.js: await QuoteContext.new(config) -> QuoteContext.new(config)
- Java: QuoteContext.create(config).get() -> QuoteContext.create(config)

Updated 143 files across zh-CN, en, and zh-HK docs.
2026-03-23 19:08:36 +08:00
Jason Lee 16bb6bd0fa feat: add longbridge skills, update repo URLs to longbridge/developers (#375)
## Summary

- Add `skills/longbridge` skill files covering CLI, Python/Rust SDK,
MCP, and LLM integration
- Update `npx skills add` command in `cli.md` (en/zh-CN/zh-HK) from
`longbridge/longbridge-terminal` to `longbridge/developers`
- Update project GitHub repo references from
`longbridge/developers-website` to `longbridge/developers` in
`config.mts` and `CONTRIBUTING.md`

## Test plan

- [ ] Verify skill files are accessible via `npx skills add
longbridge/developers`
- [ ] Verify "Edit this page" links in the site point to the correct
GitHub repo
- [ ] Verify CLI docs show the correct skill install command

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

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 17:28:46 +08:00
Sunli b9a57cf9e6 docs: update API examples across quote and trade documentation 2026-03-20 22:51:13 +08:00
Sunli 5883678913 fix: add missing tbody wrapper to quote coverage table to fix hydration warning 2026-03-20 15:19:57 +08:00
Sunli 0758eaa0c8 docs: add PowerShell tab for OAuth client registration curl commands 2026-03-20 15:18:35 +08:00
Sunli 3f04b7aeab docs: update OAuth token storage path to ~/.longbridge/openapi/tokens/ 2026-03-20 15:05:39 +08:00
Sunli e3699a0759 docs: add .cn domain endpoints for mainland China access 2026-03-20 14:58:07 +08:00
hogan 74f2f406aa Add security filings (#372)
Co-authored-by: 袁章洪 <zhanghong.yuan@longbridge-inc.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2026-03-20 10:59:50 +08:00
hold-baby 291a0fd908 upgrade customer service components to version 1.0.7 (#374)
Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-03-19 22:58:41 +08:00
hold-baby e1aa24caa9 upgrade customer service components to version 1.0.6 (#373)
Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-03-19 00:30:34 +08:00
hold-baby cbc95e26f5 Revert "feat: remove customer service widget (#368)" (#371)
This reverts commit 961260f85f.

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-03-18 17:53:32 +08:00
Jason Lee f8bfa2b6ef fix footer. 2026-03-18 15:13:05 +08:00
Jason Lee 9467cdfde5 Fix assets (#370) 2026-03-18 15:00:54 +08:00
Jason Lee e7e9a2d1ba feat: Update platform name to Longbridge Developers and UI improvements (#369)
## Summary

- Rename project from "OpenAPI" to "Longbridge Developers" across all
locales, config, and docs
- Add local SVG assets for homepage features (replacing external CDN
URLs)
- **TipContainer**: replace emoji with SVG icons, Shadcn-style
border/bg/text per type using `data-type` + CSS `@apply`
- **Tabs**: improved tab styling, fix `ul`/`ol` indentation in tab
content
- **Sidebar**: active item uses brand color background (color-mix) with
rounded corners
- **Doc footer**: LLMs Text + Edit this page on same row, subdued
colors, lighter "Updated at"
- **Breadcrumb**: remove primary color
- **UserMenu**: rename Profile → Dashboard (控制台)
- **Style**: inline code color fix, blockquote updates, font
improvements

## Test plan

- [ ] Verify rename appears correctly in EN / zh-CN / zh-HK locales
- [ ] Check homepage SVGs load from `/assets/`
- [ ] Check TipContainer all 6 types render with correct
border/bg/text/icon colors in light and dark mode
- [ ] Check Tabs styling and list indentation
- [ ] Check sidebar active item background
- [ ] Check doc footer layout (LLMs Text + Edit this page same row)

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 14:35:26 +08:00
hold-baby 961260f85f feat: remove customer service widget (#368)
Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-03-18 10:08:45 +08:00
hold-baby 9391748947 feat: update support-widget version to 1.0.5 (#367)
Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-03-17 23:52:38 +08:00
hold-baby 5d4c095101 feat: 添加客服入口 support-widget (#365)
- 动态加载 support-widget 脚本
- 配置 isLoggedIn、loginUrl、chatUrl
- 处理 token 编码和 null 场景

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-03-17 23:32:38 +08:00
Jason Lee c6a8731733 docs: add company filings commands and earnings analysis example to CLI docs (#364)
## Summary

- Add `filings` and `filing-detail` commands to the "Available
capabilities" section across all three locales (en, zh-CN, zh-HK)
- Add an earnings analysis example in the "AI integration" section
demonstrating a two-step workflow: use `filings` to discover filing IDs,
then `filing-detail` to pull full content for cross-company comparison
(TSLA vs NVDA Q4 2025)

## Test plan

- [ ] Verify the new "Company filings & announcements" section renders
correctly in all three locales
- [ ] Verify the earnings analysis example code block displays properly
- [ ] Check that table formatting renders correctly in the example
output

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

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 22:55:24 +08:00