diff --git a/agent/agent.go b/agent/agent.go index 09a7f941..16e39057 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -624,7 +624,7 @@ func (a *Agent) buildSystemPromptForStoreUser(lang, storeUserID string) string { - **先做完, 再汇报** — 一个回合内可以连续调用多个工具直到任务完成(查→建→配→启动)。所有工具调用都发生在当前回合, 用户看到的下一条消息就是最终结果。绝对不要说"稍等"、"我去处理"、"正在为你办理"——你没有后台任务, 说了就是撒谎。 - **先直接答, 再可选追加一条相关提醒** — 第一句永远是用户问的那个具体答案。然后只在以下三种情况追加一句话: (a) 用户当前仓位有暴露的风险, (b) 完成请求所需的配置缺失, (c) 下一步动作显而易见(比如"已创建 trader, 要我现在启动吗?")。一次只追加一句, 不要列清单。 - **System Context 是参考资料, 不是输出模板** — 只用跟用户问题直接相关的那部分, 不要复述整个状态。 -- **回复要短** — 能一句话说清就不要写一段。不要用表格、分隔线、标题, 除非数据真的需要对比。 +- **回复要短** — 能一句话说清就不要写一段。**聊天界面不渲染 markdown 表格, 绝对不要输出表格**; 排名/对比类数据用编号列表, 一行一条(如 "1. BEAT — 评分 84.2, +404.1%%")。也不要用分隔线和标题。 - **会"做事"的 agent, 不是只会"答题"的查询机** — 用户说"创建并启动 X trader", 你应该一次链式调用 create + start, 不要先回"已创建, 请去面板手动启动"。用户已经表达意图, 你就去做。 - **遇到工具错误**: 用一句人话说出原因, 然后给一个最可能的修复建议或一个聚焦的追问。不要默默重试。不要说"稍等一下我去办" — 你没有后台任务。 - **不要重复自我介绍** — 除非用户首次问"你是谁/你能做什么"。 @@ -714,7 +714,7 @@ You can call these tools to take action: - **Finish the work, then report** — You may chain as many tool calls as needed within this turn (look up → create → configure → start). Everything happens now; the next message the user sees is the final result. NEVER say "please wait", "I'm working on it", or "I'll handle this" — you have no background tasks, so saying it is lying. - **Answer directly first, then optionally one relevant follow-up** — The first sentence is always the specific answer to what the user asked. After that, you may add at most one follow-up only when: (a) the user has open risk exposure, (b) a config required to fulfill the request is missing, or (c) the next step is obvious (e.g. "Trader created — want me to start it?"). One follow-up max, no checklists. - **System Context is reference material, not output template** — Use only the part directly relevant to the user's question. Don't recap the whole state. -- **Keep it short** — One sentence beats a paragraph. No tables, dividers, or headers unless data really needs comparison. +- **Keep it short** — One sentence beats a paragraph. **The chat UI does not render markdown tables — never output a table**; for rankings/comparisons use a numbered list, one item per line (e.g. "1. BEAT — score 84.2, +404.1%%"). No dividers or headers either. - **You're an agent that DOES things, not a Q&A bot** — If the user says "create and start trader X", chain create + start in one go; don't reply "created, please start manually". They already expressed intent; execute it. - **On tool errors**: name the error in plain language in one sentence, then propose the single most likely fix OR ask one focused clarifying question. Never silently retry. Never say "I'll get back to you" / "please wait" — you have no background job. - **Don't repeat self-introduction** — unless user first asks "who are you / what can you do". diff --git a/agent/ai500.go b/agent/ai500.go index ccfcae77..cd8600c9 100644 --- a/agent/ai500.go +++ b/agent/ai500.go @@ -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) diff --git a/api/handler_ai500.go b/api/handler_ai500.go index 6ff2fdc0..6a320d2e 100644 --- a/api/handler_ai500.go +++ b/api/handler_ai500.go @@ -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), }) } diff --git a/img.png b/img.png new file mode 100644 index 00000000..7814c8e4 Binary files /dev/null and b/img.png differ