Repository navigation
Add on-device polishing with Apple Intelligence as an option next to Claude - #21
Merged
Merged
Conversation
…Claude HushtypeCore gets a TranscriptPolisher protocol with two engines: the existing Claude TranscriptCleaner and a new OnDeviceCleaner that uses the Foundation Models framework. Settings has an engine picker; new installs start on-device when Apple Intelligence is available, people with a Claude key keep Claude. Command mode uses the chosen engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6HfUTnSqwCMfNKSZDhdCT
It was told about <before_cursor>/<after_cursor> even when the prompt had none, so it wrapped replies in those tags (and one sample came back nil). Only include the cursor and keep-verbatim rules when those blocks are present, and strip any stray prompt tags from the reply. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6HfUTnSqwCMfNKSZDhdCT
Fits the window again: the redundant switch and Ready row are gone, and each engine tile carries its own status line. Selection is one thin violet border, icons are the app's line icons, and the step is called Polish. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6HfUTnSqwCMfNKSZDhdCT
…case names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6HfUTnSqwCMfNKSZDhdCT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6HfUTnSqwCMfNKSZDhdCT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6HfUTnSqwCMfNKSZDhdCT
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Fixes testPunctuateAddsCapitalAndClosingMark: without a transcript there's nothing to compare against, so "Done!" stays as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6HfUTnSqwCMfNKSZDhdCT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Chiranjeeb · project thread
What
TranscriptPolisherprotocol andCleanupEngine(.onDevice / .claude).TranscriptCleaner(Claude) conforms, and the newOnDeviceCleaneruses the Foundation Models framework with permissive content-transformation guardrails and greedy decoding.DictationPipelinetakesany TranscriptPolisher. The on-device instructions include only the rules for blocks that are actually in the prompt, because otherwise the small model echoes the tags. Its output then gets a deterministic punctuation pass (capital letter at the start,.or?at the end), and it falls back to the raw transcript when the model answers instead of cleaning.Verified on the real Mac
swift buildandswift testpass. The real on-device test ran with Apple Intelligence enabled: cleanups take about 0.3–1.9 s, fillers and self-corrections are handled, and questions are cleaned rather than answered.The iOS keyboard app (chiranjeebhub/HushType-Keyboard) depends on this through HushtypeCore on
main, so this needs to merge first.Generated by Claude Code