Handy icon indicating copy to clipboard operation
Handy copied to clipboard

Apple intel integration

Open Schreezer opened this issue 1 month ago • 6 comments

Summary

  • Introduce the Apple Intelligence post-processing provider wired through a Swift FFI bridge so macOS + Apple Silicon users can clean transcripts fully on-device via FoundationModels.
  • Extend Rust settings/actions plus React settings UI to detect Apple provider, auto-select prompts/models, and hide network-only controls while surfacing hardware requirements.

Schreezer avatar Nov 28 '25 09:11 Schreezer

so i have been using this since the last commit, and its working well imo... surely adds latency since its apple's local model so atleast 3B but still better than loading a custom one since this will be loaded anyways if you have apple intelligence enabled

Schreezer avatar Nov 28 '25 17:11 Schreezer

I'm not able to get this to build on my Mac (Tahoe 26.1 (25B78))

error: failed to run custom build command for `handy v0.6.3 (/Users/cj/code/cjpais/Handy/src-tauri)`

Caused by:
  process didn't exit successfully: `/Users/cj/code/cjpais/Handy/src-tauri/target/debug/build/handy-fe8aeb4d6211958b/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=apple_intelligence.swift
  cargo:rerun-if-changed=apple_intelligence_bridge.h

  --- stderr
  apple_intelligence.swift:7:16: error: external macro implementation type 'FoundationModelsMacros.GenerableMacro' could not be found for macro 'Generable(description:)'; plugin for module
 'FoundationModelsMacros' not found
    5 | @available(macOS 26.0, *)
    6 | @Generable
    7 | private struct CleanedTranscript: Sendable {
      |                `- error: external macro implementation type 'FoundationModelsMacros.GenerableMacro' could not be found for macro 'Generable(description:)'; plugin for module 'Found
ationModelsMacros' not found
    8 |     let cleanedText: String
    9 | }

  FoundationModels.Generable:4:145: note: 'Generable(description:)' declared here
  2 | @available(tvOS, unavailable)
  3 | @available(watchOS, unavailable)
  4 | @attached(extension, conformances: Generable, names: named(init(_:)), named(generatedContent)) @attached(member, names: arbitrary) public macro Generable(description: String? = nil)
= #externalMacro(module: "FoundationModelsMacros", type: "GenerableMacro")
    |                                                                                                                                                 `- note: 'Generable(description:)' dec
lared here

  apple_intelligence.swift:7:16: error: external macro implementation type 'FoundationModelsMacros.GenerableMacro' could not be found for macro 'Generable(description:)'; plugin for module
 'FoundationModelsMacros' not found
    5 | @available(macOS 26.0, *)

cjpais avatar Nov 29 '25 09:11 cjpais

Could you please confirm the version of Xcode you have? Command: xcode-select --version xcode-select version 2412. Command: xcodebuild -version Xcode 26.1.1 Build version 17B100

Also working on a patch to allow the ones without the latest version to be able to build, my bad...

Schreezer avatar Nov 30 '25 05:11 Schreezer

Thanks for the callout something in my env with Xcode with messed up

cjpais avatar Nov 30 '25 06:11 cjpais

I have also made changes to make sure it compiles for lower versions.

Schreezer avatar Nov 30 '25 07:11 Schreezer

I'm quite impressed by this set of changes. I haven't had to review it entirely, but I did test it on my Mac and it works pretty well out of the box for me. Give me some time to review, as well as make sure that CI still works with this.

I think this is a great default option for MacOS, and might bring post-processing a little closer to prime-time for everyone

cjpais avatar Nov 30 '25 12:11 cjpais

I think this is a great default option for MacOS, and might bring post-processing a little closer to prime-time for everyone

I 💯 agree with this - as @Schreezer says: it adds a bit of latency, but compared to other local models (which I don't want loaded all the time) it's much better. Works great for me (M2, macOS 26.0.1) and built with no issues.

dannysmith avatar Dec 04 '25 15:12 dannysmith

I just want to say a huge thanks for this @Schreezer, it's genuinely amazing

cjpais avatar Dec 09 '25 14:12 cjpais