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:
Jason committed 2026-01-26 15:46:51 +08:00
1 parent 29a0643d74
commit c00f431d67
12 files changed
+180 -28

No files matched your search

+1
View File
@@ -381,6 +381,7 @@ describe("useSettings hook", () => {
"/server/claude",
undefined,
undefined, // geminiConfigDir
undefined, // opencodeConfigDir
);
expect(metadataMock.setRequiresRestart).toHaveBeenCalledWith(false);
});