Skip to content

TRACE v0.5.12

Choose a tag to compare

@peacezha peacezha released this 19 Oct 15:37

HPClaw v0.5.12 — 文字提问自动转正 / Plain-text questions become real asks

中文

  • 修复"AI 用文字提问、没有选项按钮":实测发现模型有时把"请你选一个方向"这类问题直接写成文字而不调用 ask_user 工具——你只能看到一段话,没有建议选项,对话就此停住。现在服务端在轮次结尾识别这种"等用户选择"的文字,自动转成正式提问:前端渲染带 2-4 个可点选项的提问卡(第一个推荐项),你的回答作为下一轮消息继续任务。
  • 识别是保守的:只命中明确请求选择/确认/回答的结尾;知识性问句、陈述句不受影响。
  • 知识性解释类追问(如"有哪些方案")仍按解释处理,不会被误判成选择。

English

  • Plain-text questions now become real asks: the model sometimes wrote "please pick a direction" as plain text instead of calling ask_user, leaving you a buttonless paragraph and a stalled turn. The server now detects such awaiting-your-choice endings at turn end and converts them into a proper ask: the frontend renders a card with 2–4 clickable options (first = recommended), and your answer continues the task as the next turn.
  • Detection is conservative: only endings that explicitly ask you to choose/confirm/answer are converted; informational questions and statements are untouched.

验证

  • 新增守卫单测(命中/不误判)+ agentRunner 端到端用例(文字提问→带选项提问卡);server/ai + shared 483+16 例全绿;tsc 无错。