From dae966ffd1d2c60a1cba180862c0ff880ed5e626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E6=9F=8F=E9=9D=92?= Date: Fri, 5 Jun 2026 13:30:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(less-computer):=20=E3=80=8C=E6=8C=89?= =?UTF-8?q?=E4=BD=8F=E8=AF=B4=E8=AF=9D=E9=94=AE=E3=80=8D=E6=8C=AA=E5=88=B0?= =?UTF-8?q?=20=E9=80=9A=E7=94=A8=E2=86=92=E5=BF=AB=E6=8D=B7=E9=94=AE?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E6=8E=89=E9=AB=98=E7=BA=A7=E9=87=8C=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 通用 → 快捷键 新增 Less Computer 行(macOS):可直接启用并录制按住说话键, 和听写/翻译/QA/切风格/打开应用一排,用户一眼就能看到(之前埋在高级里)。 启用按钮一键置 codingAgentEnabled=true + 默认键,保存即触发后端重新注册。 - 高级 → Less Computer 移除重复的按住说话键行,只留后端/模型/权限/工作目录。 - tsc 0。 --- .../src/pages/settings/CodingAgentSection.tsx | 28 ++--------------- .../src/pages/settings/ShortcutsSection.tsx | 31 ++++++++++++++++++- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/openless-all/app/src/pages/settings/CodingAgentSection.tsx b/openless-all/app/src/pages/settings/CodingAgentSection.tsx index 6950f832..feaf892d 100644 --- a/openless-all/app/src/pages/settings/CodingAgentSection.tsx +++ b/openless-all/app/src/pages/settings/CodingAgentSection.tsx @@ -1,10 +1,9 @@ -// 高级 → Less Computer 配置:启用开关、按住说话快捷键、Claude / OpenCode、模型 / 权限模式 / 工作目录。 +// 高级 → Less Computer 配置:启用开关、后端(Claude / OpenCode)、模型 / 权限模式 / 工作目录。 +// 「按住说话键」在 通用 → 快捷键 里配置(见 ShortcutsSection),这里不再重复。 // 配置经 UserPreferences 持久化;启用后 coordinator 才注册热键。 import { useTranslation } from 'react-i18next' -import { ShortcutRecorder } from '../../components/ShortcutRecorder' import { detectOS } from '../../components/WindowChrome' -import { defaultLessComputerShortcut } from '../../lib/hotkey' import type { CodingAgentPermissionMode, CodingAgentProviderId } from '../../lib/types' import { useHotkeySettings } from '../../state/HotkeySettingsContext' import { Card } from '../_atoms' @@ -48,28 +47,7 @@ export function CodingAgentSection() { {enabled && ( <> - - {prefs.codingAgentVoiceHotkey ? ( - { - await savePrefs({ ...prefs, codingAgentVoiceHotkey: binding }) - }} - onDisable={async () => { - await savePrefs({ ...prefs, codingAgentVoiceHotkey: null }) - }} - /> - ) : ( - - )} - - + {/* 「按住说话键」配置已挪到 通用 → 快捷键,避免和这里重复。本区只留后端/模型等高级项。 */}