After fighting with it for literal days I ended up setting it to just take an AttributedString and return a “UnionValue" thing that is like documented in one web page and a WWDC link, both with incorrect explanation of how it should be used.
It still doesn't work like I think it should but it works mostly OK and at this point I give up working on a feature 1% of users will ever touch.
@paul The Shortcuts/App Intents API is so fucking inscrutable. And the documentation is too disjoint to fix that problem.
And/or I’m a dunce.
My very basic intents would never have shipped were it not for Claude Code
I love trying to make an intent / extension that takes an image as an input only to have some Apps like Safari not provide images as images but URLs instead.
yeah, I really think this is a "problem" that only Safari devs can fix. All we can do is declare an image as an input, or a URL as an input, and that URL can be _anything_. It's tough.
I've taken to creating a shortcut that will download the contents of the URL before invoking an AppIntent that I made, or erroring out if it's not an image.
@paul Yeah, it seems like anywhere you want to be able to produce/accept more than one type is full of dragons.
Also if you stumble upon @UnionValue in your travails, don't bother, it seems to just be straight up broken for intent parameters (on macOS at least).