feat(settings): add 'Apply to Claude Code extension' toggle
- Apply immediately on save (write or remove primaryApiKey) - Honor setting on provider switch (enabled: write for non-official, remove for official; disabled: no auto writes) - Remove per-provider Claude plugin buttons from ProviderList - Upsert primaryApiKey=any preserving other fields; respect override dir - Add zh/en i18n for the new setting
This commit is contained in:
@@ -183,9 +183,14 @@ function App() {
|
||||
});
|
||||
};
|
||||
|
||||
// 同步 Claude 插件配置(写入/移除固定 JSON)
|
||||
// 同步 Claude 插件配置(按设置决定是否联动;开启时:非官方写入,官方移除)
|
||||
const syncClaudePlugin = async (providerId: string, silent = false) => {
|
||||
try {
|
||||
const settings = await window.api.getSettings();
|
||||
if (!(settings as any)?.enableClaudePluginIntegration) {
|
||||
// 未开启联动:不执行写入/移除
|
||||
return;
|
||||
}
|
||||
const provider = providers[providerId];
|
||||
if (!provider) return;
|
||||
const isOfficial = provider.category === "official";
|
||||
|
||||
Reference in New Issue
Block a user