Skip to content

Add on-device polishing with Apple Intelligence as an option next to Claude - #21

Merged
chiranjeebhub merged 8 commits into
mainfrom
claude/project-thread-1258s5
Nov 3, 2026
Merged

chiranjeebhub merged 8 commits into
mainfrom
claude/project-thread-1258s5

Conversation

@chiranjeebhub

Copy link
Copy Markdown
Owner

Requested by Chiranjeeb · project thread

What

  • HushtypeCore: new TranscriptPolisher protocol and CleanupEngine (.onDevice / .claude). TranscriptCleaner (Claude) conforms, and the new OnDeviceCleaner uses the Foundation Models framework with permissive content-transformation guardrails and greedy decoding. DictationPipeline takes any 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.
  • Mac app: Settings › Polish (was "Claude Polish") gets an engine picker with live Apple Intelligence status. The setup step is now called "Polish", with the same tiles. Command mode uses the chosen engine. New installs start on-device when Apple Intelligence is available. Anyone with a saved Claude key keeps Claude. If Apple Intelligence is off, dictations come through as heard, with a notice saying how to turn it on. Text is never silently sent to Claude instead.

Verified on the real Mac

  • swift build and swift test pass. 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.
  • A signed build is installed in /Applications. Settings › Polish and the setup step were checked on screen.

The iOS keyboard app (chiranjeebhub/HushType-Keyboard) depends on this through HushtypeCore on main, so this needs to merge first.


Generated by Claude Code

claude and others added 7 commits November 3, 2026 12:43
…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>
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
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T12:57:43.548860Z
We couldn’t complete this review. Comment @codex review to try again.
cbd951c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chiranjeebhub chiranjeebhub self-assigned this Nov 3, 2026
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
@chiranjeebhub
chiranjeebhub merged commit 475950e into main Nov 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants