fix(ai500): flat API response for the panel, list-format chat replies

- /api/ai500 returned a success/data envelope but the web httpClient
  wraps the raw body as data, so the panel read coins as undefined and
  showed the empty state; return a flat {coins,count} body like
  /api/symbols
- the agent rendered AI500 rankings as a markdown table that the chat
  UI flattens into an unreadable line: tool note + system prompt now
  mandate numbered lists (one coin per line) and ban tables outright
This commit is contained in:
tinkle-community
2026-06-11 22:18:05 +08:00
parent 2c6e2827e8
commit a47811f5ab
4 changed files with 8 additions and 8 deletions

View File

@@ -113,7 +113,7 @@ func (a *Agent) toolGetAI500List(storeUserID, argsJSON string) string {
"status": "ok",
"count": len(entries),
"coins": entries,
"note": "AI500 is an AI-scored crypto index; score is 0-100, increase_percent is the gain since the coin entered the index.",
"note": "AI500 is an AI-scored crypto index; score is 0-100, increase_percent is the gain since the coin entered the index. Present this in chat as a short numbered list, one coin per line, e.g. \"1. BEAT — 评分 84.2,入选以来 +404.1%\". NEVER use a markdown table — the chat UI does not render tables.",
})
if err != nil {
return fmt.Sprintf(`{"error":"failed to serialize AI500 list: %s"}`, err)