- 将 App.jsx 中的 useState 迁移到 5 个 Zustand stores - useRuntimeStore: 连接状态、运行时配置 - useMarketStore: 市场数据、股票价格 - usePortfolioStore: 组合、持仓、交易 - useAgentStore: Agent 技能,工作区 - useUIStore: UI 状态、视图切换 - 保留 tickers useState(需与 INITIAL_TICKERS 同步) - 恢复 newsApi.js 和 tradingApi.js Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
QuickStart
cd frontend
npm install
npm run dev
Optional Direct Service Calls
The frontend still works with the compatibility backend entrypoint by default. In the current test-stage setup, split services are the recommended default. Point the frontend directly at those standalone services:
VITE_CONTROL_API_BASE_URL=http://localhost:8000/api
VITE_RUNTIME_API_BASE_URL=http://localhost:8003/api/runtime
VITE_NEWS_SERVICE_URL=http://localhost:8002
VITE_TRADING_SERVICE_URL=http://localhost:8001
Current direct-call coverage:
- runtime panel + gateway port discovery
storysimilar daysrange explainnews for datenews categories
If these variables are not set, the frontend falls back to the existing WebSocket-driven compatibility flow.