From 59d500de43675ff3d039881396bfb6f8a8acb041 Mon Sep 17 00:00:00 2001 From: mic Date: Mon, 8 Dec 2025 15:40:26 +0100 Subject: [PATCH] Rollback #551 --- CHANGELOG.md | 1 - js/mzta-utils.js | 22 +--------------------- options/mzta-release-notes.html | 1 - 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1686ea5b..013b6a11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,6 @@

Version 3.7.6 - ??/??/2025

diff --git a/js/mzta-utils.js b/js/mzta-utils.js index 135d7616..24cb954c 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -592,11 +592,8 @@ export function hasSpecificIntegration(use, conntype){ return use && (conntype != null) && (conntype !== ''); } -export function extractJsonObject(inputString, fixBraces = true) { +export function extractJsonObject(inputString) { try { - if (fixBraces) { - inputString = fixJsonBraces(inputString); - } const jsonMatch = inputString.match(/\{[\s\S]*\}/); if (jsonMatch) { const jsonObject = JSON.parse(jsonMatch[0]); @@ -614,23 +611,6 @@ export function extractJsonObject(inputString, fixBraces = true) { } } -function fixJsonBraces(inputString) { - let result = inputString.trim(); - const hasOpen = result.startsWith("{"); - const hasClose = result.endsWith("}"); - - if (hasClose && !hasOpen) { - return "{" + result; - } - - if (hasOpen && !hasClose) { - return result + "}"; - } - - return result; -} - - export function isAPIKeyValue(id){ return id=="chatgpt_api_key" || id=="openai_comp_api_key" || id=="google_gemini_api_key" || id=="anthropic_api_key"; } diff --git a/options/mzta-release-notes.html b/options/mzta-release-notes.html index 4a6808d4..95dbdee4 100644 --- a/options/mzta-release-notes.html +++ b/options/mzta-release-notes.html @@ -10,7 +10,6 @@

Version 3.7.6 - ??/??/2025