Commit Graph

389 Commits

Author SHA1 Message Date
ZYY | Bobo
fae6daf6a9 Merge branch 'NoFxAiOS:dev' into z-dev 2025-11-04 02:29:16 +08:00
Luna Martinez
7ec49b0ebe Merge pull request #362 from hzb1115/dev
Fix(workflow): add title and size validation comments
2025-11-03 13:20:02 -05:00
Luna Martinez
b2df15be3f Merge branch 'NoFxAiOS:dev' into dev 2025-11-03 13:16:11 -05:00
zbhan
09b54b8c3b Fix PR check 2025-11-03 13:12:47 -05:00
ZhouYongyou
face7b367c merge: Resolve conflicts with nofxaios/dev (keep our features)
## Conflicts Resolved | 已解决冲突

### api/server.go
-  Kept our feature: Query actual exchange balance when creating trader
-  Kept our feature: SystemPromptTemplate support
-  Kept our feature: scan_interval_minutes configuration
- Applied go fmt for consistent code style

### manager/trader_manager.go
-  Kept our feature: newsCfg parameter (Telegram news integration)
- Applied go fmt for consistent code style

### trader/binance_futures.go
-  Kept our feature: CancelStopOrders method (critical for partial close & dynamic TP/SL)
-  Kept our feature: callWithTimeSync wrapper (Binance time sync for -1021 errors)
- Applied go fmt for consistent code style

## Verification | 验证

All critical features preserved:
-  CancelStopOrders method: 1 occurrence
-  SystemPromptTemplate: 9 occurrences
-  scan_interval_minutes: 3 occurrences
-  callWithTimeSync: 13 occurrences
-  newsCfg: 9 occurrences
-  Code compiles successfully
-  go vet passes without warnings
-  File line counts preserved (776 lines in binance_futures.go)

Backup created at: z-dev-backup-20251104-015939
2025-11-04 02:05:55 +08:00
Luna Martinez
4166776fdf Merge pull request #323 from zhouyongyou/fix/go-vet-warnings
fix: resolve go vet warnings for non-constant format strings
2025-11-03 12:42:46 -05:00
Luna Martinez
9f03266fed Merge pull request #329 from zhouyongyou/chore/peer-dependency-markers
chore(web): add peer dependency markers to package-lock.json
2025-11-03 12:39:24 -05:00
ZhouYongyou
b612e80ff9 feat(prompts): Major upgrade to adaptive.txt strategy (v2.0)
## Core Problem Fixes

1. **Tighten RSI Conditions**
   - Long RSI: 35-50 → 30-40 (avoid neutral zone triggers)
   - Short RSI: 50-65 → 65-70 (avoid neutral zone triggers)

2. **Raise BuySellRatio Thresholds**
   - Long: ≥0.55 → ≥0.60 (ensure buyer dominance)
   - Short: ≤0.45 → ≤0.40 (ensure seller dominance)

3. **Add Multi-Timeframe Trend Confirmation**
   - Check 3m/15m/1h/4h price vs EMA20
   - Require ≥3/4 timeframes aligned
   - Prevent counter-trend trades (fixes "opening long when others short")

## New Features Added

4. **Active Take-Profit Ladder** (from taro_long)
   - Profit 1-3%: Exit if retrace 50%
   - Profit 3-5%: Exit if retrace 25%
   - Profit 5-8%: Exit if retrace 30%
   - Profit 8-15%: Exit if retrace 30%
   - Profit >15%: Exit if retrace 50%

5. **Enhanced Position Sizing Formula** (from nof1)
   - Position Size (USD) = Available Cash × Leverage × Allocation %
   - Clear leverage guidance based on confidence (85-90: 1-3x, 90-95: 3-8x, >95: 8-10x)

6. **Detailed Partial Close Guidance** (from nof1)
   - Recommend 25%/50%/75% increments
   - Examples and remaining position management

7. **Enhanced False Breakout Detection**
   - Multi-timeframe RSI divergence (15m vs 1h)
   - Volume divergence (volume < avg ×0.8)
   - Candlestick patterns (long wicks > body ×2)
   - Volatility collapse detection

## Expected Improvements

- Reduce counter-trend trades: 70-80%
- Reduce profit drawdown: 30-40%
- Improve signal quality significantly
- Enhance bull/bear trap detection: 60/100 → 95/100
- Expected Sharpe Ratio increase: +0.3 to +0.5

## Stats

- Lines: 314 → 422 (+108 lines, +34%)
- Size: 11K → 14K (+27%)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 01:28:06 +08:00
hzb1115
1b654cf9d2 style(backend): go fmt code 2025-11-03 17:22:11 +00:00
ZhouYongyou
f34efee749 merge: Integrate PR #229 UT infrastructure with fallback logic
## Changes
-  Merge dev branch's UT infrastructure (Issue #227 fix)
-  Preserve fallback mechanism for ai_model_id and exchange_id
-  Use `allModels` instead of `enabledModels` (allow editing disabled model traders)
-  Use `allExchanges` instead of `enabledExchanges`

## Conflict Resolution
- Combined feature/partial-close-dynamic-tpsl's defensive programming
- Adopted dev branch's core fix: allModels/allExchanges validation
- Updated error messages to reflect "not exist" vs "not enabled"

Related: #229, #227
2025-11-03 23:39:24 +08:00
SkywalkerJi
683e77b92f Merge pull request #229 from xqliu/test/add-ut-infrastructure
test: Add minimal UT infrastructure and fix Issue #227
2025-11-04 00:28:34 +09:00
Liu Xiang Qian
cc448bf6e2 fix: Remove unused variables in AITradersPage.test.tsx to fix TypeScript compilation
Fixed TypeScript compilation errors by removing unused imports and variables:
- Removed unused 'screen' import from test-utils
- Removed unused 'fetcher' parameter from SWR mock
- Removed unused 'mockTrader' variable
- Removed unused 'TraderInfo' type import

All tests still pass (5/5) and frontend now compiles successfully.
2025-11-03 23:20:55 +08:00
ZhouYongyou
16c3745afd fix: GetTraderConfig missing critical fields in SELECT/Scan
**Problem**:
- GetTraderConfig was missing 9 critical fields in SELECT statement
- Missing corresponding Scan variables
- Caused trader edit UI to show 0 for leverage and empty trading_symbols

**Root Cause**:
Database query only selected basic fields (id, name, balance, etc.)
but missed leverage, trading_symbols, prompts, and all custom configs

**Fix**:
- Added missing fields to SELECT:
  * btc_eth_leverage, altcoin_leverage
  * trading_symbols
  * use_coin_pool, use_oi_top
  * custom_prompt, override_base_prompt
  * system_prompt_template
  * is_cross_margin
  * AI model custom_api_url, custom_model_name

- Added corresponding Scan variables to match SELECT order

**Impact**:
 Trader edit modal now displays correct leverage values
 Trading symbols list properly populated
 All custom configurations preserved and displayed
 API endpoint /traders/:id/config returns complete data

**Testing**:
-  Go compilation successful
-  All fields aligned (31 SELECT = 31 Scan)
-  API layer verified (api/server.go:887-904)

Reported by: 寒江孤影
Issue: Trader config edit modal showing 0 leverage and empty symbols

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 23:18:47 +08:00
ZYY | Bobo
4edf83b0d8 Merge branch 'NoFxAiOS:dev' into feature/partial-close-dynamic-tpsl 2025-11-03 22:50:49 +08:00
Icyoung
791cecd2ff Merge pull request #336 from 0xEmberZz/fix-mobile-display-v2
UI : Fix mobile display
2025-11-03 22:40:17 +08:00
ZhouYongyou
785a25e926 refactor: implement Code Review suggestions for PR #231
- Delete unused updatePositionSnapshots function (16 lines)
- Clear position snapshots on GetPositions error to prevent false positives
- Improve auto-close detection reliability
- Better error handling for snapshot updates
2025-11-03 22:38:21 +08:00
ZhouYongyou
3d565c993e feat: Add SystemPromptTemplate edit support (PR #339)
- Allow users to modify SystemPromptTemplate when editing Trader
- Enable dynamic strategy switching (default/aggressive/conservative)
- Support A/B testing of different trading strategies
- Maintain backward compatibility with existing data
- Complete full data flow from database through UI to persistence
2025-11-03 22:37:11 +08:00
ZhouYongyou
5f6ff9d914 feat: add system_prompt_template to GetTraderConfig response 2025-11-03 22:35:45 +08:00
ZhouYongyou
aef4cf5a09 style: fix alignment in server.go after merge 2025-11-03 22:35:19 +08:00
ZhouYongyou
0745fdf176 feat: Add scan_interval_minutes configuration support (PR #338)
- Allow users to customize AI decision scan interval (1-60 minutes)
- Default 3 minutes, recommended range 3-10 minutes
- Support both high-frequency and low-frequency trading strategies
- Improve trading flexibility and API call efficiency
- Merge with existing actual balance query functionality
2025-11-03 22:34:44 +08:00
ZhouYongyou
cd479d405c feat: Auto-initialize config files in Docker environment (PR #310)
- Add automatic config.json initialization on first run
- Improve Docker deployment experience
- Reduce manual configuration steps
2025-11-03 22:20:15 +08:00
Liu Xiang Qian
c1f080f59f feat: 添加前端对 SystemPromptTemplate 更新的完整支持
## 修改内容

### 后端 (api/server.go)
- handleGetTraderConfig 返回中添加 system_prompt_template 字段

### 前端类型定义 (web/src/types.ts)
- TraderConfigData 接口添加 system_prompt_template 字段

### 前端更新逻辑 (web/src/components/AITradersPage.tsx)
- handleSaveEditTrader 的更新请求中添加 system_prompt_template

## 完整数据流

```
后端数据库
  ↓ handleGetTraderConfig
前端 TraderConfigData (包含 system_prompt_template)
  ↓ TraderConfigModal (UI 编辑)
前端 UpdateRequest (包含 system_prompt_template)
  ↓ handleUpdateTrader
后端更新数据库
```

现在前后端已完全打通,用户可以在 UI 中编辑系统提示词模板了。
2025-11-03 22:19:58 +08:00
ZhouYongyou
75c04083b3 feat: Add Telegram news integration for market sentiment analysis (PR #277)
- Add Telegram channel monitoring for market news
- Integrate news sentiment into AI decision making
- Improve context awareness for trading decisions
- Fix missing InsideCoins field in ConfigFile structure
- Merge with existing partial_close and position tracking features
2025-11-03 22:19:38 +08:00
Liu Xiang Qian
b0de71bdf5 feat: 支持更新 Trader 的系统提示词模板
允许在编辑 Trader 时更新系统提示词模板(SystemPromptTemplate)。

系统提示词模板用于控制 AI 交易决策的行为模式。目前创建 Trader 时可以指定模板,但编辑时无法修改。

1. **UpdateTraderRequest** 添加 `SystemPromptTemplate` 字段
   ```go
   SystemPromptTemplate string `json:"system_prompt_template"`
   ```

2. **handleUpdateTrader** 添加处理逻辑
   - 如果请求中提供新模板,使用新值
   - 如果为空字符串,保持数据库中的原有值

   ```go
   systemPromptTemplate := req.SystemPromptTemplate
   if systemPromptTemplate == "" {
       systemPromptTemplate = existingTrader.SystemPromptTemplate
   }
   ```

3. **TraderRecord** 设置 SystemPromptTemplate 字段
   ```go
   SystemPromptTemplate: systemPromptTemplate,
   ```

-  支持在编辑 Trader 时更新系统提示词模板
-  空值时保持原有值不变(向后兼容)
-  与创建 Trader 时的行为保持一致
-  无破坏性变更

1. 用户创建 Trader 时使用了默认模板
2. 后续想切换到自定义模板(如更激进或保守的策略)
3. 通过编辑功能修改 SystemPromptTemplate 字段
4. 保存后,AI 将使用新的提示词模板进行决策

1. 创建 Trader(使用默认模板 "default")
2. 编辑 Trader,修改 system_prompt_template 为 "aggressive"
3. 保存并验证修改成功
4. 再次编辑,不修改 system_prompt_template(传空字符串)
5. 验证保持 "aggressive" 不变
2025-11-03 22:15:23 +08:00
ZhouYongyou
527dcd6fc2 feat: Add position snapshot to track auto-closed positions (PR #231)
- Add position_snapshots table to track all closed positions
- Record both manual and auto-closed positions
- Fix data integrity issue where auto-closed positions were not recorded
- Improve trade history tracking and analysis
- Merge with existing partial_close functionality
2025-11-03 22:15:12 +08:00
SkywalkerJi
df83a87bb0 Merge pull request #338 from xqliu/feat/add-scan-interval-config-v2
feat: 添加 AI 扫描决策间隔配置支持
2025-11-03 23:11:27 +09:00
SkywalkerJi
0a9410069d Merge pull request #337 from xqliu/fix/trader-edit-model-validation
fix: 修复编辑 Trader 时 AI 模型验证失败的问题
2025-11-03 23:11:08 +09:00
ZhouYongyou
1d785532a0 fix: Fix AI model validation and 4h kline storage (PR #337)
- Fix AI model validation failure when editing trader
- Fix 4h kline data storage to correct database field
- Remove improper model ID conversion in API layer
- Resolve conflicts: keep complete model ID and continue on 4h fetch error
- Closes NoFxAiOS#335, NoFxAiOS#260
2025-11-03 22:05:32 +08:00
Liu Xiang Qian
8ad85a4a5b revert: 移除 SystemPromptTemplate 相关修改
将 SystemPromptTemplate 功能从扫描间隔 PR 中分离出来,
保持 PR 单一职责。

SystemPromptTemplate 功能将在单独的 PR 中处理。
2025-11-03 22:02:25 +08:00
ZhouYongyou
b3e97072a9 fix: Remove merge conflict markers and add WebSocket limit warnings
- Clean up remaining conflict markers in SetMarginMode
- Add visual warnings for WebSocket stream limits in UI
- Prevent user from exceeding 250 symbols (1024 streams / 4 timeframes)
2025-11-03 21:57:55 +08:00
Liu Xiang Qian
ddf6c44d65 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
Liu Xiang Qian
3dfdd79a8c fix: 修复编辑 Trader 时 AI 模型验证失败的问题
## 问题描述
编辑 Trader 配置时,保存提示"AI模型配置不存在或未启用"错误。

## 根本原因
- 数据库存储的模型 ID 是完整格式(如 `admin_deepseek`)
- API 返回时将其转换为 provider 格式(`deepseek`)
- 前端 enabledModels 列表中是完整 ID
- 导致前端用 `deepseek` 查找 `admin_deepseek` 时失败

## 修复方案
移除 handleGetTraderConfig 中的模型 ID 转换逻辑,
返回完整的模型 ID,保持与前端模型列表格式一致。

Fixes #335
2025-11-03 21:52:44 +08:00
Ember
7a4e9f145c feat(web): comprehensive mobile responsive optimization for AI Traders and Competition pages
Optimized mobile display for AITradersPage:
- Header: Reduced padding (px-3 on mobile), smaller icons and text
- Action buttons: Smaller on mobile (px-3, text-xs) with horizontal scroll support
- Configuration cards: Responsive padding (p-3 on mobile), smaller gaps
- Model/Exchange items: Smaller icons (w-7 on mobile), truncate text overflow
- Trader list: Stack vertically on mobile, smaller buttons with wrapping support
- Empty states: Smaller icons and text on mobile

Maintained all i18n translations and preserved Binance design style.

Addresses #311

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:46:07 +08:00
Ember
4f4e9f2ca9 fix: improve mobile responsive layout for header and comparison chart
This is a partial fix for issue #311 mobile display problems.

Changes in this commit:
- Add responsive header layout with separate mobile/desktop views in App.tsx
- Fix language selector visibility on mobile (no longer hidden by menu)
- Add responsive breakpoints to ComparisonChart stats grid (2 cols on mobile, 4 on desktop)
- Adjust padding and text sizes for mobile screens
- Preserve all i18n (internationalization) functionality from upstream

Note: Additional components (CompetitionPage, AITradersPage) will need similar mobile
responsive improvements in follow-up commits.

Related to #311

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:38:52 +08:00
ZhouYongyou
a95faf6552 fix(trader): Correct leverage ratio in AI prompt (PR #318)
- Fix leverage config visibility issue
- Ensure all symbols' leverage info in prompt
- Prevent AI from using wrong leverage
- Add per-symbol leverage information to decision context

Source: https://github.com/NoFxAiOS/nofx/pull/318
2025-11-03 21:33:30 +08:00
ZhouYongyou
cc9e42859d feat(exchange): Add comprehensive Binance time sync (PR #313)
- Auto-sync server time every 30 seconds
- Add callWithTimeSync retry mechanism for all API calls
- Fix -1021 timestamp errors automatically
- Production-ready implementation
- Resolved merge conflict with PR #145

Source: https://github.com/NoFxAiOS/nofx/pull/313
2025-11-03 21:33:02 +08:00
Liu Xiang Qian
13e6f9e7f6 fix: Correct 4h kline data storage in WebSocket monitor
Fixed critical bug where 4h kline data was incorrectly stored with
3m kline data, causing data mismatch.

Changes:
- Changed `m.klineDataMap4h.Store(s, klines)` to `klines4h`
- Updated log message to use `len(klines4h)` instead of `len(klines)`

This bug would cause 4h kline queries to return 3m data, leading to
incorrect technical indicator calculations.

Fixes: #260
Related: #176
2025-11-03 21:17:43 +08:00
ZYY | Bobo
381240c222 Merge branch 'NoFxAiOS:dev' into feature/partial-close-dynamic-tpsl 2025-11-03 21:07:09 +08:00
ZhouYongyou
7f87478ee1 refactor: align variable naming and add Binance time sync
1. Rename `traderRecord` to `trader` in handleCreateTrader
   - Aligns with upstream naming convention (nofxaios/dev)
   - Line 403: variable definition
   - Line 424: CreateTrader call

2. Add Binance server time synchronization (PR #145 simple fix)
   - Fixes timestamp errors (code=-1021)
   - Sets UseTestnet=false (ensure production network)
   - Syncs server time on trader initialization
   - Based on commit 64299c1 from pr-145 branch

Both changes improve compatibility with upstream and prevent
timestamp-related API failures.
2025-11-03 21:03:55 +08:00
ZhouYongyou
a29eea2742 chore(web): add peer dependency markers to package-lock.json
npm v7+ automatically marks packages as peer dependencies. This commit
adds these markers to ensure consistent dependency resolution.

Affected packages (10):
- @babel/core (dev peer)
- @types/react (devOptional peer)
- browserslist
- jiti (dev peer)
- postcss
- react
- react-dom
- picomatch (2 instances, dev peer)
- vite (dev peer)
2025-11-03 20:53:01 +08:00
ZhouYongyou
fd5c28c628 chore(web): add peer dependency markers to package-lock.json
npm v7+ automatically marks packages as peer dependencies when they are
declared in peerDependencies of installed packages. This commit adds
these markers to ensure consistent dependency resolution across all
development environments and CI/CD pipelines.

Affected packages (10):
- @babel/core (dev peer)
- @types/react (devOptional peer)
- browserslist
- jiti (dev peer)
- postcss
- react
- react-dom
- picomatch (2 instances, dev peer)
- vite (dev peer)

Benefits:
- Prevents duplicate installations of peer dependencies
- Ensures consistent package versions across the project
- Improves npm install performance
- Reduces package-lock.json conflicts
2025-11-03 20:47:25 +08:00
tinkle-community
7d1c35be2b Merge pull request #326 from NoFxAiOS/main 2025-11-03 20:34:16 +08:00
SkywalkerJi
61fc2bee16 Merge branch 'dev' into main 2025-11-03 21:33:46 +09:00
ZhouYongyou
4e8af52a24 fix(api): query actual exchange balance when creating trader
Problem:
- Users could input arbitrary initial balance when creating traders
- This didn't reflect the actual available balance in exchange account
- Could lead to incorrect position sizing and risk calculations

Solution:
- Before creating trader, query exchange API for actual balance
- Use GetBalance() from respective trader implementation:
  * Binance: NewFuturesTrader + GetBalance()
  * Hyperliquid: NewHyperliquidTrader + GetBalance()
  * Aster: NewAsterTrader + GetBalance()
- Extract 'available_balance' or 'balance' from response
- Override user input with actual balance
- Fallback to user input if query fails

Changes:
- Added 'nofx/trader' import
- Query GetExchanges() to find matching exchange config
- Create temporary trader instance based on exchange type
- Call GetBalance() to fetch actual available balance
- Use actualBalance instead of req.InitialBalance
- Comprehensive error handling with fallback logic

Benefits:
-  Ensures accurate initial balance matches exchange account
-  Prevents user errors in balance input
-  Improves position sizing accuracy
-  Maintains data integrity between system and exchange

Example logs:
✓ 查询到交易所实际余额: 150.00 USDT (用户输入: 100.00 USDT)
⚠️ 查询交易所余额失败,使用用户输入的初始资金: connection timeout

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 20:30:00 +08:00
ZhouYongyou
041d6d4048 fix(prompts): add explicit stop-loss direction logic for long/short positions
Address DaDaManMan's error where AI set stop-loss incorrectly for short position.

## Problem
AI attempted to set stop-loss at $107,500 for SHORT position at $108,230,
causing validation error: "空单止损必须高于当前价格"

Root cause: Prompts lacked explicit guidance on stop-loss direction logic.

## Solution

### adaptive.txt (Chinese):
- Add "止损方向逻辑" section with clear rules
- Long position: stop_loss < entry_price (protect downside)
- Short position: stop_loss > entry_price (protect upside)
- Include examples and common mistakes to avoid

### nof1.txt (English):
- Add "Stop-Loss Direction Logic" section
- Same directional rules with detailed explanations
- Include real error example from production logs
- Emphasize validation failures when rules are violated

## Impact
-  Prevents AI from setting illogical stop-loss prices
-  Reduces validation errors and failed trades
-  Provides clear examples with entry/stop-loss pairs
-  Addresses DaDaManMan's reported issue directly

## Files Changed
- prompts/adaptive.txt (+19 lines)
- prompts/nof1.txt (+25 lines)

Fixes: #272 (DaDaManMan's comment)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 20:21:47 +08:00
ZhouYongyou
b56b278be1 fix: resolve go vet warnings for non-constant format strings
Replace log.Printf with log.Print for static strings to resolve
go vet warnings about non-constant format strings.

This is a security best practice as using Printf with dynamic strings
can lead to format string vulnerabilities.

Fixed 6 instances in trader/auto_trader.go:
- Line 260: Decision cycle separator (=)
- Line 262: Decision cycle separator (=)
- Line 349: System prompt separator (=)
- Line 353: System prompt separator (=)
- Line 357: CoT trace separator (-)
- Line 361: CoT trace separator (-)
2025-11-03 19:54:47 +08:00
tinkle-community
56e12b5030 Merge pull request #321 from SkywalkerJi/main 2025-11-03 19:53:00 +08:00
SkywalkerJi
33d3a5c3a7 Upgrade this repository's open-source license to AGPL. 2025-11-03 19:50:50 +08:00
ZhouYongyou
1e1f4cc36b fix: define CardProps interface and fix prop name mismatch
- Add missing CardProps interface definition
- Fix TestimonialCard to use 'authorName' instead of 'author'
- Resolves TypeScript compilation error: 'Cannot find name CardProps'
- Fixes frontend build failure in CI

Fixes the type error:
src/components/landing/CommunitySection.tsx(32,16): error TS2304: Cannot find name 'CardProps'.
2025-11-03 19:45:59 +08:00
ZhouYongyou
563fb0e85d fix: resolve go vet warnings for non-constant format strings
- Replace log.Printf() with log.Print() for static strings
- Fix 6 instances in trader/auto_trader.go (lines 262, 264, 351, 355, 359, 363)
- Eliminates 'non-constant format string' warnings from go vet
- No functional changes, output remains identical

This follows Go best practices and improves code security by using
appropriate logging functions for non-formatted strings.
2025-11-03 19:40:40 +08:00