## Problem
AI responses were being truncated due to a hardcoded max_tokens limit of 2000,
causing JSON parsing failures. The error occurred when:
1. AI's thought process analysis was cut off mid-response
2. extractDecisions() incorrectly extracted MACD data arrays from the input prompt
3. Go failed to unmarshal numbers into Decision struct
Error message:
```
json: cannot unmarshal number into Go value of type decision.Decision
JSON内容: [-867.759, -937.406, -1020.435, ...]
```
## Solution
- Add MaxTokens field to mcp.Client struct
- Read AI_MAX_TOKENS from environment variable (default: 2000)
- Set AI_MAX_TOKENS=4000 in docker-compose.yml for production use
- This provides enough tokens for complete analysis with the 800-line trading strategy prompt
## Testing
- Verify environment variable is read correctly
- Confirm AI responses are no longer truncated
- Check decision logs for complete JSON output
- Map config.db to host for database persistence
- Ensures user configurations, traders, and AI models persist across container restarts
- Enables easy backup of configuration database
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
Changes:
- Updated `docker-compose.yml` to include a new shared volume `frontend-dist` for frontend files.
- Modified the `nofx` service command to copy frontend files to the shared volume.
- Updated `Dockerfile` to use Go 1.25 and added necessary build dependencies for TA-Lib installation.
These changes improve the Docker environment by facilitating shared access to frontend assets and ensuring the build process is up-to-date with the latest Go version.
- Upgrade Dockerfile to Go 1.24 with multi-stage build (backend + frontend)
- Add TA-Lib installation for technical analysis support
- Integrate frontend build into main container image
- Add Nginx reverse proxy configuration for API routing
- Update docker-compose.yml to simplified single-container architecture
- Update .dockerignore to include web source for build
- Improve health checks and startup time handling
Benefits:
- One-click deployment with single Docker image
- Better resource utilization with multi-stage build
- Production-ready Nginx frontend serving
- Easier maintenance and deployment
Co-Authored-By: tinkle-community <tinklefund@gmail.com>