You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
问题
Desktop 客户端(
apps/desktop)不支持复制粘贴。Electron 壳只安装了一个应用菜单,其唯一子菜单只包含插件管理器、更新检查和退出。macOS 通过应用菜单分发 ⌘C、⌘V、⌘X、⌘A 等标准剪贴板快捷键,因此在缺少 Edit 菜单时,这些快捷键无法到达聚焦的渲染进程:dsh Web UI 和插件管理器中的复制粘贴都会失效。Windows/Linux 依靠 Chromium 自身处理仍可工作,但所有平台都缺少标准编辑入口。
修复(Fixed by dsh)
修复已完成并在 macOS 上验证,对应 commit
387bb8a394,分支fix/desktop-edit-menu-clipboard-shortcuts:改动内容:
apps/desktop/src/main.ts:在通过Menu.buildFromTemplate构建的应用菜单中加入顶层 Edit 菜单,菜单项使用 Electron 角色undo、redo、cut、copy、paste、selectAll。快捷键与编辑命令由角色提供,壳不自行实现剪贴板操作;菜单在创建任何窗口前安装一次,主窗口与插件窗口共享。apps/desktop/src/locale.ts:中英文各新增 7 个 Edit 菜单文案键(编辑/撤销/重做/剪切/复制/粘贴/全选),保持 locale 归属文案约定。apps/desktop/tests/main-startup.spec.ts:捕获传给Menu.buildFromTemplate的模板,断言 Edit 子菜单的角色顺序与本地化标签。apps/desktop/README.md、apps/desktop/README.zh.md:说明应用菜单包含标准编辑操作。.agents/notes/implemented/bug-fix/2026-09-17-desktop-edit-menu-clipboard-shortcuts.md(含中文与 i18n 记录)。用户可观察行为:macOS 上主窗口与插件窗口的复制、粘贴、剪切、全选、撤销、重做快捷键恢复;Windows/Linux 增加可见的 Edit 菜单。命令、配置、API、协议或持久化格式无变化。
验证
pnpm exec vitest run apps/desktop/tests/main-startup.spec.ts apps/desktop/tests/locale.spec.tspnpm run verify-client-ui-i18npnpm run doc-syncmacOS 运行时验证(dev 壳,主进程 inspector):读取实时应用菜单,确认 Edit 菜单的角色与加速键;随后确认
webContents.paste()能把系统剪贴板插入聚焦的渲染进程输入框。{ "label": "编辑", "items": [ { "label": "撤销", "role": "undo", "accelerator": "CommandOrControl+Z" }, { "label": "重做", "role": "redo", "accelerator": "Shift+CommandOrControl+Z" }, { "label": "剪切", "role": "cut", "accelerator": "CommandOrControl+X" }, { "label": "复制", "role": "copy", "accelerator": "CommandOrControl+C" }, { "label": "粘贴", "role": "paste", "accelerator": "CommandOrControl+V" }, { "label": "全选", "role": "selectall", "accelerator": "CommandOrControl+A" } ] }手工测试:在开发壳中选取工作区后,复制、粘贴、剪切、全选、撤销/重做均正常。
备注
尝试提交 PR 时发现
deepseek-ai/deepseek-harness关闭了 Pull Requests(has_pull_requests=false,RESTGET /pulls返回 404),CONTRIBUTING 也写明目前无法接受外部 PR,因此按 CONTRIBUTING 的建议改用 Discussion 提交,供团队参考或采纳。All reactions