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

@@ -33,11 +33,11 @@ func (s *Server) handleAI500List(c *gin.Context) {
return
}
// Flat body, matching /api/symbols: the web httpClient wraps the raw
// response body as `data`, so a nested success/data envelope here would
// hide the coins from the panel.
c.JSON(http.StatusOK, gin.H{
"success": true,
"data": gin.H{
"coins": entries,
"count": len(entries),
},
"coins": entries,
"count": len(entries),
})
}