feat(ai): unify reply center and refresh keyboard AI features
- Merge invitation, task, blessing, clarification, and empathy actions into a single Reply flow, with three fixed, clearly labeled stance choices whenever user intent must not be guessed. - Refine clipboard semantic routing with bilingual schedule, confirmation, and follow-up models, conservative language thresholds, and explicit-assignment guard for complaint-only text. - Persist Apple account refresh state, harden session recovery, and surface durable account diagnostics across keyboard and app. - Derive personal-style prompts through two-stage corpus evidence and apply real low-confidence ASR tendencies instead of neutral templates. - Localize the new reply center, clipboard semantics, and personal-style surfaces in both English and Simplified Chinese.
This commit is contained in:
@@ -229,6 +229,10 @@ private final class HardTimeoutRace<T: Sendable>: @unchecked Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public enum HardTimeoutError: Error, Equatable, Sendable {
|
||||
case timedOut
|
||||
}
|
||||
|
||||
public enum HardTimeout {
|
||||
/// Returns at the deadline even when the losing operation ignores
|
||||
/// cooperative cancellation. The detached loser is still cancelled, but
|
||||
@@ -252,7 +256,7 @@ public enum HardTimeout {
|
||||
try await Task.sleep(
|
||||
nanoseconds: UInt64(max(0, seconds) * 1_000_000_000)
|
||||
)
|
||||
race.resolve(.failure(CancellationError()))
|
||||
race.resolve(.failure(HardTimeoutError.timedOut))
|
||||
} catch {
|
||||
// The operation won and cancelled this timer.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user