chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:22:33 +08:00
commit fc4fcbab58
1848 changed files with 472303 additions and 0 deletions
@@ -0,0 +1,21 @@
import CodexBarCore
extension UsageStore {
func performRuntimeAction(_ action: ProviderRuntimeAction, for provider: UsageProvider) async {
guard let runtime = self.providerRuntimes[provider] else { return }
let context = ProviderRuntimeContext(provider: provider, settings: self.settings, store: self)
await runtime.perform(action: action, context: context)
}
func updateProviderRuntimes() {
for (provider, runtime) in self.providerRuntimes {
let context = ProviderRuntimeContext(provider: provider, settings: self.settings, store: self)
if self.isEnabled(provider) {
runtime.start(context: context)
} else {
runtime.stop(context: context)
}
runtime.settingsDidChange(context: context)
}
}
}