Rick
7eebb4e218
Dev backtest ( #1134 )
2025-11-28 21:34:27 +08:00
0xYYBB | ZYY | Bobo
8dffff60a2
feat(lighter): 完整集成 LIGHTER DEX - SDK + 前端配置 UI ( #1085 )
...
* feat(trader): add LIGHTER DEX integration (initial implementation)
Add pure Go implementation of LIGHTER DEX trader following NOFX architecture
Features:
- ✅ Account management with Ethereum wallet authentication
- ✅ Order operations: market/limit orders, cancel, query
- ✅ Position & balance queries
- ✅ Zero-fee trading support (Standard accounts)
- ✅ Up to 50x leverage for BTC/ETH
Implementation:
- Pure Go (no CGO dependencies) for easy deployment
- Based on hyperliquid_trader.go architecture
- Uses Ethereum ECDSA signatures (like Hyperliquid)
- API base URL: https://mainnet.zklighter.elliot.ai
Files:
- lighter_trader.go: Core trader structure & auth
- lighter_orders.go: Order management (create/cancel/query)
- lighter_account.go: Balance & position queries
Status: ⚠️ Partial implementation
- ✅ Core structure complete
- ⏸️ Auth token generation needs implementation
- ⏸️ Transaction signing logic needs completion
- ⏸️ Config integration pending
Next steps:
1. Complete auth token generation
2. Add to config/exchange registry
3. Add frontend UI support
4. Create test suite
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* feat: Add LIGHTER DEX integration (快速整合階段)
## 🚀 新增功能
- ✅ 添加 LIGHTER DEX 作為第四個支持的交易所 (Binance, Hyperliquid, Aster, LIGHTER)
- ✅ 完整的數據庫配置支持(ExchangeConfig 新增 LighterWalletAddr, LighterPrivateKey 字段)
- ✅ 交易所註冊與初始化(initDefaultData 註冊 "lighter")
- ✅ TraderManager 集成(配置傳遞邏輯完成)
- ✅ AutoTrader 支持(NewAutoTrader 添加 "lighter" case)
## 📝 實現細節
### 後端整合
1. **數據庫層** (config/database.go):
- ExchangeConfig 添加 LIGHTER 字段
- 創建表時添加 lighter_wallet_addr, lighter_private_key 欄位
- ALTER TABLE 語句用於向後兼容
- UpdateExchange/CreateExchange/GetExchanges 支持 LIGHTER
- migrateExchangesTable 支持 LIGHTER 字段
2. **API 層** (api/server.go, api/utils.go):
- UpdateExchangeConfigRequest 添加 LIGHTER 字段
- SanitizeExchangeConfigForLog 添加脫敏處理
3. **Trader 層** (trader/):
- lighter_trader.go: 核心結構、認證、初始化
- lighter_account.go: 餘額、持倉、市場價格查詢
- lighter_orders.go: 訂單管理(創建、取消、查詢)
- lighter_trading.go: 交易功能實現(開多/空、平倉、止損/盈)
- 實現完整 Trader interface (13個方法)
4. **Manager 層** (manager/trader_manager.go):
- addTraderFromDB 添加 LIGHTER 配置設置
- AutoTraderConfig 添加 LIGHTER 字段
### 實現的功能(快速整合階段)
✅ 基礎交易功能 (OpenLong, OpenShort, CloseLong, CloseShort)
✅ 餘額查詢 (GetBalance, GetAccountBalance)
✅ 持倉查詢 (GetPositions, GetPosition)
✅ 訂單管理 (CreateOrder, CancelOrder, CancelAllOrders)
✅ 止損/止盈 (SetStopLoss, SetTakeProfit, CancelStopLossOrders)
✅ 市場數據 (GetMarketPrice)
✅ 格式化工具 (FormatQuantity)
## ⚠️ TODO(完整實現階段)
- [ ] 完整認證令牌生成邏輯 (refreshAuthToken)
- [ ] 完整交易簽名邏輯(參考 Python SDK)
- [ ] 從 API 獲取幣種精度
- [ ] 區分止損/止盈訂單類型
- [ ] 前端 UI 支持
- [ ] 完整測試套件
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* feat: 完整集成 LIGHTER DEX with SDK
- 集成官方 lighter-go SDK (v0.0.0-20251104171447-78b9b55ebc48)
- 集成 Poseidon2 Goldilocks 簽名庫 (poseidon_crypto v0.0.11)
- 實現完整的 LighterTraderV2 使用官方 SDK
- 實現 17 個 Trader 接口方法(賬戶、交易、訂單管理)
- 支持雙密鑰系統(L1 錢包 + API Key)
- V1/V2 自動切換機制(向後兼容)
- 自動認證令牌管理(8小時有效期)
- 添加完整集成文檔 LIGHTER_INTEGRATION.md
新增文件:
- trader/lighter_trader_v2.go - V2 核心結構和初始化
- trader/lighter_trader_v2_account.go - 賬戶查詢方法
- trader/lighter_trader_v2_trading.go - 交易操作方法
- trader/lighter_trader_v2_orders.go - 訂單管理方法
- LIGHTER_INTEGRATION.md - 完整文檔
修改文件:
- trader/auto_trader.go - 添加 LighterAPIKeyPrivateKey 配置
- config/database.go - 添加 API Key 字段支持
- go.mod, go.sum - 添加 SDK 依賴
🤖 Generated with Claude Code
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* feat(lighter): 實現完整 HTTP 調用與動態市場映射
### 實現的功能
#### 1. submitOrder() - 真實訂單提交
- 使用 POST /api/v1/sendTx 提交已簽名訂單
- tx_type: 14 (CREATE_ORDER)
- 價格保護機制 (price_protection)
- 完整錯誤處理與響應解析
#### 2. GetActiveOrders() - 查詢活躍訂單
- GET /api/v1/accountActiveOrders
- 使用認證令牌 (Authorization header)
- 支持按市場索引過濾
#### 3. CancelOrder() - 真實取消訂單
- 使用 SDK 簽名 CancelOrderTxReq
- POST /api/v1/sendTx with tx_type: 15 (CANCEL_ORDER)
- 自動 nonce 管理
#### 4. getMarketIndex() - 動態市場映射
- 從 GET /api/v1/orderBooks 獲取市場列表
- 內存緩存 (marketIndexMap) 提高性能
- 回退到硬編碼映射(API 失敗時)
- 線程安全 (sync.RWMutex)
### 技術實現
**數據結構**:
- SendTxRequest/SendTxResponse - sendTx 請求響應
- MarketInfo - 市場信息緩存
**並發安全**:
- marketMutex - 保護市場索引緩存
- 讀寫鎖優化性能
**錯誤處理**:
- API 失敗回退機制
- 詳細日誌記錄
- HTTP 狀態碼驗證
### 測試
✅ 編譯通過 (CGO_ENABLED=1)
✅ 所有 Trader 接口方法實現完整
✅ HTTP 調用格式符合 LIGHTER API 規範
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* feat(lighter): 數據庫遷移與前端類型支持
### 數據庫變更
#### 新增欄位
- `exchanges.lighter_api_key_private_key` TEXT DEFAULT ''
- 支持 LIGHTER V2 的 40 字節 API Key 私鑰
#### 遷移腳本
- 📄 `migrations/002_add_lighter_api_key.sql`
- 包含完整的驗證和統計查詢
- 向後兼容現有配置(默認為空,使用 V1)
#### Schema 更新
- `config/database.go`:
- 更新 CREATE TABLE 語句
- 更新 exchanges_new 表結構
- 新增 ALTER TABLE 遷移命令
### 前端類型更新
#### types.ts
- 新增 `Exchange` 接口字段:
- `lighterWalletAddr?: string` - L1 錢包地址
- `lighterPrivateKey?: string` - L1 私鑰
- `lighterApiKeyPrivateKey?: string` - API Key 私鑰(⭐ 新增)
### 技術細節
**數據庫兼容性**:
- 使用 ALTER TABLE ADD COLUMN IF NOT EXISTS
- 默認值為空字符串
- 不影響現有數據
**類型安全**:
- TypeScript 可選字段
- 與後端 ExchangeConfig 結構對齊
### 下一步
⏳ **待完成**:
1. ExchangeConfigModal 組件更新
2. API 調用參數傳遞
3. V1/V2 狀態顯示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* docs(lighter): 更新 LIGHTER_INTEGRATION.md 文檔狀態
* feat(lighter): 前端完整實現 - API Key 配置與 V1/V2 狀態
**英文**:
- `lighterWalletAddress`, `lighterPrivateKey`, `lighterApiKeyPrivateKey`
- `lighterWalletAddressDesc`, `lighterPrivateKeyDesc`, `lighterApiKeyPrivateKeyDesc`
- `lighterApiKeyOptionalNote` - V1 模式提示
- `lighterV1Description`, `lighterV2Description` - 狀態說明
- `lighterPrivateKeyImported` - 導入成功提示
**中文(繁體)**:
- 完整的中文翻譯對應
- 專業術語保留原文(L1、API Key、Poseidon2)
**Exchange 接口**:
- `lighterWalletAddr?: string`
- `lighterPrivateKey?: string`
- `lighterApiKeyPrivateKey?: string`
**UpdateExchangeConfigRequest 接口**:
- `lighter_wallet_addr?: string`
- `lighter_private_key?: string`
- `lighter_api_key_private_key?: string`
**狀態管理**:
- 添加 3 個 LIGHTER 狀態變量
- 更新 `secureInputTarget` 類型包含 'lighter'
**表單字段**:
- L1 錢包地址(必填,text input)
- L1 私鑰(必填,password + 安全輸入)
- API Key 私鑰(可選,password,40 字節)
**V1/V2 狀態顯示**:
- 動態背景顏色(V1: 橙色 #3F2E0F,V2: 綠色 #0F3F2E)
- 圖標指示(V1: ⚠️ ,V2: ✅ )
- 狀態說明文字
**驗證邏輯**:
- 必填字段:錢包地址 + L1 私鑰
- API Key 為可選字段
- 自動 V1/V2 檢測
**安全輸入**:
- 支持通過 TwoStageKeyModal 安全導入私鑰
- 導入成功後顯示 toast 提示
**handleSaveExchange**:
- 添加 3 個 LIGHTER 參數
- 更新交易所對象(新增/更新)
- 構建 API 請求(snake_case 字段)
**V1 模式(無 API Key)**:
```
┌────────────────────────────────────────┐
│ ⚠️ LIGHTER V1 │
│ 基本模式 - 功能受限,僅用於測試框架 │
└────────────────────────────────────────┘
背景: #3F2E0F (橙色調)
邊框: #F59E0B (橙色)
```
**V2 模式(有 API Key)**:
```
┌────────────────────────────────────────┐
│ ✅ LIGHTER V2 │
│ 完整模式 - 支持 Poseidon2 簽名和真實交易 │
└────────────────────────────────────────┘
背景: #0F3F2E (綠色調)
邊框: #10B981 (綠色)
```
1. **類型安全**
- 完整的 TypeScript 類型定義
- Props 接口正確對齊
- ✅ 無 LIGHTER 相關編譯錯誤
2. **用戶體驗**
- 清晰的必填/可選字段區分
- 實時 V1/V2 狀態反饋
- 安全私鑰輸入支持
3. **向後兼容**
- 不影響現有交易所配置
- 所有字段為可選(Optional)
- API 請求格式統一
✅ TypeScript 編譯通過(無 LIGHTER 錯誤)
✅ 類型定義完整且正確
✅ 所有必需文件已更新
✅ 與後端 API 格式對齊
Modified:
- `web/src/i18n/translations.ts` - 中英文翻譯
- `web/src/types.ts` - 類型定義
- `web/src/components/traders/ExchangeConfigModal.tsx` - Modal 組件
- `web/src/hooks/useTraderActions.ts` - Actions hook
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* test(lighter): 添加 V1 測試套件與修復 SafeFloat64 缺失
- 新增 trader/helpers.go: 添加 SafeFloat64/SafeString/SafeInt 輔助函數
- 新增 trader/lighter_trader_test.go: LIGHTER V1 測試套件
- ✅ 測試通過 (7/10):
- NewTrader 驗證 (無效私鑰, 有效私鑰格式)
- FormatQuantity
- GetExchangeType
- InvalidQuantity 驗證
- InvalidLeverage 驗證
- HelperFunctions (SafeFloat64)
- ⚠️ 待改進 (3/10):
- GetBalance (需要調整 mock 響應格式)
- GetPositions (需要調整 mock 響應格式)
- GetMarketPrice (需要調整 mock 響應格式)
- 修復 Bug: lighter_account.go 和 lighter_trader_v2_account.go 中未定義的 SafeFloat64
- 測試框架: httptest.Server mock LIGHTER API
- 安全: 使用固定測試私鑰 (不含真實資金)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
---------
Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com >
Co-authored-by: tinkle-community <tinklefund@gmail.com >
2025-11-20 19:29:01 +08:00
Diego
fc8a4d3d63
fix(stats): fixed the PNL calculation ( #963 )
2025-11-15 22:20:06 -05:00
Lawrence Liu
10e6566947
feat(dashboard): 在交易者详情页显示系统提示词模板名称 ( #775 )
...
* feat(dashboard): display system prompt template and extract color constant
* style(api): format server.go with go fmt
2025-11-15 22:20:06 -05:00
Icy
2a2aabf729
merge fix
2025-11-13 00:44:26 +08:00
Icy
190b0c29d4
merge dev
2025-11-12 23:40:58 +08:00
0xYYBB | ZYY | Bobo
d68714ed83
fix(web): restore missing system_prompt_template field in trader edit request ( #922 )
...
* fix(web): restore missing system_prompt_template in handleSaveEditTrader
修復編輯交易員時策略模板無法保存的問題。
Issue:
- 用戶編輯交易員時,選擇的策略模板(system_prompt_template)沒有被保存
- 重新打開編輯窗口,總是顯示默認值
- 用戶困惑為什麼策略模板無法持久化
Root Cause:
- PR #872 在 UI 重構時遺漏了 system_prompt_template 字段
- handleSaveEditTrader 的 request 對象缺少 system_prompt_template
- 導致更新請求不包含策略模板信息
Fix:
- 在 handleSaveEditTrader 的 request 對象中添加 system_prompt_template 字段
- 位置:override_base_prompt 之後,is_cross_margin 之前
- 與後端 API 和 TraderConfigModal 保持一致
Result:
- 編輯交易員時,策略模板正確保存
- 重新打開編輯窗口,顯示正確的已保存值
- 用戶可以成功切換和保存不同的策略模板
Technical Details:
- web/src/types.ts TraderConfigData 接口已有 system_prompt_template ✓
- Backend handleUpdateTrader 接收並保存 SystemPromptTemplate ✓
- Frontend TraderConfigModal 表單提交包含 system_prompt_template ✓
- Frontend handleSaveEditTrader request 缺失此字段 ✗ → ✓ (已修復)
Related:
- PR #872 : UI 重構時遺漏
- commit c1f080f5 : 原始添加 system_prompt_template 支持
- commit e58fc3c2: 修復 types.ts 缺失字段
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* fix(types): add missing system_prompt_template field to TraderConfigData
補充完整修復:確保 TypeScript 類型定義與 API 使用一致。
Issue:
- AITradersPage.tsx 提交時包含 system_prompt_template 字段
- 但 TraderConfigData 接口缺少此字段定義
- TypeScript 類型不匹配
Fix:
- 在 TraderConfigData 接口添加 system_prompt_template: string
- 位置:override_base_prompt 之後,is_cross_margin 之前
- 與 CreateTraderRequest 保持一致
Result:
- TypeScript 類型完整
- 編輯交易員時正確加載和保存策略模板
- 無類型錯誤
Technical:
- web/src/types.ts Line 200
- 與後端 SystemPromptTemplate 字段對應
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
---------
Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com >
Co-authored-by: tinkle-community <tinklefund@gmail.com >
2025-11-11 21:00:42 -05:00
icy
b89ccb1a36
Merge branch 'origin/beta' into nofxos/test
...
# Conflicts:
# config/database_pg.go
2025-11-07 16:37:21 +08:00
icy
b715020d35
feat: exchange api security handle
2025-11-07 16:22:56 +08:00
icy
2c5b2282c0
feat: soft deleted exchange add
2025-11-06 20:39:46 +08:00
icy
65053518d6
feat: implement hybrid database architecture and frontend encryption
...
- Add PostgreSQL + SQLite hybrid database support with automatic switching
- Implement frontend AES-GCM + RSA-OAEP encryption for sensitive data
- Add comprehensive DatabaseInterface with all required methods
- Fix compilation issues with interface consistency
- Update all database method signatures to use DatabaseInterface
- Add missing UpdateTraderInitialBalance method to PostgreSQL implementation
- Integrate RSA public key distribution via /api/config endpoint
- Add frontend crypto service with proper error handling
- Support graceful degradation between encrypted and plaintext transmission
- Add directory creation for RSA keys and PEM parsing fixes
- Test both SQLite and PostgreSQL modes successfully
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
2025-11-06 01:50:06 +08:00
CoderMageFox
5df5dbf197
feat: 添加候选币种为0时的前端警告提示 ( #515 )
...
* feat: add frontend warnings for zero candidate coins
当候选币种数量为0时,在前端添加详细的错误提示和诊断信息
主要改动:
1. 决策日志中显示候选币种数量,为0时标红警告
2. 候选币种为0时显示详细警告卡片,包含可能原因和解决方案
3. 交易员列表页面添加信号源未配置的全局警告
4. 更新TraderInfo类型定义,添加use_coin_pool和use_oi_top字段
详细说明:
- 在App.tsx的账户状态摘要中添加候选币种显示
- 当候选币种为0时,显示详细的警告卡片,列出:
* 可能原因(API未配置、连接超时、数据为空等)
* 解决方案(配置自定义币种、配置API、禁用选项等)
- 在AITradersPage中添加信号源配置检查
* 当交易员启用了币种池但未配置API时显示全局警告
* 提供"立即配置信号源"快捷按钮
- 不改变任何后端逻辑,纯UI层面的用户提示改进
影响范围:
- web/src/App.tsx: 决策记录卡片中的警告显示
- web/src/components/AITradersPage.tsx: 交易员列表页警告
- web/src/types.ts: TraderInfo类型定义更新
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
* fix: import AlertTriangle from lucide-react in App.tsx
修复TypeScript编译错误:Cannot find name 'AlertTriangle'
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
---------
Co-authored-by: tinkle-community <tinklefund@gmail.com >
2025-11-05 17:11:04 +08:00
Ember
4978f9e8b8
feat: add ESLint and Prettier with pre-commit hook
...
- Install ESLint 9 with TypeScript and React support
- Install Prettier with custom configuration (no semicolons)
- Add husky and lint-staged for pre-commit hooks
- Configure lint-staged to auto-fix and format on commit
- Relax ESLint rules to avoid large-scale code changes
- Format all existing code with Prettier (no semicolons)
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
2025-11-05 11:41:14 +08:00
Liu Xiang Qian
f6b3972847
feat: 添加 AI 扫描决策间隔配置支持
...
## 功能描述
在创建和编辑 Trader 时,支持配置 AI 扫描决策间隔(scan_interval_minutes),允许用户自定义 AI 决策的频率。
## 修改内容
### 后端修改 (api/server.go)
1. **CreateTraderRequest** 添加 `ScanIntervalMinutes` 字段
2. **UpdateTraderRequest** 添加 `ScanIntervalMinutes` 字段和 `SystemPromptTemplate` 字段
3. **handleCreateTrader** 处理扫描间隔默认值(默认 3 分钟)
4. **handleUpdateTrader** 支持更新扫描间隔
5. **handleGetTraderConfig** 返回中添加 `scan_interval_minutes` 字段
### 前端修改
#### web/src/types.ts
- `CreateTraderRequest` 添加 `scan_interval_minutes?` 可选字段
- `TraderConfigData` 添加 `scan_interval_minutes` 必填字段
#### web/src/components/TraderConfigModal.tsx
- 本地 `TraderConfigData` 接口添加 `scan_interval_minutes`
- 初始状态设置默认值为 3 分钟
- 添加 UI 输入框(范围 1-60 分钟)
- Label 优化为 "AI 扫描决策间隔 (分钟)"
#### web/src/components/AITradersPage.tsx
- `handleSaveEditTrader` 的更新请求中添加 `scan_interval_minutes`
#### web/src/components/landing/CommunitySection.tsx
- 修复 TypeScript 编译错误:定义 `CardProps` 接口
- 修正 `TestimonialCard` 组件的 prop 名称(author → authorName)
## 功能特性
- ✅ 支持 1-60 分钟的自定义间隔
- ✅ 默认值为 3 分钟
- ✅ UI 提示建议范围:3-10 分钟
- ✅ 创建和编辑时均支持配置
- ✅ 后端验证和处理默认值
## 测试步骤
1. 创建新 Trader,设置自定义扫描间隔(如 10 分钟)
2. 验证 Trader 创建成功
3. 编辑现有 Trader,修改扫描间隔
4. 验证修改保存成功
5. 确认 AI 决策按照新的间隔执行
2025-11-03 21:55:26 +08:00
icy
1fdf227f38
Merge branch 'dev' of https://github.com/tinkle-community/nofx
2025-11-01 20:09:17 +08:00
SkywalkerJi
5afbd9a3c3
Supports custom system prompts and custom models.
2025-11-01 19:45:54 +08:00
icy
a404725379
Resolve merge conflicts in AITradersPage.tsx
...
- Fixed import statement conflict (using 'type Language')
- Merged exchange configuration logic preserving support for multiple exchange types
- Kept comprehensive form handling for Binance, Hyperliquid, Aster, and OKX exchanges
- Updated security warning messages to use proper translation keys
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
2025-11-01 19:01:44 +08:00
icy
7674ce1da7
Fixed health check; Fixed dex config; Add rank trader info view;
2025-11-01 18:58:32 +08:00
SkywalkerJi
6efdc47379
* Fixed the custom model URL.
...
* Added functionality for custom model names.
2025-11-01 16:09:15 +08:00
icy
ccd4938857
竞赛fix、交易员新增参数
2025-11-01 02:17:11 +08:00
icy
56a6d7e5a7
Add MarginMode configration
2025-10-31 13:14:24 +08:00
icy
d3e7b7dbb1
account system、custom prompt
2025-10-31 03:42:01 +08:00
icy
a2cded592b
Merge remote tracking branch into local development
...
- Resolved conflicts in README.md: Combined web-based config updates with multi-exchange support
- Resolved conflicts in main.go: Fixed database initialization and default coin settings
- Resolved conflicts in manager/trader_manager.go: Updated trader management for new database structure
- Resolved conflicts in web/src/App.tsx: Combined UI improvements with responsive design
- Resolved conflicts in web/.dockerignore: Merged dependency exclusions
- Removed deprecated files: Dockerfile, config/config.go, web/Dockerfile, ComparisonChart.tsx, CompetitionPage.tsx
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
2025-10-30 20:57:57 +08:00
icy
c64727ffd0
sync fork
2025-10-30 20:51:22 +08:00
tinkle-community
5b3b26921d
Fix: Add input_prompt display in decision cards
...
Previously, the frontend DecisionRecord type was missing the input_prompt
field that exists in the backend DecisionLog, causing the input context
sent to AI to not be displayed in the UI.
Changes:
- Add input_prompt field to DecisionRecord interface in both type files
- Add collapsible Input Prompt section in DecisionCard component
- Display input_prompt before AI Chain of Thought with blue styling
- Use same expand/collapse interaction pattern as CoT trace
Now users can view both the input context and AI's reasoning process
in the decision cards.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: tinkle-community <tinklefund@gmail.com >
2025-10-29 23:59:11 +08:00
tinkle-community
8d3981fd3e
Initial commit: NOFX AI Trading System
...
- Multi-AI competition mode (Qwen vs DeepSeek)
- Binance Futures integration
- AI self-learning mechanism
- Professional web dashboard
- Complete risk management system
2025-10-28 15:47:34 +08:00