mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-03-20 05:28:44 +08:00
Each OMO provider now stores its complete configuration directly in settings_config.otherFields instead of relying on a shared OmoGlobalConfig merged at write time. This simplifies the data flow from a 4-tuple (agents, categories, otherFields, useCommonConfig) to a 3-tuple and eliminates an entire DB table, two Tauri commands, and ~1700 lines of merge/sync code across frontend and backend. Backend: - Delete database/dao/omo.rs (OmoGlobalConfig struct + get/save methods) - Remove get/set_config_snippet from settings DAO - Remove get/set_common_config_snippet Tauri commands - Replace merge_config() with build_config() in services/omo.rs - Simplify OmoVariant (remove config_key, known_keys) - Simplify import_from_local and build_local_file_data - Rewrite all OMO service tests Frontend: - Delete OmoCommonConfigEditor.tsx and OmoGlobalConfigFields.tsx - Delete src/lib/api/config.ts - Remove OmoGlobalConfig type and merge preview functions - Remove useGlobalConfig/useSaveGlobalConfig query hooks - Simplify useOmoDraftState (remove all common config state) - Replace OmoCommonConfigEditor with read-only JsonEditor preview - Clean i18n keys (zh/en/ja)