improved a lot of things

This commit is contained in:
SinachPat
2026-04-29 04:22:43 +01:00
parent 050c4ce7fe
commit 8d07d97cdc
8 changed files with 27 additions and 20 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ export async function answerAgentQuestion(
let parsed: unknown;
try {
parsed = JSON.parse(response.text);
parsed = JSON.parse(response.text.replace(/^```(?:json)?\s*/i, "").replace(/\s*```\s*$/, "").trim());
} catch (err) {
throw new Error(
`Design agent returned unparseable JSON: ${String(err)}. ` +