You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The prompt-attachment foundation from #310 landed on main through #321. This branch now integrates that upstream result and keeps the remaining change focused on Tool output attachments.
Summary
lower ordinary Tool prompt outputs into ordered transcript segments instead of flattening them to text
preserve image outputs through the Foundation Models Tool wrapper on OS 27
expose the existing provider-adapter lowering helper through the Compatibility SPI
Scope
This is limited to Tool output attachments. It does not add instruction attachments, labels, CIImage, pixel buffers, or data attachments.
Validation
swift test --filter PromptAttachmentTests — 11 tests passed on current upstream main
swift format lint --strict --recursive .
full Swift, iOS Simulator, and watchOS validation from the earlier branch revision
CI note: the sole red job failed during actions/checkout, before any package code ran. All three fetch attempts ended with Could not resolve host: github.com; the other six matrix jobs succeeded. GitHub does not allow the fork author to rerun this upstream workflow without repository admin rights.
The component-wise join now exposes buildOptional(nil) as a real empty text component. For example, Prompt { Attachment(...); if false { "note" }; Attachment(...) } lowers to image/empty-text/image rather than just the two images, so an absent branch is forwarded to providers. Represent a nil optional with no components instead.
Clarify Foundation Models platform support documentation
README.md:402
The bridge excludes tvOS and watchOS, while FoundationLanguageModel is available on watchOS 27. Therefore “on OS 27” overstates platform support. Narrow this documentation to the three platforms actually handled by Prompt.toFoundationModels().
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
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.
The prompt-attachment foundation from #310 landed on
mainthrough #321. This branch now integrates that upstream result and keeps the remaining change focused on Tool output attachments.Summary
Scope
This is limited to Tool output attachments. It does not add instruction attachments, labels, CIImage, pixel buffers, or data attachments.
Validation
swift test --filter PromptAttachmentTests— 11 tests passed on current upstreammainswift format lint --strict --recursive .