Michael Zhu
iMessage Tab Completion

My brother and I were prototyping a Cursor for iMessage over the holidays.

Here's an early demo of what tab completion could look like.

Some example tab completion flows:

Making dinner plans:

  1. I say to person XYZ I'm going to ask person ABC whether they also want to go to dinner with us.
  2. tab suggests switching to conversation with ABC
  3. in chat with ABC, tab suggests "dinner tn?"
  4. after ABC responds, tab suggests to switch back to the original conversation
  5. in chat with XYZ, tab suggests "ABC says they're down"

Introductions:

  1. XYZ introduces me to ABC over text
  2. tab suggests "Thank you XYZ!" followed by "will message you directly ABC"
  3. tab then suggests creating a new convo with ABC
  4. in chat with ABC, tab suggests "nice to meet you ..."

--------

Implementation notes:

iMessage stores all your messages in a sqlite db under ~/Library/Messages/chat.db and you can use AppleScript to send messages programmatically.

We built a clone of the iMessage interface using Electron and setup a backend that queries the chat db and watches for changes.

Right now, we fetch contact information by making AppleScript calls that open the Contacts app and search for handles (phone number / email) stored in the chat db. This approach is super slow and unreliable but good enough for a prototype. (Edit: I realize there is an AddressBook sqlite db and also a Contacts API from Apple for faster access to contacts metadata)

Regarding LLM selection for the tab completion feature, there is a tradeoff between latency and conversational understanding. Some anecdotal observations:

Honestly as a user, I want both Opus 4.5 level accuracy with sub-200ms latency.

We're gonna pause this project for now, but the next thing I'd want to try is fine tuning the faster models specifically for this use case.