Files
CC-Switch/src/lib/api/omo.ts
T
Dex Miller ed47480fc7 feat(omo): integrate Oh My OpenCode profile management (#972)
* feat(omo): integrate Oh My OpenCode profile management into Provider system

Adds full-stack OMO support: backend config read/write/import, OMO-specific
provider CRUD with exclusive switching, frontend profile editor with
agent/category/model configuration, global config management, and i18n support.

* feat(omo): add model/variant dropdowns from enabled providers

Replace model text inputs with Select dropdowns sourced from enabled
OpenCode providers, add thinking-level variant selection, and prevent
auto-enabling newly added OMO providers.

* fix(omo): use standard provider action styles for OMO switch button

* fix(omo): replace hardcoded isZh strings with proper i18n t() calls
2026-02-09 12:18:20 +08:00

11 lines
455 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"),
getOmoProviderCount: (): Promise<number> => invoke("get_omo_provider_count"),
disableCurrentOmo: (): Promise<void> => invoke("disable_current_omo"),
};