github / github/copilot-cli

ask_user  form: pressing Enter early submits/cancels and permanently discards the in-progress typed answer

未关闭
#4,738 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:agents area:input-keyboard
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Describe the bug

Severity: High (data loss — user-authored content is unrecoverable)

Impact: Loss of substantial user-typed input; forces the user to re-type from scratch and erodes trust in the form UI.

Suggested fixes: Draft autosave/restore for elicitation forms; make Enter insert a newline in text fields (submit via a distinct key like Ctrl+Enter); on cancel/escape, stash the draft (similar to  ctrl+s  stash/pop) rather than discarding it.

Affected version

GitHub Copilot CLI 1.0.83

Steps to reproduce the behavior

What happened: While typing a long free-text answer into an agent  ask_user  elicitation form, I pressed Enter before finishing. This submitted/advanced the form, and when I hit Escape to get back, my entire in-progress answer was erased with no way to recover it.

Expected behavior

Expected: Either (a) Enter in a multi-line form field should insert a newline (require an explicit submit action/confirmation to send), and/or (b) an accidental submit/escape should preserve the drafted text (e.g., restore it into the input buffer, or offer undo/ ctrl+r -style recovery). Long answers should never be silently, irrecoverably lost.

Additional context

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先复现 ask_user elicitation 表单中的提前按 Enter 和 Escape 流程,然后检查文本输入在提交和取消时的处理方式。完成的标准是长篇草稿不会被不可挽回地丢弃,并且所选择的提交行为清晰明确,且已针对意外按键进行了测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。