chore: remove dead code from providerConfigUtils and config API

- Remove unused functions: updateCommonConfigSnippet, replaceCommonConfigSnippet,
  replaceGeminiCommonConfigSnippet, updateTomlCommonConfigSnippet,
  replaceTomlCommonConfigSnippet and their internal helpers (~600 lines)
- Remove deprecated getClaudeCommonConfigSnippet and setClaudeCommonConfigSnippet
- Remove unused imports (deepClone, deepMerge)
This commit is contained in:
YoVinchen
2026-01-29 23:03:56 +08:00
parent 0d67fba524
commit 06cde78945
2 changed files with 1 additions and 620 deletions
-22
View File
@@ -66,27 +66,6 @@ const pendingSyncParams: Record<
const SYNC_DEBOUNCE_MS = 500;
/**
* 获取 Claude 通用配置片段(已废弃,使用 getCommonConfigSnippet
* @returns 通用配置片段(JSON 字符串),如果不存在则返回 null
* @deprecated 使用 getCommonConfigSnippet('claude') 替代
*/
export async function getClaudeCommonConfigSnippet(): Promise<string | null> {
return invoke<string | null>("get_claude_common_config_snippet");
}
/**
* 设置 Claude 通用配置片段(已废弃,使用 setCommonConfigSnippet
* @param snippet - 通用配置片段(JSON 字符串)
* @throws 如果 JSON 格式无效
* @deprecated 使用 setCommonConfigSnippet('claude', snippet) 替代
*/
export async function setClaudeCommonConfigSnippet(
snippet: string,
): Promise<void> {
return invoke("set_claude_common_config_snippet", { snippet });
}
/**
* 获取通用配置片段(统一接口)
* @param appType - 应用类型(claude/codex/gemini
@@ -453,7 +432,6 @@ function getSettingsConfigString(
case "gemini":
// Gemini: settingsConfig 是包含 env 字段的 JSON 对象
// replaceGeminiCommonConfigSnippet 期望接收完整的 settingsConfig JSON
return typeof config === "string" ? config : JSON.stringify(config);
default: