( usage: UsageService.Interface | undefined, sdk: OpencodeClient, connection: ServiceConnection | undefined, sessionID: string, directory: string, )
| 870 | } |
| 871 | |
| 872 | function sendUsageUpdate( |
| 873 | usage: UsageService.Interface | undefined, |
| 874 | sdk: OpencodeClient, |
| 875 | connection: ServiceConnection | undefined, |
| 876 | sessionID: string, |
| 877 | directory: string, |
| 878 | ) { |
| 879 | if (!connection) return Effect.void |
| 880 | return (usage ?? makeUsageService(sdk)).sendUpdate({ |
| 881 | connection, |
| 882 | sessionID, |
| 883 | directory, |
| 884 | }) |
| 885 | } |
| 886 | |
| 887 | function selectVariant(snapshot: Directory.Snapshot, model: Directory.DefaultModel) { |
| 888 | const variants = Directory.variants(snapshot, model) |
no test coverage detected