ide-assi 0.143.0 → 0.144.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.
@@ -193328,8 +193328,9 @@ class IdeUtils
193328
193328
  static extractResponse = (response, gptServer) => {
193329
193329
 
193330
193330
  const extractJsonSnippet = (text) => {
193331
- const match = text.match(/```json([\s\S]*?)```/);
193332
- return match ? match[1].trim() : text;
193331
+ text.replace(/```[\s\S]*?```/g, '').trim();
193332
+ //const match = text.match(/```json([\s\S]*?)```/);
193333
+ //return match ? match[1].trim() : text;
193333
193334
  };
193334
193335
 
193335
193336
  let r;
@@ -193324,8 +193324,9 @@ class IdeUtils
193324
193324
  static extractResponse = (response, gptServer) => {
193325
193325
 
193326
193326
  const extractJsonSnippet = (text) => {
193327
- const match = text.match(/```json([\s\S]*?)```/);
193328
- return match ? match[1].trim() : text;
193327
+ text.replace(/```[\s\S]*?```/g, '').trim();
193328
+ //const match = text.match(/```json([\s\S]*?)```/);
193329
+ //return match ? match[1].trim() : text;
193329
193330
  };
193330
193331
 
193331
193332
  let r;
@@ -254,7 +254,7 @@ export class IdeAi
254
254
 
255
255
  const src = await this.#invoke(promptFile, params);
256
256
 
257
- const response3 = await fetch(`/api/source/generateTmplFile`, {
257
+ await fetch(`/api/source/generateTmplFile`, {
258
258
  method: "POST",
259
259
  headers: { "Content-Type": "application/json" },
260
260
  body: JSON.stringify({
@@ -18,8 +18,9 @@ export class IdeUtils
18
18
  static extractResponse = (response, gptServer) => {
19
19
 
20
20
  const extractJsonSnippet = (text) => {
21
- const match = text.match(/```json([\s\S]*?)```/);
22
- return match ? match[1].trim() : text;
21
+ text.replace(/```[\s\S]*?```/g, '').trim();
22
+ //const match = text.match(/```json([\s\S]*?)```/);
23
+ //return match ? match[1].trim() : text;
23
24
  };
24
25
 
25
26
  let r;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.143.0",
4
+ "version": "0.144.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -254,7 +254,7 @@ export class IdeAi
254
254
 
255
255
  const src = await this.#invoke(promptFile, params);
256
256
 
257
- const response3 = await fetch(`/api/source/generateTmplFile`, {
257
+ await fetch(`/api/source/generateTmplFile`, {
258
258
  method: "POST",
259
259
  headers: { "Content-Type": "application/json" },
260
260
  body: JSON.stringify({
@@ -18,8 +18,9 @@ export class IdeUtils
18
18
  static extractResponse = (response, gptServer) => {
19
19
 
20
20
  const extractJsonSnippet = (text) => {
21
- const match = text.match(/```json([\s\S]*?)```/);
22
- return match ? match[1].trim() : text;
21
+ text.replace(/```[\s\S]*?```/g, '').trim();
22
+ //const match = text.match(/```json([\s\S]*?)```/);
23
+ //return match ? match[1].trim() : text;
23
24
  };
24
25
 
25
26
  let r;