Replies: 2 comments 2 replies
|
提案质量很高(默认不变=纯增量、idle/busy 分离、Newline 与 Steer 并存的回归锁定),补两个对决策有用的点: 1. 关于"改走插件生态路线"——这条路今天不通,建议留在仓库内 composer 的按键行为在 client 端包里: 2. 一个可发现性建议
回归测试(busyEnter:steer + enterMode:newline 时 Enter 仍 Steer、Cmd/Ctrl+Enter 仍 Queue)正是这个功能最容易踩的坑,你已经锁死了,赞。diff 27 文件全属本功能 + build/lint/doc-sync/typecheck 全绿,合并风险很低。 |
|
Thanks @zoahdev for the detailed feedback. Following up on this proposal against the current public master, d347e70 (v0.1.3-alpha.1). The implementation linked in the original post already includes the mode-dependent placeholder hint: in idle newline mode it preserves the action prompt and adds the Enter / Cmd-or-Ctrl+Enter shortcut explanation. Thank you for highlighting discoverability. The patch and test results in the original post describe the August implementation baseline. The next reviewable revision will target the current composer architecture and carry fresh validation results for that revision. I would like to keep this proposal focused on the idle Enter preference: Send as the default, optional Newline, Cmd/Ctrl+Enter to send while idle, Shift+Enter for newline, and the existing busy Queue/Steer behavior preserved. Validation will include IME composition, locked/unavailable input, preference persistence, shortcut hints, and the idle/busy keybinding combinations. Following the current contribution guide, I am continuing here in Discussions. For maintainers reviewing this idea: would you prefer this as a built-in conversation setting, or a client extension point through which an ecosystem plugin can implement the behavior? If there is an existing design or preferred integration surface, a pointer would help align the refreshed patch. 中文补充:继续跟进这个单一功能。原实现已包含换行模式下的快捷键提示;原帖验证结果对应当时的实现基线。后续可评审版本会适配当前主线并重新验证。希望确认团队更倾向于内置会话设置,还是提供客户端扩展点供插件实现,以便按项目方向整理改动。 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
This proposal adds a user-facing preference to the Web composer: when the agent is idle, pressing Enter can either send the message (current default, unchanged) or insert a newline — with Cmd/Ctrl+Enter always sending. This matches the familiar chat-style keybinding (Slack/WeChat/Telegram desktop). When the agent is running, the existing
busyEnterQueue/Steer mapping is fully preserved.A complete, ready-to-review implementation is available on my fork (single commit, based on current
master, ahead 1 / behind 0):Behavior
enterMode: send(default)enterMode: newlinebusyEnter: queue/steer)Key design points:
settings.yaml(survives refresh, port changes, and other hosts).newlinemode, the textarea placeholder preserves its current action prompt and appends the Enter/Cmd/Ctrl shortcut meanings; Send mode, busy input, and unavailable composers keep their existing prompts.enterMode: newlineandbusyEnter: steerare both enabled, plain Enter still steers and Cmd/Ctrl+Enter still queues. This historical conflict is locked in by tests.Why
The composer previously hard-coded idle Enter to send. Users who prefer "Enter = newline, Cmd/Ctrl+Enter = send" had to maintain local bundle patches that are lost on every upgrade. The default behavior is unchanged, so this is purely additive.
Verification
pnpm exec vitest run— 7 relatedui-conversationtest files, 118 cases passedsettings-chrome, DSH_SNAPSHOT=replay) — 8 cases passedpnpm run build,pnpm run lint,pnpm run doc-sync(28/28), pre-pushtypecheck— all greenQuestion for the team
Per CONTRIBUTING.md, external pull requests are not accepted at the moment, so I am posting this as a proposal first. The patch is ready to merge as-is when/if that policy changes, and I am happy to adjust it to the team's preferences — including re-shaping it as an ecosystem plugin if composer behavior should be made pluggable.
中文摘要
为 Web 输入框增加"空闲时 Enter 行为"偏好:默认保持 Enter 发送(现状不变);可切换为 Enter 换行、Cmd/Ctrl+Enter 发送(聊天软件习惯按键)。agent 运行中完全保留现有 Queue/Steer 映射,并显式回归了 Newline 与 Steer 同时开启时的冲突(Enter 仍 Steer、Cmd/Ctrl+Enter 仍 Queue)。设置通过 settings.yaml 持久化(跨刷新、端口和 Host)。Newline 模式会在可用的空闲输入框 placeholder 中保留当前操作提示并追加快捷键说明。完整实现已推送到 fork(单提交、基于最新 master,ahead 1/behind 0),验证全过:单测 118 用例、真实 Web e2e 8/8、build/lint/doc-sync 28/28 全绿。按 CONTRIBUTING 说明,外部 PR 当前暂不可提交,先发此贴让团队知晓;可随时按团队要求调整,或改走插件生态路线。
All reactions