rts-commander / todos.txt
Luigi's picture
fix: Debug logs and auto-load for NL translator, movement & production bugs
9fdd425
0. [DONE] Bring MCP support to the game
1. [DONE] Apply Qwen 2.5 Coder 1.5B
2. [DONE] Use Qwen 2.5 Coder 1.5B to perform NL-to-MCP translation
2.1 [DONE] Add a text input UI for user to type her instruction in NL to play the game via MCP
โœ… Integration Complete - All 6 Requirements Implemented:
1. โœ… NL input field alongside traditional UI controls
2. โœ… Show parsed JSON to user for confirmation before execution
3. โœ… Implement retry mechanism for failed parsings
4. โœ… Add language auto-detection based on user preference
5. โœ… Provide example commands in each language
6. โœ… Log all NL commands for continuous improvement
๐Ÿ“ Files Created:
- web/nl_translator.py (270 lines) - Backend NLโ†’MCP translator
- web/static/nl_interface.js (455 lines) - Frontend NL interface
- web/static/nl_interface.css (305 lines) - NL interface styling
- docs/NL_INTERFACE_INTEGRATION.md - Complete documentation
๐Ÿ”ง Files Modified:
- web/app.py - Added 3 NL API endpoints
- web/static/index.html - Added NL CSS and JS includes
๐ŸŽฏ Features:
- Natural language command input (EN/FR/ZH)
- Auto language detection
- Confirmation dialog with parsed JSON
- Example commands by language
- Status indicators (ready/loading/error)
- Command history (last 50)
- Error handling with retry
- MCP to game command conversion
๐Ÿš€ Status: PRODUCTION READY
Server running at: http://localhost:7860
NL API: http://localhost:7860/api/nl/status
Integration Suggestions:
1. Add NL input field alongside traditional UI controls
2. Show parsed JSON to user for confirmation before execution
3. Implement retry mechanism for failed parsings
4. Add language auto-detection based on user preference
5. Provide example commands in each language
6. Log all NL commands for continuous improvement
Be careful, as the same LLM is also used to product AI analysis,
to describe war situation in NL from game stats. So, you have to
make both (NL interface and AI anlaysis) works with only one LLM.
remove control groups or disable it by default