refactor: remove database pre-population and add i18n strategy templates

- Remove initDefaultData() for exchanges, ai_models, strategies tables
- Change supported exchanges/models API to return static lists
- Add GetDefaultStrategyConfig(lang) with Chinese/English prompt templates
- Frontend passes language parameter when creating new strategy
This commit is contained in:
tinkle-community
2025-12-08 02:37:29 +08:00
parent d780c2a988
commit 4a0f56f1ee
6 changed files with 57 additions and 183 deletions

View File

@@ -150,7 +150,7 @@ export function StrategyStudioPage() {
if (!token) return
try {
const configResponse = await fetch(
`${API_BASE}/api/strategies/default-config`,
`${API_BASE}/api/strategies/default-config?lang=${language}`,
{ headers: { Authorization: `Bearer ${token}` } }
)
const defaultConfig = await configResponse.json()