[Bug] 输入框已有内容时 Cmd+Return 不换行,而是直接把消息发送出去
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
UI / 界面体验 · UI / UX
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
影响体验 · Major (功能可用但体验受损 / works but degraded)
复现频率 · Reproducibility
必现 · Always
问题描述 · Description
最新版 ZCode 客户端的对话输入框中,Cmd+Return(⌘ + Enter)换行快捷键仅在输入框为空时生效;一旦输入框中已有部分文本,再按 Cmd+Return 会直接把消息发送出去,而不是插入换行。
这导致无法使用 Cmd+Return 对大段文案进行换行排版,不利于编辑长内容。
复现步骤 · Steps to reproduce
- 打开 ZCode 客户端(macOS arm64),进入 Agent 对话
- 保持输入框为空,按 Cmd+Return → 正常插入换行
- 在输入框中输入任意文本(如「你好」)
- 再次按 Cmd+Return
- 观察:消息被直接发送出去,而不是在光标处插入换行
期望表现 · Expected behavior
无论输入框是否已有内容,按 Cmd+Return 都应在光标处插入换行,与输入框当前状态无关。发送消息应仅由 Enter(或用户设定的发送键)触发,保证可以正常编辑 / 排版大段文案。
实际表现 · Actual behavior
输入框为空时 Cmd+Return 正常换行;输入框已有内容时,Cmd+Return 被当作「发送」处理,消息直接发出,无法通过 Cmd+Return 换行。
ZCode 版本 · ZCode version
v3.10.2
设备 / 系统 / 浏览器 · Device / OS / Browser
MacBook Pro / macOS (Apple Silicon arm64) / ZCode 桌面客户端
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the ZCode desktop client v3.10.2 on macOS arm64, using an empty input and then input containing text. Trace the Cmd+Return keyboard handling and verify that it inserts a newline at the cursor in both cases, while the configured send key still sends the message.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100