KeyboardKit / KeyboardKit

KeyboardKit is a Swift SDK that lets you create fully customizable keyboards with a few lines of code, using SwiftUI.
https://keyboardkit.com
MIT License
1.51k stars 229 forks source link

Make autocomplete service return a more complex result #818

Closed danielsaidi closed 2 weeks ago

danielsaidi commented 2 weeks ago

Instead of the suggestions function, make the autocomplete service return a result type, so that a service can include many different result values with a single operation.

danielsaidi commented 2 weeks ago

The AutocompleteService now has a single autocomplete(_:) function instead of the separate suggestions and next word predictions.

The new function returns an Autocomplete.ServiceResult which can be extended with more information in the future.

This can be tested in the v9 branch.