Skip to content

feat(frontend): 新增快捷键自定义页 - #43

Open
LIghtJUNction wants to merge 1 commit into
zyf2007:mainfrom
LIghtJUNction:feat/customizable-keyboard-shortcuts
Open

LIghtJUNction wants to merge 1 commit into
zyf2007:mainfrom
LIghtJUNction:feat/customizable-keyboard-shortcuts

Conversation

@LIghtJUNction

Copy link
Copy Markdown

变更内容

  • 在设置弹窗中新增“快捷键”页,可录制、清除、恢复默认并保存各类回复动作
  • 保留现有默认键位:
    • Enter:流式输出
    • Shift+Enter:换行
    • Ctrl/⌘+Enter:结束输出
    • Alt+Enter:继续编辑已流式输出的内容
    • 切换类型默认不绑定
  • 支持把 Shift+Enter 配置为结束输出、把 Shift+Tab 配置为“助手消息 → 思考内容 → 工具调用”循环
  • 工作区提示文案会随用户配置即时更新;IME composing/keyCode 229 期间不会误触
  • 快捷键按 ChatAPI 用户隔离保存在当前浏览器,并通过 storage + 同页变更事件同步;存在本地草稿时会阻止覆盖其他标签页的新配置
  • 拒绝普通文本、编辑、浏览器、系统保留键及 AltGraph/Ctrl+Alt 组合,避免把撤销、粘贴、关闭标签页等操作变成发送动作
  • Shift+Tab 仅在用户明确绑定后才拦截,并且不会劫持工具参数输入框、Select 或按钮的原生键盘行为

验证

  • npm test(20 tests)
  • npm run lint
  • npm run build
  • Chromium 桌面与 390px 移动端检查
  • 录制、非法键拒绝、冲突拒绝、保存、恢复默认、跨标签页冲突保护交互检查

Copilot AI lite review requested due to automatic review settings August 25, 2026 04:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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