mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-07 13:00:59 +08:00
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:
@@ -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),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user