feat(app): add crash visibility, memory relief, and clipboard reply work
Squashes the working tree that had accumulated on cloud-agent. Two strands of work, kept in one commit at the maintainer's request. Crash and stability (this session): - Subscribe to MetricKit so crash, hang, CPU, and disk-write diagnostics are recorded on device. Keyboard-extension memory kills are the most likely way a user loses the keyboard mid-sentence and iOS does not classify them as crashes, so they never reach App Store Connect. - Upload those reports to POST /v1/analytics/diagnostics from internal builds only (local Debug and TestFlight), reusing the analytics installation identifier and skipping entirely when analytics are off. App Store builds keep everything on device. - Shed the Chinese engine, English lexicon, and in-flight pipeline work at the 40 MiB and 48 MiB budget thresholds instead of waiting for a system memory warning that jetsam often preempts. - Install audio taps with the input node's live format through one shared adaptive resampler, so an audio-route change mid-recording no longer raises an uncatchable format-mismatch exception. Covers the dictation preview and the Mac recorder, which still used the pattern the Flow capture path had already moved away from. - Harden the librime bridge: never pass a nil string across a nonnull boundary when a user dictionary holds malformed UTF-8, null-check the engine API vector, and distrust a candidate count without its array. - Guard the expanded candidate grid against a list that shrinks while the collection view is still laying out against the previous count. - Resolve localized text without the App Group so the screen shown when that container is missing renders its message instead of crashing on launch, which is the one situation it exists to handle. - Gate CI on the App Group and Keychain wiring that the keyboard extension hard-depends on, with a self-test proving the check fails. Clipboard, reply, and semantics (pre-existing working tree): - Unify the reply center, refresh keyboard AI features, and add native event and reminder exporters. - Expand clipboard semantic routing with authored corpora and a product-blind holdout, plus the scripts that build and validate them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,11 +67,13 @@
|
||||
"error.cloudASR.invalidURL" = "Invalid cloud ASR endpoint.";
|
||||
"error.cloudASR.http" = "Cloud ASR returned HTTP %lld.";
|
||||
"error.cloudASR.httpWithMessage" = "Cloud ASR returned HTTP %lld: %@";
|
||||
"error.cloudASR.insufficientBalance" = "Account balance is insufficient. Some models require a positive balance even when priced at ¥0 — top up your account and try again.";
|
||||
"error.cloudASR.decoding" = "Failed to parse cloud ASR response: %@";
|
||||
"error.cloudASR.transport" = "Cloud ASR network error: %@";
|
||||
"error.cloudASR.emptyTranscript" = "Cloud ASR returned an empty transcript.";
|
||||
"error.cloudASR.audioTooLong" = "Audio segment is too long for this cloud ASR provider.";
|
||||
"error.cloudASR.providerUnsupported" = "This provider does not support cloud speech recognition yet.";
|
||||
"error.cloudASR.timedOut" = "Connection check timed out. The provider did not respond in time — check your network, API key, and account balance, then try again.";
|
||||
"error.cloudASR.streamingNotImplemented" = "Streaming ASR failed for this provider. Check your API key and network, or try again.";
|
||||
|
||||
/* Managed account gateway */
|
||||
@@ -200,7 +202,7 @@
|
||||
"mac.styles.prompt" = "Complete prompt";
|
||||
"mac.styles.hint" = "Use {{DICTIONARY}} to place the personal dictionary. System rules are appended automatically.";
|
||||
"mac.styles.learn.title" = "Generate Your Style";
|
||||
"mac.styles.learn.body" = "Learn how you naturally express yourself from past dictation.";
|
||||
"mac.styles.learn.body" = "Learn how you naturally express yourself from past dictation. Applies to AI replies on the iPhone keyboard.";
|
||||
"mac.styles.learn.progress" = "%lld / %lld characters";
|
||||
"mac.styles.learn.remaining" = "%lld to go";
|
||||
"mac.styles.learn.ready" = "Ready";
|
||||
@@ -287,7 +289,6 @@
|
||||
"mac.delete" = "Delete";
|
||||
"mac.dict.deleteTitle" = "Delete this word?";
|
||||
"mac.dict.deleteMessage" = "This cannot be undone.";
|
||||
"mac.hint.holdOption" = "Hold Option to dictate";
|
||||
"mac.settings.cloudProvider" = "CLOUD PROVIDER";
|
||||
"mac.settings.polishProvider" = "TEXT POLISH (LLM)";
|
||||
"mac.settings.asrProvider" = "SPEECH RECOGNITION (ASR)";
|
||||
@@ -470,7 +471,6 @@
|
||||
"settings.appLanguage.english" = "English";
|
||||
"settings.appLanguage.chinese" = "Chinese";
|
||||
|
||||
|
||||
/* Account — Mac account page (Sign in with Apple, credits, invitation link).
|
||||
The account.* / account.referral.* keys below mirror the iOS app bundle so
|
||||
the shared AccountSessionCoordinator error keys resolve on macOS too. */
|
||||
@@ -523,3 +523,51 @@
|
||||
"account.referral.error.notFound" = "Your invitation link isn’t available yet.";
|
||||
"account.referral.error.session" = "Sign in again to load your invitation link.";
|
||||
"account.referral.error.unavailable" = "The invitation service is temporarily unavailable.";
|
||||
|
||||
/* Rime / typing engine errors */
|
||||
"error.rime.appGroupUnavailable" = "App Group unavailable.";
|
||||
"error.rime.bundledResourceMissing" = "Missing input-method resource: %@";
|
||||
"error.rime.lockUnavailable" = "Input-method resources are being updated by another process.";
|
||||
"error.rime.deploymentFailed" = "Input-method resource deployment failed.";
|
||||
"error.rime.resourcesNotInstalled" = "Open OSGKeyboard first to finish input-method setup.";
|
||||
"error.rime.hostAppRequired" = "Input-method resources can only be deployed by the OSGKeyboard app.";
|
||||
"error.rime.schemaUnavailable" = "Input schema unavailable: %@";
|
||||
|
||||
/* Text polish errors */
|
||||
"error.polish.noTranscript" = "No transcript to polish.";
|
||||
"error.polish.timeout" = "LLM polish timed out.";
|
||||
"error.polish.missingAPIKey" = "Missing API key — fill it in Settings before polish can run.";
|
||||
"error.polish.keychainLocked" = "API key unavailable while the device is locked — will work after unlock.";
|
||||
|
||||
/* Local ASR model errors */
|
||||
"error.localASR.downloadFailed" = "Download failed: %@";
|
||||
"error.localASR.extractFailed" = "Extract failed: %@";
|
||||
"error.localASR.validationFailed" = "Validation failed: %@";
|
||||
"error.localASR.runtimeMissing" = "Sherpa runtime is not installed.";
|
||||
"error.localASR.binaryMissing" = "Sherpa binary not found in runtime bundle.";
|
||||
"error.localASR.missingBundledCatalog" = "Missing bundled local ASR catalog.";
|
||||
"error.localASR.modelNotFound" = "Local ASR model not found: %@";
|
||||
|
||||
/* Account service errors */
|
||||
"error.account.refreshTokenReuse" = "The session was revoked because refresh-token reuse was detected.";
|
||||
"error.account.transport" = "The account service could not be reached.";
|
||||
"error.account.invalidResponse" = "The account service returned an invalid response.";
|
||||
"error.account.decoding" = "The account service response could not be decoded.";
|
||||
"error.account.secureStorage" = "The private account session could not be stored securely.";
|
||||
"error.account.sessionUnavailable" = "No account session is available.";
|
||||
"error.account.appleAuthorization" = "Sign in with Apple did not return valid credentials.";
|
||||
"error.account.integrityUnavailable" = "Device integrity verification is unavailable.";
|
||||
|
||||
/* Custom language model errors */
|
||||
"error.clm.missingManifest" = "Missing bundled custom language model manifest.";
|
||||
"error.clm.missingTrainingAsset" = "Missing bundled custom language model training asset.";
|
||||
"error.clm.missingAppGroupContainer" = "App Group container unavailable for custom language model preparation.";
|
||||
"error.clm.missingPreparedArtifacts" = "Custom language model preparation did not produce LM/Vocab artifacts.";
|
||||
"error.clm.retryBudgetExhausted" = "Custom language model preparation retry budget exhausted.";
|
||||
|
||||
/* macOS-only errors and status labels */
|
||||
"mac.error.speechDenied" = "Speech recognition permission denied.";
|
||||
"mac.error.converterUnavailable" = "Failed to initialize audio converter.";
|
||||
"mac.error.microphoneAccessDenied" = "Microphone access denied — enable it in System Settings → Privacy & Security → Microphone.";
|
||||
"mac.accessibility.status.granted" = "Granted";
|
||||
"mac.accessibility.status.needed" = "Needed";
|
||||
|
||||
Reference in New Issue
Block a user