feat: migrate Claude common config snippet from localStorage to config.json
Migrate the Claude common config snippet storage from browser localStorage to the persistent config.json file for better cross-device sync and backup support. **Backend Changes:** - Add `claude_common_config_snippet` field to `MultiAppConfig` struct - Add `get_claude_common_config_snippet` and `set_claude_common_config_snippet` Tauri commands - Include JSON validation in the setter command **Frontend Changes:** - Create new `lib/api/config.ts` API module - Refactor `useCommonConfigSnippet` hook to use config.json instead of localStorage - Add automatic one-time migration from localStorage to config.json - Add loading state during initialization **Benefits:** - Cross-device synchronization via backup/restore - More reliable persistence than browser storage - Centralized configuration management - Seamless migration for existing users
This commit is contained in:
@@ -511,6 +511,8 @@ pub fn run() {
|
||||
commands::get_init_error,
|
||||
commands::get_app_config_path,
|
||||
commands::open_app_config_folder,
|
||||
commands::get_claude_common_config_snippet,
|
||||
commands::set_claude_common_config_snippet,
|
||||
commands::read_live_provider_settings,
|
||||
commands::get_settings,
|
||||
commands::save_settings,
|
||||
|
||||
Reference in New Issue
Block a user