Skip to content

feat: 空输入时用 Ctrl+C 清除当前上下文 #280

Closed

Description

@somewan820

问题

当前交互式输入框中的 Ctrl+C 只会清空输入内容;当输入框本身为空时,用户仍无法用该快捷键快速丢弃当前会话上下文和历史消息。

期望行为

  • 输入框有内容时,Ctrl+C 继续清空当前输入。
  • 输入框为空时,Ctrl+C 创建一个干净的新 Session,使此前的历史消息不再进入模型上下文。

背景

该交互方式与 Codex 的空输入 Ctrl+C 行为一致,也比手动输入 /new 更适合频繁切换任务上下文。

验收标准

  • 不改变有输入内容时的原生 Ctrl+C 行为。
  • 空输入时通过 Pi 原生 Session 生命周期创建新会话,而不是直接篡改 Session 文件。
  • 补充自动化测试并通过项目检查和测试。

Activity

  1. self-assigned this
    on Aug 29, 2026
  2. added a commit that references this issue on Aug 30, 2026
    ba26d32
  3. added a commit that references this issue on Sep 3, 2026
    363fe00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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