mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-13 07:46:54 +08:00
merge: Sync with NoFxAiOS/dev - adopt WebSocket architecture
Merged 54 commits from upstream (NoFxAiOS/dev @8832557) ## Key Changes ### 🚀 WebSocket Real-time Data Architecture - ✅ NEW: WebSocket client with auto-reconnect (websocket_client.go) - ✅ NEW: Market data monitor with combined streams (monitor.go) - ✅ NEW: K-line caching system (combined_streams.go) - ✅ UPGRADE: market/data.go now uses WebSocket instead of REST API - 🎯 Benefits: Lower latency, reduced API limits, auto-reconnect ### 📝 Documentation & CI/CD - ✅ NEW: Comprehensive troubleshooting guides (EN + ZH-CN) - ✅ UPGRADE: Enhanced PR workflow with checks - ✅ NEW: PR title guide & template improvements - ✅ UPDATE: FAQ expanded with common issues ### 🔧 Conflict Resolution - market/data.go: Adopted upstream WebSocket version - prompts/adaptive.txt: Kept our v5.5.6.1 (conf≥85, strict strategy) ### 📊 Stats - Files changed: 40+ - New files: 12 (WebSocket modules, docs, CI) - Commits merged: 54 Related: feature/partial-close-dynamic-tpsl Upstream: NoFxAiOS/nofx @8832557
This commit is contained in:
@@ -124,7 +124,7 @@ func GetFullDecisionWithCustomPrompt(ctx *Context, mcpClient *mcp.Client, custom
|
||||
// 4. 解析AI响应
|
||||
decision, err := parseFullDecisionResponse(aiResponse, ctx.Account.TotalEquity, ctx.BTCETHLeverage, ctx.AltcoinLeverage)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("解析AI响应失败: %w", err)
|
||||
return decision, fmt.Errorf("解析AI响应失败: %w", err)
|
||||
}
|
||||
|
||||
decision.Timestamp = time.Now()
|
||||
@@ -409,7 +409,7 @@ func parseFullDecisionResponse(aiResponse string, accountEquity float64, btcEthL
|
||||
return &FullDecision{
|
||||
CoTTrace: cotTrace,
|
||||
Decisions: []Decision{},
|
||||
}, fmt.Errorf("提取决策失败: %w\n\n=== AI思维链分析 ===\n%s", err, cotTrace)
|
||||
}, fmt.Errorf("提取决策失败: %w", err)
|
||||
}
|
||||
|
||||
// 3. 验证决策
|
||||
@@ -417,7 +417,7 @@ func parseFullDecisionResponse(aiResponse string, accountEquity float64, btcEthL
|
||||
return &FullDecision{
|
||||
CoTTrace: cotTrace,
|
||||
Decisions: decisions,
|
||||
}, fmt.Errorf("决策验证失败: %w\n\n=== AI思维链分析 ===\n%s", err, cotTrace)
|
||||
}, fmt.Errorf("决策验证失败: %w", err)
|
||||
}
|
||||
|
||||
return &FullDecision{
|
||||
|
||||
Reference in New Issue
Block a user