refactor: remove deprecated tauri-api.ts file
- Delete src/lib/tauri-api.ts as event listener has been migrated - Event listening now uses providersApi.onSwitched from lib/api/providers.ts - All references to tauriEvents have been removed - Type checking passes successfully This completes the API layer cleanup from the refactoring plan (Phase 4).
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import type { AppType } from "@/lib/api";
|
||||
|
||||
export interface ProviderSwitchedPayload {
|
||||
appType: AppType;
|
||||
providerId: string;
|
||||
}
|
||||
|
||||
export const tauriEvents = {
|
||||
onProviderSwitched: async (
|
||||
handler: (payload: ProviderSwitchedPayload) => void,
|
||||
): Promise<UnlistenFn> => {
|
||||
return await listen("provider-switched", (event) => {
|
||||
handler(event.payload as ProviderSwitchedPayload);
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user