Add custom dictionary replacement training#500
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c9f5603ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| guard !self.isTrainingStarting, self.asr.isRunning else { | ||
| self.trainingStopRequestedDuringStart = true | ||
| self.trainingHasError = false | ||
| self.trainingStatusMessage = "Stopping..." | ||
| return |
There was a problem hiding this comment.
Handle external cancellation of training capture
When the training recording has already been stopped outside this view, such as the default Escape cancel shortcut calling stopWithoutTranscription() directly, isTrainingStarting is false and asr.isRunning is false here. Pressing Stop then sets trainingStopRequestedDuringStart and returns, but no pending start will ever call finishTrainingSampleStop(), leaving the training UI stuck on “Stopping...” with the controls disabled until the view is recreated. Treat the non-starting/not-running case as a cancelled empty sample or clear isTrainingRecording instead.
Useful? React with 👍 / 👎.
Description
Adds Train Replacement to Custom Dictionary so users can enter the intended word or phrase, record ASR variants, review/remove captured triggers, and save or merge an Instant Replacement entry.
Also improves dictionary UX by putting new replacements at the top, renaming the saved list to Your Dictionary, adding collapsible dictionary rows, and showing clearer training progress/status.
Type of Change
Related Issues
Testing
swiftlint --strict --config .swiftlint.yml Sources/swiftformat --config .swiftformat SourcesNotes
Screenshots / Video
N/A