mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-17 23:53:30 +08:00
fix(skills): address code review feedback on iOS 26 skill examples
- Add required name/description properties and @Generable to RecipeSearchTool - Fix missing argument label in session.respond(to:) call - Remove non-existent .scrollExtensionMode API, replace with correct guidance - Change PhotoProcessor from struct to class for cache mutation support - Fix method name mismatch in @concurrent example caller
This commit is contained in:
@@ -137,8 +137,8 @@ This mode is opt-in and recommended for apps, scripts, and other executable targ
|
||||
When you need actual parallelism, explicitly offload with `@concurrent`:
|
||||
|
||||
```swift
|
||||
nonisolated struct PhotoProcessor {
|
||||
var cachedStickers: [String: Sticker]
|
||||
nonisolated final class PhotoProcessor {
|
||||
private var cachedStickers: [String: Sticker] = [:]
|
||||
|
||||
func extractSticker(data: Data, with id: String) async -> Sticker {
|
||||
if let sticker = cachedStickers[id] {
|
||||
@@ -156,7 +156,8 @@ nonisolated struct PhotoProcessor {
|
||||
}
|
||||
|
||||
// Callers must await
|
||||
processedPhotos[item.id] = await PhotoProcessor().process(data: data)
|
||||
let processor = PhotoProcessor()
|
||||
processedPhotos[item.id] = await processor.extractSticker(data: data, with: item.id)
|
||||
```
|
||||
|
||||
To use `@concurrent`:
|
||||
|
||||
Reference in New Issue
Block a user