Skip to content

为consume hooks 添加 clearInput 选项#538

Merged
AAswordman merged 1 commit into
AAswordman:mainfrom
Yinglianchun:feat/chat-input-consume-clear-input
May 15, 2026
Merged

为consume hooks 添加 clearInput 选项#538
AAswordman merged 1 commit into
AAswordman:mainfrom
Yinglianchun:feat/chat-input-consume-clear-input

Conversation

@Yinglianchun
Copy link
Copy Markdown
Contributor

为 ChatInputHook 的 consume 返回结果增加可选 clearInput 字段。

当 ToolPkg 在 submit_requested 阶段返回 { action: "consume", clearInput: true } 时,聊天输入框会清空当前草稿并收起附件面板,同时仍然消费本次发送事件。

默认 consume 行为保持不变;插件只有显式返回 clearInput: true 时才会清空输入框。

验证:

  • 已运行 git diff --check
  • 当前 Release 手动验证:consume 能拦截发送,但默认会保留草稿;本改动用于补齐插件主动清空草稿的能力
Screenshot_2026-05-15-17-41-29-833_com ai assista

@AAswordman AAswordman merged commit 53d26e0 into AAswordman:main May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants