mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-26 01:34:51 +08:00
feat(opencode): sync all providers to live config on directory change
Add additive mode support for OpenCode in sync_current_to_live: - Add AppType::is_additive_mode() to distinguish switch vs additive mode - Add AppType::all() iterator to avoid hardcoding app lists - Add sync_all_providers_to_live() for additive mode apps - Refactor sync_current_to_live to handle both modes Frontend changes (directory settings): - Track opencodeDirChanged in useDirectorySettings - Trigger syncCurrentProvidersLiveSafe when OpenCode dir changes - Add i18n strings for OpenCode directory settings
This commit is contained in:
1 parent
29a0643d74
commit
c00f431d67
12 files changed
+180
-28
No files matched your search
@@ -381,6 +381,7 @@ describe("useSettings hook", () => {
|
||||
"/server/claude",
|
||||
undefined,
|
||||
undefined, // geminiConfigDir
|
||||
undefined, // opencodeConfigDir
|
||||
);
|
||||
expect(metadataMock.setRequiresRestart).toHaveBeenCalledWith(false);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user