feat: add Toggle Dictation App Intent for Siri and Shortcuts - #162
Closed
claude[bot] wants to merge 2 commits into
Closed
feat: add Toggle Dictation App Intent for Siri and Shortcuts#162claude[bot] wants to merge 2 commits into
claude[bot] wants to merge 2 commits into
Conversation
Expose the hotkey's tap-to-toggle behaviour as an App Intent so a dictation can be started or stopped by voice (Siri, e.g. from AirPods) or from the Shortcuts app. The intent runs without foregrounding Blurt and drives the same DictationSession command feed as the key tap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wd3oRQC3j1M4BC7vbT49NV
…ned_doc_comment SwiftLint's orphaned_doc_comment rule fires when a doc comment is separated from its declaration by a plain comment, which is exactly where the two periphery:ignore commands sat. Above the doc block they stay in the declaration's leading trivia, so periphery still honors them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wd3oRQC3j1M4BC7vbT49NV
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 Alex Kroman · Slack thread
What & why
Before: a dictation can only be started or stopped with the hotkey.
After: a "Toggle Dictation" action appears in the Shortcuts app, and Siri can trigger it by voice — e.g. "Hey Siri" from AirPods — so a dictation can be started and stopped hands-free.
How:
ToggleDictationIntent(anAppIntent) calls a newAppCoordinator.toggleDictation(), which submits.releasewhen capturing and.pressotherwise through the same fire-and-forgetDictationSession.submit(_:)command feed the key tap drives, so commands stay in emit order.openAppWhenRunstays false so Siri runs it without foregrounding Blurt (which would steal focus from the app being dictated into). ABlurtAppShortcutsprovider registers built-in phrases so it works with no setup. No URL scheme, no Info.plist or entitlement changes — App Intents need none. Known benign desync, noted in the doc comment: a programmatic start leaves the key-tap gate idle, so the next physical tap follows the gate's own latch logic; the gate is already re-synced on every terminal phase.Placement note: the intent types live at the bottom of
AppDelegate.swift(beside theNSApp.delegatethey reach through) rather than a newIntents/file, because this change was authored in a Linux sandbox wherexcodegencan't run — a new source file would leave the committedproject.pbxprojbehind and fail the drift check. If you'd rather haveIntents/ToggleDictationIntent.swift, it's a file move plusxcodegen generateon a Mac.How to use with Siri
How it was tested
Authored on Linux, so no local build/test — CI on macOS is the authority here.
scripts/check.sh --portablepasses (repo-integrity guards, settled-decision invariants, portability, linters, evals). Not validated locally: the macOS build, actually invoking the intent from Siri/Shortcuts, and periphery's view of the reflectively-discovered intent types (both carryperiphery:ignore, matching the repo's practice for reflection-only symbols). The shell has no unit-test target and the engine coverage gate doesn't reach app-target code, so no new tests per repo convention.scripts/check.shpasses (or CI will, if I'm not on a Mac)🤖 Generated with Claude Code
https://claude.ai/code/session_01Wd3oRQC3j1M4BC7vbT49NV
Generated by Claude Code