ide-assi 0.146.0 → 0.147.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.cjs.js
CHANGED
|
@@ -193328,9 +193328,9 @@ class IdeUtils
|
|
|
193328
193328
|
static extractResponse = (response, gptServer) => {
|
|
193329
193329
|
|
|
193330
193330
|
const extractJsonSnippet = (text) => {
|
|
193331
|
-
return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
193332
|
-
|
|
193333
|
-
|
|
193331
|
+
//return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
193332
|
+
const match = text.match(/```json([\s\S]*?)```/);
|
|
193333
|
+
return match ? match[1].trim() : text;
|
|
193334
193334
|
};
|
|
193335
193335
|
|
|
193336
193336
|
let r;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -193324,9 +193324,9 @@ class IdeUtils
|
|
|
193324
193324
|
static extractResponse = (response, gptServer) => {
|
|
193325
193325
|
|
|
193326
193326
|
const extractJsonSnippet = (text) => {
|
|
193327
|
-
return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
193328
|
-
|
|
193329
|
-
|
|
193327
|
+
//return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
193328
|
+
const match = text.match(/```json([\s\S]*?)```/);
|
|
193329
|
+
return match ? match[1].trim() : text;
|
|
193330
193330
|
};
|
|
193331
193331
|
|
|
193332
193332
|
let r;
|
|
@@ -18,9 +18,9 @@ export class IdeUtils
|
|
|
18
18
|
static extractResponse = (response, gptServer) => {
|
|
19
19
|
|
|
20
20
|
const extractJsonSnippet = (text) => {
|
|
21
|
-
return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
//return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
22
|
+
const match = text.match(/```json([\s\S]*?)```/);
|
|
23
|
+
return match ? match[1].trim() : text;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
let r;
|
package/package.json
CHANGED
|
@@ -18,9 +18,9 @@ export class IdeUtils
|
|
|
18
18
|
static extractResponse = (response, gptServer) => {
|
|
19
19
|
|
|
20
20
|
const extractJsonSnippet = (text) => {
|
|
21
|
-
return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
//return text.replace(/```[\s\S]*?```/g, '').trim();
|
|
22
|
+
const match = text.match(/```json([\s\S]*?)```/);
|
|
23
|
+
return match ? match[1].trim() : text;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
let r;
|