ide-assi 0.19.0 → 0.21.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.
@@ -193315,7 +193315,7 @@ class IdeAi
193315
193315
  console.log(menus);
193316
193316
  console.log(tables);
193317
193317
 
193318
- const response = await fetch(`${this.#API_URL}/ai/generateSource`, {
193318
+ const response = await fetch(`${this.#API_URL}/ai/inferSourceMeta`, {
193319
193319
  method: "POST",
193320
193320
  headers: { "Content-Type": "application/json" },
193321
193321
  body: JSON.stringify({
@@ -193325,7 +193325,19 @@ class IdeAi
193325
193325
  })
193326
193326
  });
193327
193327
 
193328
- return await response.json();
193328
+ console.log(response);
193329
+
193330
+ const response2 = await fetch(`${this.#API_URL}/ai/generateSource`, {
193331
+ method: "POST",
193332
+ headers: { "Content-Type": "application/json" },
193333
+ body: JSON.stringify({
193334
+ userPrompt: userPrompt,
193335
+ menus: menus,
193336
+ tables: tables.list,
193337
+ })
193338
+ });
193339
+
193340
+ return await response2.json();
193329
193341
  };
193330
193342
  }
193331
193343
 
@@ -193418,7 +193430,7 @@ class IdeAssi extends HTMLElement
193418
193430
  try {
193419
193431
  const r = await this.#ai.generateSource(question);
193420
193432
  console.log(r);
193421
-
193433
+ elAiChat.add("ai", r);
193422
193434
  } catch (error) {
193423
193435
  console.error(error);
193424
193436
  elAiChat.add("ai", error);
@@ -193311,7 +193311,7 @@ class IdeAi
193311
193311
  console.log(menus);
193312
193312
  console.log(tables);
193313
193313
 
193314
- const response = await fetch(`${this.#API_URL}/ai/generateSource`, {
193314
+ const response = await fetch(`${this.#API_URL}/ai/inferSourceMeta`, {
193315
193315
  method: "POST",
193316
193316
  headers: { "Content-Type": "application/json" },
193317
193317
  body: JSON.stringify({
@@ -193321,7 +193321,19 @@ class IdeAi
193321
193321
  })
193322
193322
  });
193323
193323
 
193324
- return await response.json();
193324
+ console.log(response);
193325
+
193326
+ const response2 = await fetch(`${this.#API_URL}/ai/generateSource`, {
193327
+ method: "POST",
193328
+ headers: { "Content-Type": "application/json" },
193329
+ body: JSON.stringify({
193330
+ userPrompt: userPrompt,
193331
+ menus: menus,
193332
+ tables: tables.list,
193333
+ })
193334
+ });
193335
+
193336
+ return await response2.json();
193325
193337
  };
193326
193338
  }
193327
193339
 
@@ -193414,7 +193426,7 @@ class IdeAssi extends HTMLElement
193414
193426
  try {
193415
193427
  const r = await this.#ai.generateSource(question);
193416
193428
  console.log(r);
193417
-
193429
+ elAiChat.add("ai", r);
193418
193430
  } catch (error) {
193419
193431
  console.error(error);
193420
193432
  elAiChat.add("ai", error);
@@ -58,7 +58,7 @@ export class IdeAi
58
58
  console.log(menus);
59
59
  console.log(tables);
60
60
 
61
- const response = await fetch(`${this.#API_URL}/ai/generateSource`, {
61
+ const response = await fetch(`${this.#API_URL}/ai/inferSourceMeta`, {
62
62
  method: "POST",
63
63
  headers: { "Content-Type": "application/json" },
64
64
  body: JSON.stringify({
@@ -68,7 +68,19 @@ export class IdeAi
68
68
  })
69
69
  });
70
70
 
71
- return await response.json();
71
+ console.log(response);
72
+
73
+ const response2 = await fetch(`${this.#API_URL}/ai/generateSource`, {
74
+ method: "POST",
75
+ headers: { "Content-Type": "application/json" },
76
+ body: JSON.stringify({
77
+ userPrompt: userPrompt,
78
+ menus: menus,
79
+ tables: tables.list,
80
+ })
81
+ });
82
+
83
+ return await response2.json();
72
84
  };
73
85
  }
74
86
 
@@ -90,7 +90,7 @@ export class IdeAssi extends HTMLElement
90
90
  try {
91
91
  const r = await this.#ai.generateSource(question);
92
92
  console.log(r);
93
-
93
+ elAiChat.add("ai", r);
94
94
  } catch (error) {
95
95
  console.error(error);
96
96
  elAiChat.add("ai", error);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.19.0",
4
+ "version": "0.21.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -58,7 +58,7 @@ export class IdeAi
58
58
  console.log(menus);
59
59
  console.log(tables);
60
60
 
61
- const response = await fetch(`${this.#API_URL}/ai/generateSource`, {
61
+ const response = await fetch(`${this.#API_URL}/ai/inferSourceMeta`, {
62
62
  method: "POST",
63
63
  headers: { "Content-Type": "application/json" },
64
64
  body: JSON.stringify({
@@ -68,7 +68,19 @@ export class IdeAi
68
68
  })
69
69
  });
70
70
 
71
- return await response.json();
71
+ console.log(response);
72
+
73
+ const response2 = await fetch(`${this.#API_URL}/ai/generateSource`, {
74
+ method: "POST",
75
+ headers: { "Content-Type": "application/json" },
76
+ body: JSON.stringify({
77
+ userPrompt: userPrompt,
78
+ menus: menus,
79
+ tables: tables.list,
80
+ })
81
+ });
82
+
83
+ return await response2.json();
72
84
  };
73
85
  }
74
86
 
@@ -90,7 +90,7 @@ export class IdeAssi extends HTMLElement
90
90
  try {
91
91
  const r = await this.#ai.generateSource(question);
92
92
  console.log(r);
93
-
93
+ elAiChat.add("ai", r);
94
94
  } catch (error) {
95
95
  console.error(error);
96
96
  elAiChat.add("ai", error);