Skip to content

refactor(sdk): move key terms and text shortcuts into the AssemblyAI SDK - #231

Merged
alexkroman merged 3 commits into
jhe/blurt-designfrom
jhe/sdk-text-shortcuts
Oct 15, 2026
Merged

alexkroman merged 3 commits into
jhe/blurt-designfrom
jhe/sdk-text-shortcuts

Conversation

@he-james

@he-james he-james commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What & why

Key terms and text shortcuts become features of the open-source AssemblyAI Swift SDK (Sources/AssemblyAI), so any app built on it gets them, not just Blurt.

  • KeyTerms: parse (comma list → clean, deduped terms), join, and fitted (the keyterms_prompt caps: 100 terms, 2048 bytes). This was KeytermsBoost plus KeyTermsStore.parse.
  • TextShortcut and TextShortcutExpander: say a phrase and get saved text. It's expanded on the device, and the expansion is redacted from context sent back to AssemblyAI. matchKey moves onto TextShortcut.

Stays in BlurtEngine: Blurt's storage, meaning KeyTermsStore and TextShortcutStore, their UserDefaults keys and limits.

iPhone: the duplicate KeyTermList is replaced by KeyTerms.

Desktop is unchanged: the Mac app gains one import AssemblyAI and the matchKey rename. Behaviour, defaults keys and stored data are identical.

Stacked on #230. The iPhone Words tab that uses this follows in the next PR.

How it was tested

  • swift test: 711/711. The parse tests moved into the KeyTerms suite, and a join round-trip was added.

  • Mac Debug and Release builds, swiftlint analyze and periphery are clean. KeyTerms.join gets the repo's usual iOS-only periphery:ignore.

  • scripts/ios-check.sh: 133 tests (the duplicate KeyTermList suite was removed) and BlurtiOSCore at 96.65%.

  • Local check.sh passes except the coverage gate, at 87.65%, which is this Mac's known gap: main measures 87.64% here. CI is the authority.

  • scripts/check.sh passes (or CI will, if I'm not on a Mac)

  • I read AGENTS.md and this doesn't reintroduce anything deliberately removed

  • Docs updated if behavior changed

🤖 Generated with Claude Code

@he-james
he-james requested review from alexkroman and hsingh-aai and removed request for alexkroman October 2, 2026 22:46
@he-james
he-james marked this pull request as ready for review October 2, 2026 22:46
he-james and others added 2 commits October 2, 2026 18:11
KeyTerms (parse a comma-separated list, fit it to keyterms_prompt's
caps; was KeytermsBoost plus KeyTermsStore.parse) and TextShortcut with
its on-device TextShortcutExpander now live in Sources/AssemblyAI, so
any app on the SDK gets them. BlurtEngine keeps Blurt's storage:
KeyTermsStore and TextShortcutStore, their UserDefaults keys and limits.

The iPhone's duplicate KeyTermList is replaced by KeyTerms. The Mac app
only gains an import; its behaviour and stored data are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@he-james
he-james force-pushed the jhe/sdk-text-shortcuts branch from 8789b22 to 640ffd4 Compare October 2, 2026 23:11
* feat(ios): add a Words tab for key terms and text shortcuts

The app gets Dictate and Words tabs under a brand tab bar, as in the
blurt-ios prototype. MainView owns what works on either tab: Settings
from each tab's gear, the consent sheet and shared key-term lists.

Words, on the AssemblyAI SDK's KeyTerms and TextShortcut:
- Key terms as pills with an inline add field (commas add several,
  duplicates drop, capped at the request's 100), the contact-name
  count, and Share. They move here from Settings.
- Text shortcuts with an inline "When I say / Type this" form;
  re-adding a phrase replaces it. Expanded on the phone, never sent.

BlurtDesign gains BrandTabBar, FlowLayout, brandInput() and
brandFootnote(), and brand buttons fade while disabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ios): drop the Words tab pointer from Settings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@alexkroman
alexkroman merged commit 8673618 into jhe/blurt-design Oct 15, 2026
1 check passed
@alexkroman
alexkroman deleted the jhe/sdk-text-shortcuts branch October 15, 2026 00:15
claude Bot pushed a commit that referenced this pull request Oct 15, 2026
TextShortcut moved from BlurtEngine to the AssemblyAI module in #231;
this test (added on main in #243) still only imported BlurtEngine.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBXt5MoXHUDypywez9xZR3
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