Add internal interactive questioning tool 'usr_ask'
还没有人认领这个 Issue。
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
Describe the feature or problem you'd like to solve
In older versions like v1.0.6, ask_user worked nicely to display interactive multiple-choice menus in the terminal.
However, in current releases (tested on v1.0.80), the agent no longer triggers interactive question prompts, even when explicitly asked to offer choices or clarify next steps. Instead, it just outputs plain text lists and ends the turn.
Proposed solution
Restore and polish the built-in ask_user (or usr_ask) tool so the CLI can reliably render interactive selection prompts:
- Simple arrow-key navigation (
↑/↓+Enter) for choices. - Single and multi-select support.
- Built-in "Other / custom text" option so users can write in answers.
- Ensure the model reliably triggers it when ambiguity arises instead of falling back to raw text.
- Proper handling in autonomous/YOLO/allow-all modes so interactive prompts don't unexpectedly block unattended or automated workflows (as addressed in #2109).
Example prompts or workflows
- Choosing frameworks or tools (e.g. asking which test runner to install with selectable items).
- Confirming dangerous operations before execution.
- Clarifying requirements during complex tasks without ending the session early.
Additional context
Looking at the v1.0.6 release (app.js), ask_user was defined with { question, choices, allow_freeform } and rendered via registerPrompt. On v1.0.80 this seems broken or dormant.
#2109 is especially relevant here, as it lays out solid proposals to handle ask_user gracefully across ACP and automated modes without breaking YOLO / unattended execution.
Related issues: #2109, #3323, #4050, #4260, #4450, #3722, #2067, #2929, #1898.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先将 v1.0.6 的 app.js 中 ask_user 的实现及其 registerPrompt 用法与当前 CLI 进行比较,然后阅读 #2109 中的提案。追踪 usr_ask 或 ask_user 将在哪里注册和触发。完成标准是支持交互式单选和多选提示、自由格式回答,并在 autonomous、YOLO、ACP 和 unattended 模式下安全运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 活跃
- 描述清晰度
- 需要澄清
- 新手友好度
- 32/100