mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-26 06:24:32 +08:00
924f38ebe1
OMO and OMO Slim are OpenCode plugins, not standalone apps — users should be able to fully remove them. Remove the count-based guard that prevented deleting the last active provider, and clean up the now-unused provider-count API surface across the full stack.
18 lines
667 B
TypeScript
18 lines
667 B
TypeScript
import { invoke } from "@tauri-apps/api/core";
|
|
import type { OmoLocalFileData } from "@/types/omo";
|
|
|
|
export const omoApi = {
|
|
readLocalFile: (): Promise<OmoLocalFileData> => invoke("read_omo_local_file"),
|
|
getCurrentOmoProviderId: (): Promise<string> =>
|
|
invoke("get_current_omo_provider_id"),
|
|
disableCurrentOmo: (): Promise<void> => invoke("disable_current_omo"),
|
|
};
|
|
|
|
export const omoSlimApi = {
|
|
readLocalFile: (): Promise<OmoLocalFileData> =>
|
|
invoke("read_omo_slim_local_file"),
|
|
getCurrentProviderId: (): Promise<string> =>
|
|
invoke("get_current_omo_slim_provider_id"),
|
|
disableCurrent: (): Promise<void> => invoke("disable_current_omo_slim"),
|
|
};
|