feat: add VS Code ChatGPT plugin config sync functionality

This commit is contained in:
Jason
2025-09-18 10:58:03 +08:00
parent b69d7f7979
commit 9bf216b102
7 changed files with 272 additions and 1 deletions

View File

@@ -288,3 +288,10 @@ export const hasTomlCommonConfigSnippet = (
return existingSnippet === snippetString.trim();
};
// 从 Codex TOML 配置中提取 base_url
export const extractBaseUrlFromToml = (tomlString: string): string => {
if (!tomlString) return "";
const match = tomlString.match(/base_url\s*=\s*"([^"]+)"/);
return match?.[1] ?? "";
};