From 084cdd26d0f2bfa96d165c0a77a0697406919634 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Mon, 29 Jun 2026 01:19:28 +0800
Subject: [PATCH] Add Monterey compatibility build line

---
 privatevoice.src/app.go |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/privatevoice.src/app.go b/privatevoice.src/app.go
index 783c115..2fe71b1 100755
--- a/privatevoice.src/app.go
+++ b/privatevoice.src/app.go
@@ -28,8 +28,8 @@
 )
 
 const (
-	appVersion        = "2.1.34"
-	appBuild          = "20260623.1312"
+	appVersion        = "2.1.37"
+	appBuild          = "20260629.0059"
 	appDisplayVersion = appVersion + " (build " + appBuild + ")"
 	appName           = "PrivateVoice Dictation"
 
@@ -37,6 +37,7 @@
 	silenceTimeoutDuration   = 3 * time.Second // auto-stop after this much silence in free-talk
 	silenceGracePeriod       = 2 * time.Second // don't auto-stop within first 2s of free-talk
 	holdActivationDelay      = 180 * time.Millisecond
+	defaultReleaseTailDelay  = 300 * time.Millisecond
 	doneIndicatorHideDelayMs = 250
 	liveCaptionInterval      = 120 * time.Millisecond
 	liveCaptionMaxBytes      = 108
@@ -985,9 +986,12 @@
 }
 
 func releaseTailCaptureDelayForEngine(eng engine.Engine) time.Duration {
+	if eng == nil {
+		return 0
+	}
 	tailCaptureEng, ok := eng.(engine.ReleaseTailCaptureEngine)
 	if !ok {
-		return 0
+		return defaultReleaseTailDelay
 	}
 	delay := tailCaptureEng.ReleaseTailCaptureDelay()
 	if delay < 0 {
@@ -997,9 +1001,12 @@
 }
 
 func holdPreCaptureEnabledForEngine(eng engine.Engine) bool {
+	if eng == nil {
+		return false
+	}
 	preCaptureEng, ok := eng.(engine.HoldPreCaptureEngine)
 	if !ok {
-		return false
+		return true
 	}
 	return preCaptureEng.HoldPreCaptureEnabled()
 }

--
Gitblit v1.9.3