feat: hold-to-talk + UX fixes + structured prompt overhaul
* feat: add hold-to-talk hotkey mode (closes #1) OpenLessHotkey now emits explicit .pressed / .released edge events on the modifier-key trigger; the coordinator interprets them per the new HotkeyMode preference (toggle stays the default, hold = press-and-hold). Hold mode rules: .pressed on idle starts the session; .released stops it from .listening; releasing during .starting cancels (no audio useful was captured yet). Esc-cancel sets a one-shot suppress flag so the trailing .released after a cancel does not re-trigger end. Settings hub gets a "录音方式" segmented picker and a one-line hint explaining the tradeoff. Bump version to 1.1.0; update README roadmap and USAGE walkthrough to document the new mode. * test: update HotkeyEventTests for pressed/released split * chore: tag hold-to-talk build as 1.0.01 / A1003 * fix: stop window-background drag eating text selection; add eye toggle on secret fields Settings window had isMovableByWindowBackground = true, so any drag inside the content view dragged the whole window — making it impossible to select words inside a TextField. Disable it; the native title-bar strip (with the traffic lights) still drags the window. PasteableCredentialField now exposes an eye / eye.slash toggle when secure: true, so users can verify pasted API keys before saving. * fix: stop pretending polish ran when it was skipped or errored When the user removes the Ark API key (or the Ark call errors out), DictationCoordinator was still showing the green "已插入" capsule and recording the session in history under the originally-selected polish mode. From the user's side it looked like polish had succeeded, even though only the raw transcript reached the cursor. Track a PolishOutcome (ok / skippedNoCredentials / failed) through insertText. Capsule now uses a new CapsuleState.warning (orange) state to surface honest messages — "已插入原文 · 未润色" / "润色失败 · 已用原文" — and history saves the session as PolishMode.raw whenever polish didn't actually run. The error capsule + 1.5s artificial sleep that preceded a fake "success" insert is gone; warning state stays for the normal 2.5s. * feat(polish): make Structured mode prompt force a 1./1)/a. hierarchy Some weaker chat models would emit a single flat list when the user asked for Structured polish, even when the dictation clearly covered multiple topics. The mode is meant to produce something pasteable as an AI prompt or a working doc, not a wall of bullets. Rewrite the .structured system prompt to be prescriptive: when the input contains ≥2 themes, emit three explicit levels — top "1./2./3." sections, "1)/2)/3)" sub-points indented 3 spaces, and "a./b./c." detail items indented another 3 — and to fall back to a plain paragraph when the input is short / single-topic. Add a concrete format example so weaker models have a pattern to copy. --------- Co-authored-by: baiqing <lbx12309@icloud.com>
This commit is contained in:
1 parent
66fb1b33b2
commit
56c3e09983
15 files changed
+221
-40
No files matched your search
@@ -6,8 +6,8 @@ cd "$(dirname "$0")/.."
|
||||
|
||||
APP_NAME="OpenLess"
|
||||
BUNDLE_ID="com.openless.app"
|
||||
APP_VERSION="1.0.0"
|
||||
BUILD_NUMBER="1"
|
||||
APP_VERSION="1.0.01"
|
||||
BUILD_NUMBER="A1003"
|
||||
BUILD_DIR="build"
|
||||
APP_DIR="${BUILD_DIR}/${APP_NAME}.app"
|
||||
BIN_DIR="${APP_DIR}/Contents/MacOS"
|
||||
|
||||
Reference in new issue
Block a user