Repository navigation
Description
PRs here are limited to collaborators, so filing this as an issue. A fix with tests is on a fork branch, two commits on current main (685c517), ready to cherry-pick: Brandon168/sweetpad@sweetpad-dev:sweetpad:main...Brandon168:sweetpad:fix/appintents-input-options
The App Intents registration extractor rejects or misencodes a few common declarations, compared with Xcode 27.2 (27B52) output:
inputOptionsis rejected. Any@Parameterthat passesinputOptions:(a documentedStringparameter option) stops
extraction withunsupported App Intents parameter option 'inputOptions'. Xcode writes onetypeSpecificMetadataentry
per argument the source passes and omits arguments left at their defaults:LNValueTypeMetadataKeyStringKeyboardType: asciiCapable 0, numbersAndPunctuation 1, URL 2, numberPad 3, default 4LNValueTypeMetadataKeyStringCapitalizationType: none 0, words 1, sentences 2, allCharacters 3LNValueTypeMetadataKeyString{Multiline,Autocorrect,SmartQuotes,SmartDashes}: 0 or 1
outputFlagsbits. ProvidesDialog and ShowsSnippetView were swapped and OpensIntent was ignored. Xcode writes
OpensIntent = 1, ShowsSnippetView = 2, ProvidesDialog = 4 (ReturnsValue sets no bit). The existing Files probe returns both
dialog and snippet, so its 6 hid the swap;some IntentResult & ReturnsValue<String> & ProvidesDialogcame out as 2
instead of 4.parameterSummaryis dropped. Xcode writes a plainSummaryasactionConfiguration.actionSummary: the text with
${parameter}placeholders, the parameters it interpolates (parameterIdentifiers) and the parameters its trailing builder
lists (otherParameterIdentifiers). Conditional summaries (When/Switch) and localization tables now stop extraction
with an error instead of being dropped silently.
Changes:
metadata/parameters.rs:inputOptionssupport (constant initializer only; non-constant or unknown cases are errors).metadata.rs: corrected output flags;actionConfigurationfromparameterSummary.- Fixtures:
InputOptionsProbe.swift(every option and case) andOutputProbe.swift(each output protocol alone and combined,
summaries with and without a builder), their Xcode 27.2 const-value captures, and the probes' actions from Xcode's
extract.actionsdata(*.actions.json).regen.pyregenerates both (--only InputOptionsProbe|OutputProbe). - Tests:
probe_actions_match_xcodecompares every probe action with Xcode's; two tests cover the error paths. The test
normalizer now also ignores the order oftypeSpecificMetadatapairs, which Xcode writes in hash order.
cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings (sweetpad-cli) and cargo test -p sweetpad-cli --lib
pass (1007 tests; inject::watcher::tests::fires_on_save_not_on_initial_files fails the same way without this change in the
environment I ran it in).
Note: the captures were taken from an existing app target, so the probe types carry that target's module name; running
regen.py --only InputOptionsProbe / --only OutputProbe on a Mac rewrites them under the probe modules.
🤖 Generated with Claude Code
Activity
hyzyla commentedon Nov 27, 2026
Thanks! looking into it