Skip to content

命令输入 UX 问题:需要敲两次回车才能执行命令 || UX problem: You need to hit Enter twice to execute the command #1682

@Yuandiaodiaodiao

Description

@Yuandiaodiaodiao

问题描述

在使用命令补全功能时,用户需要敲两次回车才能执行命令,这与其他 CLI 工具(如 Claude Code)的行为不一致,严重影响使用体验。

复现步骤

  1. 在输入框输入命令的缩写,如 /cl
  2. 敲回车

预期行为:

  • 命令自动补全为 /clear直接执行(参考 Claude Code 的行为)
  • 用户只需要敲一次回车

实际行为:

  • 命令补全为 /clear不执行
  • 用户需要再敲一次回车才能执行
  • 总共需要敲两次回车

对比

CLI 工具 输入 操作 结果
Claude Code /cl 敲回车 × 1 ✅ 直接执行 /clear
kimi-cli /cl 敲回车 × 2 ❌ 需要两次回车才能执行

影响

这个问题严重影响使用效率和体验:

  • 打断了用户的操作流程
  • 与用户的预期行为不符(敲回车 = 执行命令)
  • 与业界其他 CLI 工具的行为不一致

建议

建议参考 Claude Code 等工具的实现:

  • 用户敲回车时,如果有命令补全,应该自动补全并立即执行
  • 不需要用户二次确认

Problem description

When using the command completion function, the user needs to press Enter twice to execute the command. This is inconsistent with the behavior of other CLI tools (such as Claude Code) and seriously affects the user experience.

Reproduction steps

  1. Enter the abbreviation of the command in the input box, such as /cl
  2. Press Enter

Expected Behavior:

  • Command auto-completion is /clear and direct execution (refer to Claude Code's behavior)
  • Users only need to type enter once

Actual behavior:

  • Command completion is /clear but not executed
  • The user needs to press Enter again to execute
  • You need to hit Enter twice in total**

Compare

CLI Tools Input Actions Results
Claude Code /cl Hit Enter × 1 ✅ Directly execute /clear
kimi-cli /cl Press Enter × 2 ❌ Two press Enters are required to execute

Impact

This problem seriously affects usage efficiency and experience:

  • Interrupt the user's operation flow
  • does not match the user's expected behavior (hit Enter = execute command)
  • Inconsistent behavior with other CLI tools in the industry

Suggestions

It is recommended to refer to the implementation of tools such as Claude Code:

  • When the user presses Enter, if there is a command completion, it should be automatically completed and executed immediately
  • No need for the user to confirm the command input twice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions